Changing stats with passive state

This might be a stupid question, but I've been stuck for hours on this.


As characters in the game level up, they gain skill points that increase their skills in certain areas.  I'm using variables to keep track of skill points and where they go, but where I'm stumped is how to increase, say, the ATK stat when a particular weapon is equipped.  I figured out that applying a passive state using Yanfly Auto-Passive States when equipping the weapon with a condition of the variable of that skill to be active.  What I can't figure out is how to alter the ATK by a flat amount within the state.  Please help, I'm completely lost on this one!


http://yanfly.moe/2015/10/17/yep-13-auto-passive-states/


Edit:  Never mind; I figured out a solution.
What was your solution? I'd actually like to know how to do flat bonuses in states as well haha XD
What was your solution? I'd actually like to know how to do flat bonuses in states as well haha XD

Actually, I wound up coming up with another solution.  I used Yanfly's Equip Core to create a conditional script in the weapon to add to the ATK if the right skill variable is high enough.  The drawback is that I'll have to put that condition in each weapon of that type, but it should work.  Hopefully, I won't need to change the numbers too much...


Edit: One thing I forgot to mention.  When changing the skill variable, refresh the actor affected by it.


Example: $gameActors.actor(1).refresh();


This way, any changes are immediately apparent.


Edit 2: Sorry for repeating editing, but I realize that it IS possible to use the state to add a flat stat.  But you'll need Yanfly's Auto Passive State & Base Parameter Control Plugins.  In my case, attach a passive state to the weapon, then in the state, I used:


<atk Plus: +5>


<Custom Passive Condition>


if ($gameVariables.value(2) >= 1) {


condition = true;


} else {


condition = false;


}


</Custom Passive Condition>


This way, the passive only functions if Variable 2 is high enough.
Okay! Thank you, Shockra!


I've been trying to figure out how to do flat boosts in states since I started my game 200-ish hours of work ago! My game uses small numbers (character attributes cap at about 40 before buffs, and the game starts with 1 in all stats.), so it's been difficult trying to balance percentage buffs/debuffs haha- they either do very little for most of the game or become very overpowering at end-game haha XD

Original thread: https://forums.rpgmakerweb.com/threads/changing-stats-with-passive-state.64017/