Tips & Tricks – Overheat – 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.

Today we have a rather unique effect. Sometimes, there are enemies that straight up absorb certain elements. But what if there was a limit on how much of that element they can absorb? A fire monster, for example, can only receive so much fire damage before it can no longer contain it, overheat, and then explode! Here’s how we can create that effect in RPG Maker MV!

You can grab the copy/paste code here: Place the following into your Overheat passive state’s notebox. Change the values in red to reflect your game’s settings.

<Element Absorb: Fire>

<Custom React Effect>
// Check if this is an HP effect
if (this.isHpEffect()) {
  // Get the element ID for fire
  var fireElementId = 7;
  // Get the elements used for this action
  var elements = this.getItemElements();
  // Check if the elements used contains fire
  if (elements.contains(fireElementId)) {
    // If it does, increase the target's MaxHP through a buff that lasts 10 turns
    target.addBuff(0, 10);
  }
}
</Custom React Effect>

<Custom Respond Effect>
// Check if the target's current HP exceeds 200% of its base MaxHP
if (target.hp >= target.paramBase(0) * 2.00) {
  // If it does, set the damage equal to the target's current HP
  var dmg = target.hp;
  // Play an animation on the target
  target.startAnimation(107);
  // Set the target's HP to 0
  target.setHp(0);
  // Remove the target's immortal status
  target.removeImmortal();
  // Get the element ID for fire
  var fireElementId = 7;
  // Get all living battle members on the battlefield
  var members = user.friendsUnit().aliveMembers().concat(target.friendsUnit().aliveMembers());
  // Loop through each of the members
  for (var i = 0; i < members.length; ++i) {
    // Get the currently looped member
    var member = members[i];
    // Check if the member exists
    if (member) {
      // Make the member take fire damage
      member.gainHp(-1 * dmg * member.elementRate(fireElementId));
      // Start the damage popup
      member.startDamagePopup();
      // Check if the member is dead
      if (member.isDead()) {
        // If it is, collapse the member
        member.performCollapse();
      }
      // Clear the results
      member.clearResult();
    }
  }
}
</Custom Respond Effect>

Enjoy!

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