As far as I understand, each percentage boost in RMMV will multiply all the previous boosts, so for example a character with 100 ATK and 2 states that both gave +20% ATK would result in an ATK stat of 144, not 140. Unfortunately, my game uses a lot of small buffs and bonuses given by states, which means a character can easily end up with 30 or 40 more ATK than they should have, and the effect of this is amplified the greater the base value of the stat is.
As such, does anyone know of a way to have percentage changes stack linearly (so 3 +8% buffs will mean +24%, not +26%)? Preferably a way of editing this using the core MV code, so that plugins that wont detect any new notetags will be effected too. If that's not possible, a plugin will do too.
not exactly - it depends on which parameter you're talking about, and it can be checked in the editor.
If the trait for a parameter lists + ... %, then that parameters percentages are additive (HIT% for example is additive)
If the trait for a parameter lists * ... %, then that parameters percentages are multiplicative (elemental damage rates are multiplicative for example)
And there are valid reasons for those differences, because the parameters are handled differently inside the engine - one difference is that additive parameters have a base value of 0% if no trait is there and multiplicative parameters have a base value of 100% if no trait is there.
And because that is more to change internally, you should not try to change it in the default files - use a plugin if you have to change this, but always keep in mind that there were reasons why that was decided on originally, and you need to consider the sideeffects of such a change in the engine.
Ah, that's a good point. The only things I'd touch with this are the buffs to regular parameters done by states, and the same for elemental rates. I was thinking I'd bypass the problem of creating weird values by assigning default elemental/parameter rates in actors (eg with a <Basemult: MAT 1.0> or <Baseelement: 3 1.0> notetag). So if doing that worked, would this then theoretically at least be possible?
I think you misunderstood me - anything can work, and there are already plugins that can change that behaviour - the problem is that you as the developer have to make sure you don't accidentally break the engine by the changes.
For example, let's talk about the elemental damage rates - you want them to be additive? So now assume you have several options that reduce damage by reducing the percentage by for example -40%. And now let's assume the actor gets several of them - protective armor plus anti-damage jewelry plus skill creating an additional effect for a total of three.
With multiplicative rates, that would be 100%*60%*60%*60% for a result of 22%
With additive rates, that would be 100%-40%-40%-40% for a result of -20%. Unless there is code to prevent that, the actor would be healed by that form of damage.
That is one of the biggest reasons why the damage rates are multiplicative - no matter how many effects you stack, they can't get negative.
If you change that to use additive effects, you have to make sure that this doesn't happen as it would make balancing extremely difficult.
You need to think mathematically and design the logic with all possible results in code for cases that are currently automatically handled by base math.
Oh I see, yeah that would be a problem, but it should be possible to just put in a little extra code that goes "if damage dealt would be negative, make it zero", right? I mean, it already knows how to do that with the skill's base damage calculation for when the target's defense is more than double the user's attack (taking basic Attack skill as the example).
that is for damage calculation.
that result is then multiplied by the rate, that, when negative, results in healing.
Basic attack could still heal if it does damage and the damage rate for physical is negative.
Well yeah but I meant that since it's already got that kind of zeroing in one place it means it's possible to replicate it somewhere else.