Hello fellow rpg makers.
I've recently started a project and I'm mostly using Yanfly plugins. Everything is going quite smootly until now.
I need a particular script call for the plugin "auto passive states". I need to trigger a passive effect on an actor when he equips a piece of equipment, but only if he belongs to a particular class.
So I inserted the "<Passive State: x>" note tag inside the weapon notes and then I'm trying to make a script call inside the passive state.
This is the example inside the plugin documentation:
instead of that particular hp/mp call, I need the script to generate a "true" when the character equipping the item belongs to class number 0 of the class database. I tried something like this:
unfortunately, launching the game generates many errors and fails to launch.
I need your help to understand script calls better. Thank you!
I've recently started a project and I'm mostly using Yanfly plugins. Everything is going quite smootly until now.
I need a particular script call for the plugin "auto passive states". I need to trigger a passive effect on an actor when he equips a piece of equipment, but only if he belongs to a particular class.
So I inserted the "<Passive State: x>" note tag inside the weapon notes and then I'm trying to make a script call inside the passive state.
This is the example inside the plugin documentation:
JavaScript:
<Custom Passive Condition>
if (user.hp / user.mhp <= 0.25) {
condition = true;
} else {
condition = false;
}
</Custom Passive Condition>
instead of that particular hp/mp call, I need the script to generate a "true" when the character equipping the item belongs to class number 0 of the class database. I tried something like this:
JavaScript:
<Custom Passive Condition>
if ($gameParty.leader().isClass($dataClasses[0]) ) {
condition = true;
} else {
condition = false;
}
</Custom Passive Condition>
unfortunately, launching the game generates many errors and fails to launch.
I need your help to understand script calls better. Thank you!






