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

DamageEvil_5.png added!
index.php

Rendering the intro for the 4 time today, everytime it finished I noticed something that I found off and had to fix it and render it all over again...
Would not be so bad if it was not for my PC having the speed of a slug.:kaoswt2:
Tried something. Little sneak peak of Unity AD.
M42S7Us.gif

It's the little things. Lengthened the time the bar fades in and out to be a bit more comfortable.

Forum statistics

Threads
125,739
Messages
1,173,127
Members
164,891
Latest member
Shadowpalkia99
Top