Heya peeps, I've been trying using YanFly's stuff to figure out a way to stack a state that gives more and more Evasion. I've tried using the Stockpile tutorial, however that doesn't improve Evasion, it simply allows for stacking a state. Anyone has any ideas?
MV Evasion/Hit Rate Stacking States Help - RMMV
Javascript/Plugin SupportYou should be able to make a state that improves evasion.....
Then... you can just "stockpile" the state.......
Then... you can just "stockpile" the state.......
No, you can't. The Stockpile tip doesn't use anything specified in the state in the database, it's all done with a variable on the battler and the state counters.
Technically, it doesn't - it might seem like a pedantic distinction, but when you're trying to manipulate stuff at the code level, that matters. You only ever have a state once.
You would need to use a Dynamic Traits plugin - I believe Shaz and Galv have both written them. You would then use the script calls from those instructions in the Custom Apply Effect of your state to increase the value of its Evasion trait.
You could use YEP_ExtraParamFormula, have the evasion formula check if the user has the state, and if so, boost evasion based on the stockpile/state counters. So something like
Replace 'n' with the state number of the stacking state.
(base + plus) * rate + flat + (a.isStateAffected(n) && a._stockpile ? a._stockpile * 0.01 : 0)Replace 'n' with the state number of the stacking state.
Thanks a lot for the help! I checked it out and I don't think it was exactly what I was looking for x)
Thank you so so so much, that was exactly what I was looking for! I knew YanFly had done it all, but I couldn't find the plugin that would allow me to do so!
How? They do exactly what you asked for.
AphoticAmaranth's solution also works, but it will get much complicated if you start having more than one state that does a similar effect and you have to account for them all in one formula with lots of embedded conditionals.
(I don't care which one you use for your game, I'm just curious how you judged them not a correct solution)
Good luck with your project.
Oh! I'm not very well-versed in JS, that is for sure. Upon testing Shaz's and Galv's plugins, it seemed to only be doable with Plugin Commands, and since I'm looking mostly into doing stuff with States, I feel like YanFly's is more appropriate. I might be wrong however! I do have little experience with Commands and Events in RPG MMV, sooo. x)
Original thread: https://forums.rpgmakerweb.com/threads/evasion-hit-rate-stacking-states-help-rmmv.168685/