[RMMV] DISPLAY EQUIPMENT STATS BASED ON PERCENTAGES

Posts

Pages: 1
Salutations. In this example's RPG Maker MV project, equipment does not confer static increases to parameters, but use percentages to increase the wielder's statistics. These are detailed in the Traits section of each equipment item.

For example, let us make a sword that has a Trait which multiplies the attack parameter by 110%.

However, if we use certain plugins, such as the Item Book plugin, and examine this sword's entry, its Attack statistic is listed as 0.

By what method might I be able to alter any references to this parameter to display its percentage increase in lieu of static parameters? Can this method be used with any plugin that alters the display of the item windows?

Please refrain from offering any solutions behind a paywall. Thanks in advance.
You should look at the function "Game_BattlerBase.prototype.traitsPi" to understand how multiplicative traits are calculated.

The ItemBook plugin refers to data members of the database item (not using function calls), so you'd want to edit it in order to display different information.

Finally, trait parameters are normalized - a value of 1.2 is equivalent to "* 120%" in the editor
Marrend
Guardian of the Description Thread
21781
I feel like the answer lies somewhere in a reference to Game_BattlerBase.traitsWithID(code, id), where "code" would be the constant value for parameter modification (TRAIT_PARAM?), and "id" would be the place in the parameter array to check against (2 should be for the strength parameter)?

Something that might lead to the "current" value, but, I have no idea how to obtain an "after" value. ;_;
I imagine it's much too unnecessarily complicated to calculate the "after" value when that would change based on each character and what level each character is at, and any other potential factors (for example, a durability system or something). That is, if I'm not misunderstanding. If I can just replace the attack parameter with the percentage change when just the flat parameter would be displayed, I feel that would work well enough, as the display for the change in parameters is a whole different function, as that seems to calculate the resulting change correctly.

Apologies if I confused anything there; I might be lacking sleep.
Pages: 1