For example: starting at 100% MP Cost and equipping one thing that reduces MP Cost by 20%, then equipping a second copy of the same thing, reduces it by another exactly-20% to go to 60%, instead of 80% * 20%.
Is there a way to change Special Parameters additively instead of multiplicatively?
RPG Maker MZ Supportnot without plugins overwriting an entire section of the engine.
and there is a reason why those parameters are multiplicative: you can't get negative by multiplication.
with substractions you can get negative total, and that means you as the developer who enables substraction are responsible for preventing a negative total.
and there is a reason why those parameters are multiplicative: you can't get negative by multiplication.
with substractions you can get negative total, and that means you as the developer who enables substraction are responsible for preventing a negative total.
Got it, that makes sense, thanks!
I believe you'd need to rewrite 2 functions in rmmz_objects.js
like this, maybe.
The catch is that you're only subtracting from the MP cost.
If you had 80% + 80%+ off that's 160% off. Essentially all MP Costs are 0.
Normally if you made the Magic Cost Rate 160% it mean the MP Cost was higher. Perhaps with the trade off of doing higher damage or something.
So, you're sacrificing that potential by doing it this way.
like this, maybe.
JavaScript:
Game_BattlerBase.prototype.sparam = function(sparamId) {
if (sparamId == 4){ //MP Cost Rate
return this.traitsSum(Game_BattlerBase.TRAIT_SPARAM, sparamId);
}else{ //
return this.traitsPi(Game_BattlerBase.TRAIT_SPARAM, sparamId); //Original
};//
};
Game_BattlerBase.prototype.skillMpCost = function(skill) {
//return Math.floor(skill.mpCost * this.mcr);
if (this.mcr > 1){
return 0;
}else{
return Math.floor(Math.abs(( skill.mpCost * this.mcr)-skill.mpCost ));
};
};
The catch is that you're only subtracting from the MP cost.
If you had 80% + 80%+ off that's 160% off. Essentially all MP Costs are 0.
Normally if you made the Magic Cost Rate 160% it mean the MP Cost was higher. Perhaps with the trade off of doing higher damage or something.
So, you're sacrificing that potential by doing it this way.
Original thread: https://forums.rpgmakerweb.com/threads/is-there-a-way-to-change-special-parameters-additively-instead-of-multiplicatively.145984/