Set State resistance via stats?

Is it possible to have a state's resistance calculated by a formula?

In my game, the MAT state doubles as an INT stat, higher MAT = Higher intelligence.
As such, I want characters with higher MAT to have a better chance of resisting confusion than characters with a lower MAT stat.

Conversely I'd also like to be able to be able to use stats to provide a bonus to the apply chance of a state.



Eg:


Ralph's MAT is 20


Slime's MAT is 10

State RES Formula: user.mat * .1


State Boost Formula: user.mat * .3


Ralph gets an added 20% to his state resistance, and the slime gets 30% added to any state application checks involving it as the attacker.


I thought about this after seeing the hell of confusion.  That state is overpowered in vanilla RPG maker, unless you make it incredibly inaccurate.  This way you can have certain actors better suited against certain ailments (Mages less likely to be confused, warriors less likely to be staggered, ect)



This might need to be in plugin requests but I'm unsure, move it if need be mods.
No, I doubt it.


The only way to do State resistance is with the features system.


Unless you make a plugin or modify the scripts...
Have you checked out the features in Yanflys states and buffs plugin?
Have you checked out the features in Yanflys states and buffs plugin?

Yeah I did.  There's nothing involving state resistance, even in the lunatic functions.
Off to plugin requests you go 😉

Original thread: https://forums.rpgmakerweb.com/threads/set-state-resistance-via-stats.65178/