save the given gender in a variable [VisuMZ_1_ElementStatusCore]

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.
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);
ok, thank you, I'll ask yanfly directly, thank you again for your help

Original thread: https://forums.rpgmakerweb.com/threads/save-the-given-gender-in-a-variable-visumz_1_elementstatuscore.150291/