# Additive vs Multiplicative % Params (+bonus tutorial)

#### Frostorm

##### []D[][]V[][]D aka "Staf00"
So as many of you are aware, the various Params (Base, Ex, Sp) in RPG Maker are either calculated additively (traitsSum) or multiplicatively (traitsPi). Let's focus on Base Params 1st, aka the primary stats. The default formula (or Yanfly's at least) is the following: `(base + plus) * paramRate * buffRate + flat`

As you can see, we can easily adjust a stat (ATK for example) w/ hard numbers, as in integers, if we want to. The "plus" & "flat" components allow for this. However, if we want to adjust a stat by a percentage amount, we are forced to calculate multiple instances in a multiplicative manner. For example, if our Hero has 2 pieces of equipment that granted +20% ATK each, the result from wearing both would be: 1.20 x 1.20 = 1.44 or +44% total. But what if we want it to be calculated additively (i.e. 20% + 20% = +40% ATK)?

The solution I came up with involves editing the default param formula from earlier to this:
`(base + plus) * (paramRate + (flat / 100))`

This way, we can still utilize hard integer adjustments via the "plus" component while changing the role of "flat" so that we can use it to make % adjustments in an additive—not multiplicative—manner. Then simply use the <stat Flat: +x> notetag to make said adjustments.

On a side note, for those that are willing to fiddle w/ some JS files, Ex-Params and Sp-Params can be changed between additive and multiplicative as well. In "rpg_objects.js" line #2458-2464 you'll find the following:
JavaScript:
``````Game_BattlerBase.prototype.xparam = function(xparamId) {
return this.traitsSum(Game_BattlerBase.TRAIT_XPARAM, xparamId);
};

Game_BattlerBase.prototype.sparam = function(sparamId) {
return this.traitsPi(Game_BattlerBase.TRAIT_SPARAM, sparamId);
};``````
Simply put, "traitsSum" means it's calculated additively, while "traitsPi" means it's multiplicative. You can change any of them (not just xparam & sparam) to either Sum or Pi. However, when changing from Pi to Sum, you'll have to make sure the values start at 1.00 (100%), or else the values will start at 0. Here's a screenshot to show what I mean (Element Rate changed to Sum).

Basically, I just created this passive state that I put on all actors and enemies so their Element Rates would start at 100% instead of 0%. Otherwise, it would be super tedious adding these traits for each actor & enemy in the database! Anyway, I'd like to hear everyone's preferences opinions regarding this topic. What's your overall philosophy on "numbers" management for your game/project?

Last edited:

#### Pootscooter

##### Veteran
What's your overall philosophy on "numbers" management for your game/project?
If I had to choose between additive vs multiplicative for percentage bonuses, I'd go w/ additive. That way a single effect w/ a low coefficient won't bring down ur stats as significantly. It's also more intuitive to calculate in one's own head.

### Latest Profile Posts

Yet another gaming question, i'm currently playing Last of Us 2 and want to get another game to play next but can't decide between Ghost of Tsushima, Miles Morales & Jedi Fallen Order. After the latest mandalorian i AM on a star wars kick, but i also LOVED the last spiderman game that prequels Miles Morales. Ghost of Tsushima is the bottom of my list but i heard it was AWESOME. Just want a good story & fun gameplay.
I checked out Genshin Impact gameplay out of curiosity. I can't believe it's available as a mobile game too. Smooth animation, great music, and stellar sound effects (the ambient sounds are pretty detailed).

I'm flabbergasted to see games have becoming more and more advanced. Maybe also because I'm oblivious to current trend for a long time, it almost feel like I'm being sent into distant future. xD
Your artwork is amazing!!!
Stream will be live shortly with a session of the Interactive Text Adventure! Feel free to drop by!
I should finish the cat video I'm editing and finish the indesign stuff. So far only 1 is done and 4 to go