MZ Making ex parameters scale off of regular ones?

Hi again,

I am looking for a way to make ex parameters scale off of a regular parameter (e.g. cri and cev scaling with mdf).
I had accomplished this by using the YEP Extra Parameters plugin which for some reason works mostly flawlessly in MZ, but it does seem to cause a visual error in the menus:

1686136074391.png


As seen here, when I switch between equipment, the parameter does change, but the number on the right isn't -1% but 0%.

Visustella's core engine seems to have a formula section similar to the old extra parameters plugin (shown below), but for now I'm only interested in changing 2 of the ex parameters' formulas and not all of them.

JavaScript:
// Determine the variables used in this calculation.
let xparamId = arguments[0];
let base = this.traitsSum(Game_BattlerBase.TRAIT_XPARAM, xparamId);
let plus = this.xparamPlus(xparamId);
let paramRate = this.xparamRate(xparamId);
let flatBonus = this.xparamFlatBonus(xparamId);

// Formula to determine total parameter value.
let value = (base + plus) * paramRate + flatBonus;

// Final value
return value;

Old example formula in the YEP plugin:
1686136282635.png


How would I accomplish this?
Hey,

I don't know which menus you are using, but my guess would be that the menu probably rounds each value individually, so (7.8% -> 7.4%) would be rounded to 8%, 7% and 0% respectively.

If that is the case, you could try to track down the rounding issues in your menu plugins and fix them, or try to change your formulas so they only produce integral percentages:

Math.round( (original formula) * 100) / 100
1686146585701.png


Using the Math formula appears to fix it, so I guess this was in fact the case 😢
Thanks for your help!

Original thread: https://forums.rpgmakerweb.com/threads/making-ex-parameters-scale-off-of-regular-ones.158141/