Tips & Tricks – Mending (Guild Wars) – 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.

The Mending skill from Guild Wars will allow the target ally to regenerate HP. However, this skill is sustained by the original caster and will regularly take away MP from the original caster to maintain its upkeep. Here’s how you can recreate the effect in RPG Maker MV!

Get the copy/paste versions of the code here:

Place this inside of your Mending state’s notebox. Replace the parts in red with what fits your game best.

<Custom Regenerate Effect>
// Determine the Upkeep cost.
var mpUpkeep = 5;
// Check if the original caster is alive and has enough MP to sustain the effect.
if (origin.isAlive() && origin.mp >= mpUpkeep) {
  // If the caster does, make the caster lose MP.
  origin.gainMp(-mpUpkeep);
  // Display the MP lost.
  origin.startDamagePopup();
  // Clear the caster's results.
  origin.clearResult();
  // The formula for the regeneration effect.
  var regen = Math.floor(origin.mdf / 2);
  // Make the user gain HP.
  user.gainHp(regen);
  // Show the HP healed.
  user.startDamagePopup();
  // Clear the user's results.
  user.clearResult();
 // If the original caster doesn't have enough MP...
} else {
  // Then remove the state from the user.
  user.removeState(stateId);
}
</Custom Regenerate Effect>

Place this inside of your Mending skill’s notebox. Replace the parts in red with what fits your game best.

<Actor or Enemy Select>

<Before Eval>
// This is the state ID of Mending.
var stateId = 84;
// Check if the target is affected by Mending.
if (target.isStateAffected(stateId)) {
  // If the target is, remove Mending.
  target.removeState(stateId);
 // If the target isn't...
} else {
  // Add Mending to the target.
  target.addState(stateId);
}
</Before Eval>

Happy Mending!

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