MV Requesting a plugin to change State Rate from multiplicative to additive.

While there's nothing wrong with the way the engine has things set up, if State Rate could be changed to work additively, that would be a great boon. Not entirely sure what else to add, as this seems like a straightforward thing.

Thanks in advance to anyone who drops by.
Havn't tested it, but by taking a quick look at the core scripts, this should do the trick:

JavaScript:
//overwrite function to change traitsPi to traitsSum
Game_BattlerBase.prototype.stateRate = function(stateId) {
    return this.traitsSum(Game_BattlerBase.TRAIT_STATE_RATE, stateId);
};
One advice however:

please make sure that the mathematics for your traits work out correctly.
You now have a base of 0% instead of a base of 100%, and all those traits were multiplicative for a reason, they react badly to negative values.
You now have a base of 0% instead of a base of 100%
yeah they'd probably need a "+1" modifier at the end of that snippet above to ensure it at least starts at 100%. I've had to do stuff like that when tinkering with the various s/x parameters.
One advice however:

please make sure that the mathematics for your traits work out correctly.
You now have a base of 0% instead of a base of 100%, and all those traits were multiplicative for a reason, they react badly to negative values.
Thanks for the warning. The more I think about it, the more I'm not 100% certain I'll use the additive scriptlet provided above, but I definitely think having the option is going to be a plus.

@eomereolsson Thanks a bunch, friend. Gonna squirrel that bit of code away for now, as I'm still deciding which approach will ultimately be better.

I'm gonna leave the thread open for a bit just in case I have an intrinsically related query or anyone has anything else to add.
The more I think about it, the more I'm not 100% certain I'll use the additive scriptlet provided above...I'm still deciding which approach will ultimately be better.
And just to put it out there, it wouldn't be difficult to do it on a per-state basis.

JavaScript:
//overwrite function to change traitsPi to traitsSum for some states
Game_BattlerBase.prototype.stateRate = function(stateId) {
    switch (stateId)
    {
// List state IDs to be additive
        case 15:
        case 21:
        case 30:
            return this.traitsSum(Game_BattlerBase.TRAIT_STATE_RATE, stateId)+1;
// Otherwise multiplicative as normal
        default:
            return this.traitsPi(Game_BattlerBase.TRAIT_STATE_RATE, stateId);
    }
};
@ATT_Turan Well, damn. That is not a terrible idea at all. Gonna hafta keep that in mind too. Thanks, Turan!

Original thread: https://forums.rpgmakerweb.com/threads/requesting-a-plugin-to-change-state-rate-from-multiplicative-to-additive.151012/