Tips & Tricks – Damage Over Time Stacking – 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.

Damage Over Time (DOT) can be done easily with RPG Maker MV itself. However, Damage Over Time Stacking is much harder to do. As a popular mechanic found in MMORPG’s, it’s no surprise that it’d find inspiration to be used in traditional RPG’s either. This Tips & Tricks video will show to recreate this effect in RPG Maker MV!

You can get the copy/paste code here: 

Maximum Stacks version.

<Custom Apply Effect>
// Make sure the stack count exists.
target._stackingPoison = target._stackingPoison || 0;
// Increase the stack count.
target._stackingPoison += 1;
</Custom Apply Effect>

<Custom Remove Effect>
// Reset the stack count.
target._stackingPoison = 0;
</Custom Remove Effect>

<Custom Regenerate Effect>
// Make sure the stack count exists.
target._stackingPoison = target._stackingPoison || 1;
// Sets the maximum amount of stacks to 5.
var stacks = Math.min(5, target._stackingPoison);
// The damage formula used per tick.
var damage = stacks * 100;
// Play poison animation on the target.
target.startAnimation(59);
// Target takes HP damage.
target.gainHp(-damage);
// Play the popup.
target.startDamagePopup();
// Clear the results.
target.clearResult();
// Check if the target is dead.
if (target.isDead()) {
  // If the target is dead, make it collapse.
  target.performCollapse();
}
</Custom Regenerate Effect>

No maximum stacks version.

<Custom Apply Effect>
// Make sure the stack count exists.
target._stackingPoison = target._stackingPoison || 0;
// Increase the stack count.
target._stackingPoison += 1;
</Custom Apply Effect>

<Custom Remove Effect>
// Reset the stack count.
target._stackingPoison = 0;
</Custom Remove Effect>

<Custom Regenerate Effect>
// Make sure the stack count exists.
target._stackingPoison = target._stackingPoison || 1;
// Sets the stacks variable to the stack count.
var stacks = target._stackingPoison
// The damage formula used per tick.
var damage = stacks * 100;
// Play poison animation on the target.
target.startAnimation(59);
// Target takes HP damage.
target.gainHp(-damage);
// Play the popup.
target.startDamagePopup();
// Clear the results.
target.clearResult();
// Check if the target is dead.
if (target.isDead()) {
  // If the target is dead, make it collapse.
  target.performCollapse();
}
</Custom Regenerate Effect>

Happy DOT Stacking!

Please wait while you are redirected...or Click Here if you do not want to wait.