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
659
Reaction score
372
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

Interior of a bus, may do more vehicle interiors :kaoswt2:
1670089782219.png
I can hardly believe it is the third day of Christmas and I have yet to put up decorations! Spending my morning cooking breakfast and getting them up.
https://itch.io/s/83641/1-week-sale Do you want a Roguelike game like a turn-based Hades? Get Zodiac Hunters now while it's on sale!
2-0!!
1670083194124.png

Sorry to my fellow RPG maker users who are in the USA... We're kicking your butts! :)
(It's 2-0 at half time in the 8th finals of the WC Soccer. Loser goes home.)
At a store was a taste testing booth for Swiss cookies. After mentioning I'm Swiss, the guy gifted me a bunch of samples "in the spirit of an early St Nicholas". Made my day!

Forum statistics

Threads
127,010
Messages
1,183,162
Members
166,873
Latest member
Rulles
Top