Reverence (MV Plugin Tips & Tricks)

From Yanfly.moe Wiki
Jump to navigation Jump to search

Welcome to the wiki! This is where you can find resources from Yanfly.moe, Ækashics.moe,
VisuStella, Caz Wolf, Fallen Angel Olivia, Atelier Irina, and other affiliated content creators.


For a short duration, whenever target ally spends MP, some of their health is replenished. The more MP spent increases the amount of health replenished. This effect in Everquest 2 can now be remade in RPG Maker MV!

Required Plugins

The following plugin(s) is required to create this Tips & Tricks effect:

For help on how to install plugins, click here.

For help on how to update plugins, click here.

About

This is a Tips & Tricks effect created for RPG Maker MV. Tips & Tricks are not to be confused with plugins. Instead, they are usually customized code created for the sake of producing unique features/effects that do not require an entire plugin to do.

Yanfly Engine Plugins

This Tips & Tricks effect is made possible due to the Yanfly Engine Plugins library.

Click here if you want to help support Team Yanfly on Patreon.

Instructions

Follow video instructions.

You can grab the copy/paste code here:

Place the following code in your Reverence state’s notebox. Change the values to fit your game’s settings.

<Custom Action Start Effect>
// Get the user's current HP.
user._reverenceMp = user.mp;
</Custom Action Start Effect>

<Custom Initiate Effect>
// Check if the stored MP value exists.
if (user._reverenceMp !== undefined) {
  // If it does, calculate the difference between the user's initial MP and the user's current MP after the cost.
  var difference = user._reverenceMp - user.mp;
  // Check if the difference is greater than zero...
  if (difference > 0) {
    // If it is, calculate the amount of HP healed.
    var hp = Math.ceil(difference * 20.00);
    // Make the user gain that HP.
    user.gainHp(hp);
    // Play a damage popup.
    user.startDamagePopup();
    // Clear the damage results.
    user.clearResult();
  }
  user._reverenceMp = undefined;
}
</Custom Initiate Effect>

Happy self sustaining!