Hi, I'm using RPG Maker MZ and the Visustella plugin. To boost elemental attacks, I use <Dealt Element 5 Plus: +30%> in the notes. I wanted to know if I can boost that percentage based on a parameter. For example, boosting element X by 20% of the attack (for example).
MZ DEALT ELEMENT
Javascript/Plugin SupportTry this:
Code:
<JS Dealt Element 5 Plus: Math.round(this.atk * 0.20)>
It doesn't work properly. I think it's because elemental damage is a percentage. I have 25 attack, and when I use the formula, it returns 100% elemental damage. How should I set it?
So, you want the attack be slightly boosted by a rate? Try this:
The way it works is this:
Actor has 25 attack power, 20% of that is 5.
5 / 100 = 0.05
1 + 0.05 = 1.05
Thus, every time the actor uses element 5, the attack will be boosted by 5%.
Code:
<JS Dealt Element 5 Rate: (Math.round(this.atk * 0.20) / 100) + 1>
The way it works is this:
Actor has 25 attack power, 20% of that is 5.
5 / 100 = 0.05
1 + 0.05 = 1.05
Thus, every time the actor uses element 5, the attack will be boosted by 5%.
Original thread: https://forums.rpgmakerweb.com/threads/dealt-element.180027/