Tips & Tricks – Iteration Skill Damage – RPG Maker MV

Yanfly Engine Plugins is a plugin library made for RPG Maker MV, a wonderful piece of software to help you make that role playing game of your dreams. You can find out more about RPG Maker MV here.

Ever wanted to make a skill that deals more damage each time it’s used in battle based on the number of spells cast? The skill would deal a small bit of damage at the beginning of battle and end up quite big towards the end of it based on the total number of spells cast per battle. Here’s how we can make this effect in RPG Maker MV!

You can grab the copy/paste code here: 

Insert the following code into your skill’s notebox. Change the values in red to reflect your game’s settings.

<Damage Formula>
// Default the number of times it's been casted to 0
var total = user._totalSpellsCasted || 0;
// The multiplier used based on the number of times it's been used.
var bonusMultiplier = total * 0.50;
// The damage formula with reference to the multiplier bonus
value = user.mat * (1 + bonusMultiplier);
</Damage Formula>

// The passive state linked to this skill
<Passive State: 319>

Insert the following code into your passive state’s notebox.

<Custom Battle Effect>
// At the start of battle reset the number of casts
user._totalSpellsCasted = 0;
</Custom Battle Effect>

<Custom Action Start Effect>
// Default the amount of spells casted to 0
user._totalSpellsCasted = user._totalSpellsCasted || 0;
// Get the user's current action
var action = user.currentAction();
// Check if it is a skill and magical
if (action.isSkill() && action.isMagical()) {
  // Increase the total number of spells casted by 1
  user._totalSpellsCasted += 1;
</Custom Action Start Effect>


Happy RPG Making!

These plugins and Tips & Tricks ideas are made possible thanks to our creative patrons on Patreon! The majority of our Tips & Tricks, Plugins, and Lunatic Pack ideas are placed within the Patreon-exclusive Sample Project for quick and easy access! If you'd like to make a Plugin Suggestion, Yanfly's Patreon-based Suggestion Box a visit here:

If you have any bugs to report, visit the following link:

If you have any questions about Action Sequences, visit the following link:

Thank you!