In RPG Maker MV, damage calculations are performed when one battler uses an action on another battler (including themselves).
So for example, let’s say your actor attacked an enemy using skill #3. The game would look at skill #3’s damage formula and use that to determine the base damage that the skill can deal.
In addition to this “base damage”, we also have some extra damage modifiers, such as the guard effect which halves the damage received, as well as the critical hit modifier, which increases damage based on a critical multiplier.
This plugin allows you to further apply additional damage modifiers, which essentially allows you to change the damage even further. These modifiers will be applied to states, so whenever the state is active, the damage modifiers will be used.
State damage modifiers can be applied to both the attacker as well as the target. Attacker damage modifiers are applied before the target damage modifiers.
Plugin: download here (right-click, save as)
Download ths plugin and place it in the “plugins” folder in your project’s “js” folder. Then open your Plugin Manager (F10), double-click an empty row, and select the HIME_StateDamageModifiers plugin.
Once it is in your list of plugins, turn the plugin on.
State damage modifiers are similar to damage formulas, except they have an extra variable available to use: the current damage.
Because there may be multiple damage modifiers involved, you might want to apply the modifier on top of the results of previously modified damages.
There are two types of damage modifiers: attacker modifiers, and defender modifiers. Attack modifiers are used when a battler is attacking someone. On the other hand, defender modifiers are used when they are on the receiving end of an attack.
If a battler targets themselves, both attacker and defender modifers are used for the same battler.
So if A attacks B, then A is the attacker, and B is the defender. If A attacks A, then A is both the attacker and defender.
To apply a state damage modifier to a state, note-tag states with the appropriate modifier. If you want to add an attacker modifier, use
<state damage modifier: attacker> FORMULA </state damage modifier>
If you want to add a defender modifier, use
<state damage modifier: defender> FORMULA </state damage modifier>
a - the attacker b - the target v - game variables d - current damage (after previous modifiers are applied)
You must remember to have the damage formula return a value. Please see the following examples.
So for example, let’s say you wanted to make it so that this state will simply cancel out any damage. You can use a simple formula
And the damage will now be 0.
Similarly, you could change the damage so that it will leave you with 1 HP.
return b.hp - 1
Which means the target’s current HP, less one. This might be useful if you wanted your state to always leave 1 HP when it’s active.
You might make it so that this state will double the damage dealt. You can say
return d * 2
Which will multiply the current damage by 2.
If you need help coming up with a formula, many people could potentially help.