I've been doing some research on Lucario's abilities, and I'm interested in incorporating them into passive states for a game. One of his abilities, Inner Focus, prevents him from being flinched. To reflect this, I plan to reduce the chance of him being stunned to 50%. However, I'm unsure how to implement the other ability, Steadfast, which increases his speed each time he gets flinched. I would really appreciate any assistance with this. Thank you.
Recreating a Pokemon ability into a passive state
RPG Maker MZ Supportwith yanfly's buffs and states plugin, give your flinch state the following notetag
and replace the x with the id for the steadfast state.
then any time the stunned state is applied to a battler with the passive, they gain a speed buff for 5 turns
EDIT: i saw the Primarily used engine was MV, but just incase. is this for MV or MZ?
Code:
<custom apply effect>
if (user.isStateAffected(x))
user.addBuff(6, 5);
</custom apply effect>
then any time the stunned state is applied to a battler with the passive, they gain a speed buff for 5 turns
EDIT: i saw the Primarily used engine was MV, but just incase. is this for MV or MZ?
This is for RPG Maker MZ.
ok, just making sure. i remember you had threads in the past about mv projects and using yanfly plugins
you'd need to use something like either Turan's eval tags, or the Visustella buffs and skills plugin. from there change "custom apply effect" to "State Apply Eval" or "JS On Add State" depending on which one. the contents of the notetag remains the same
you'd need to use something like either Turan's eval tags, or the Visustella buffs and skills plugin. from there change "custom apply effect" to "State Apply Eval" or "JS On Add State" depending on which one. the contents of the notetag remains the same
I do have the VisuStella Skills and States Core on MZ.
I might've ran into a problem when I used this code for the JS Passive Condition.
I might've ran into a problem when I used this code for the JS Passive Condition.
I have received a TypeError: Cannot read property 'speed' of undefined
i didnt say to make it the passive's condition.
i said:
Oh, okay then.
there is one change to make now that its crossed my mind. change the "user"s to "target"s. it didnt matter in the Yanfly plugin, but theyre different in the VS one
Nothing happened...? I put the code in the stun state's notetag, but Lucario didn't get a speed stat when he was stunned. What am I doing wrong?
found it. visustella passives arent detected by isStateAffected() like yanfly ones are. try to replace
with
Code:
if (target.isStateAffected(13))
Code:
if (target.states().includes($dataStates[13]))
Sadly, it still didn't work. The speed buff still did not kick in after Lucario got stunned. Thanks for trying, though.
so lets make sure here then. your notebox for the flinch state looks like this now:
your steadfast passive is state #13, and the actor has the passive active, right?
Code:
<JS On Add State>
if (target.states().includes($dataStates[13]))
target.addBuff(6, 5);
</JS On Add State>
No, that's stun. My steadfast passive is state #68. And yes, he has the passive state under his class notetag.
immediately after i gave you the notetag in the first reply, i said:
the first bit of code you gave back to me used 13
It worked! I changed the 13 into 68, put the code back into the stun notetag, and Lucario got a speed buff after getting stunned! Thank you very much!
Original thread: https://forums.rpgmakerweb.com/threads/recreating-a-pokemon-ability-into-a-passive-state.172323/