PASIVE SKILLS

hello everyone, I have the passiveskill plugin that adds a passive skill to a character, but in the end it's just a state and it falls short. Does anyone know how to make passive skills more complete? for example do, when a character has 20% of life, increase her attack. Or when a character is hit with X element, their defense increases. Putting conditions on passive abilities is what I'm looking for. used rpg maker mv
This sounds like a job for Yanfly's Auto Passive States and Buffs & States Core with a bit of custom javascript notetags.

First let's look at how to make passive skills in general:
Make a skill with the occasion "never", give it the appropriate name and description and give it the notetag <Passive State: x>. I also like to give these skills the <Hide in Battle> notetag from Yanfly's Skill Core, though that is optional. Actually implement the skills effect through the state x.

Your first skill is easy to implement. Just make it increase the attack stat through the normal traits from the editor. In addition give it the notetag <Passive Condition: HP Below 20%>

The second skill is a bit harder. This is where we also need the Buffs and States Core and another plugin by Astfgl66.
First, let's establish a counter that tells us how often our battler has been hit by element x in game variable y.
JavaScript:
<custom react effect>
   if (this.item().damage.elementId == x) $gameVariables.setValue(y, $gameVariables.value(y) + 1);
</custom react effect>
Now we can use variable y with Astfgl66's flat stat bonus rates to increase the battler's def.
Finally, if we want the counter to restart each battle, we use another notetag from Buff's and States Core.
JavaScript:
<Custom Battle Effect>
   $gameVariables.setValue(y, 0);
</Custom Battle Effect>
If you don't want to use the notetag, make sure to initalize variable y in an event before the first battle.
I also like to give these skills the <Hide in Battle> notetag from Yanfly's Skill Core, though that is optional.
I'm curious - why do you like to? I'm sure you know that a passive skill with an Occasion of Never already doesn't show up in battle (or the menu), so why bother with a notetag? Is it just a sort of compulsive organizational thing, or is there a purpose I'm not thinking of?
To be completely honest, I didn't know that it wouldn't show up anyways with the occasion "never". I just kind of assumed that it would be greyed out 😅

Original thread: https://forums.rpgmakerweb.com/threads/pasive-skills.151513/