save the given gender in a variable [VisuMZ_1_ElementStatusCore]

john-seed

Villager
Member
Joined
May 30, 2015
Messages
19
Reaction score
1
First Language
french
Primarily Uses
hello I am looking for a command to be able to do a full scan skill.
I use VisuStella MZ plugins, including VisuMZ_1_ElementStatusCore,
and I would like to save the given gender in a variable
i use
var target = BattleManager._target; $gameVariables.setValue(7, target.gender); $gameVariables.setValue(7, target.Gender); $gameVariables.setValue(7, [gender]);
it doesn't work, any idea?
thank you sorry for my bad english I just speak french.
 

Attachments

  • scan1.png
    scan1.png
    60.7 KB · Views: 8
  • scan2.png
    scan2.png
    252.8 KB · Views: 8

Another Fen

Veteran
Veteran
Joined
Jan 23, 2013
Messages
658
Reaction score
368
First Language
German
Primarily Uses
Hey,

VisuStella does not publicize their code, and at least I haven't found a mention how to extract a characters gender in the plugin manual (I might have overlooked something though).
If there is a way to access the gender directly through script calls, it probably won't be something obvious.

I don't know how VisuStella handles feature requests or support in that regard, but you could of course try to ask the original author(s) for help with the proprietary plugin.


Alternatively, a workaround I could think of would include element rates:
You could give each gender a unique rate for an element you otherwise don't use (and hide from the status screen), and use that element rate to deduce the targets gender:

(For example, using element 17 and 100% - 400% element rate respectively)
Code:
let battler = BattleManager._target;
let genderElement = 17;
let genderTable = {
  1 : "\x1bI[160]Unknown",
  2 : "\x1bI[165]Male",
  3 : "\x1bI[162]Female",
  4 : "\x1bI[84]Both",
};

let gender = genderTable[Math.round(battler.elementRate(genderElement))];

$gameVariables.setValue(7, gender);
 
Last edited:

john-seed

Villager
Member
Joined
May 30, 2015
Messages
19
Reaction score
1
First Language
french
Primarily Uses
ok, thank you, I'll ask yanfly directly, thank you again for your help
 

Latest Threads

Latest Posts

Latest Profile Posts

Aerosys wrote on OcRam's profile.
Just saw your video about Map Generation. What a pity it's gone! It looked really well-made and like an excellent competitor to mine.
The Florida city I was born and raised in, Fort Myers, has been in the national news lately. We took a major hit from the hurricane. I'm fine, but others weren't so lucky.
Today's gonna be a weird day. Someone just let me through... while I was waiting for a green light.
Released my latest game in June! Ashina: The Red Witch. Inspired by old adventure RPG Maker games :)
If you are not part of the solution, you are insoluble sediment.

Forum statistics

Threads
125,650
Messages
1,172,524
Members
164,763
Latest member
SausageDragon
Top