Living Dead (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.


The Living Dead is an extremely powerful effect in Final Fantasy 14. If an ally’s HP reaches 0 while under the effects of the Living Dead, they do not die. Instead, they become a Walking Dead, capable of living a few more turns. However, once these turns are up, depending on how much HP the ally has received, the ally may or may not die at that time. Here’s how to recreate this effect 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 this inside of the Living Dead state’s notebox.
// Bypasses this state being cleared when the user dies.
<Category: Bypass Death Removal>
Place this inside of the Walking Dead state’s notebox. Change the values to fit your game’s settings.
<Custom Regenerate Effect>
// Check if the user is still affected by the Walking Dead state.
if (user.isStateAffected(142)) {
  // Check if the user's HP is 0 or below.
  if (user.hp <= 0) {
    // Set it back to 1.
    user.setHp(1);
  }
}
</Custom Regenerate Effect>

<Custom Apply Effect>
// Set the amount of HP needed to recover for the Walking Dead to not kill the user.
user._walkingDeadHp = user.mhp;
// Set the flag for whether or not Walking Dead's final save has failed to false.
user._walkingDeadFailed = false;
// Create an animation on the player to indicate Walking Dead has activated.
user.startAnimation(65);
</Custom Apply Effect>

<Custom Remove Effect>
// Check if the Walking Dead HP Healed requirement is undefined.
if (user._walkingDeadHp === undefined) {
  // If it is, set it to the user's MaxHP.
  user._walkingDeadHp = user.mhp;
}
// If the Walking Dead HP Healed is still above 0...
if (user._walkingDeadHp > 0) {
  // ...then the save has failed.
  user._walkingDeadFailed = true;
  // Set the user's HP to 0.
  user.setHp(0);
}
</Custom Remove Effect>

<Custom Respond Effect>
// Check if the Walking Dead HP Healed requirement is undefined.
if (target._walkingDeadHp === undefined) {
  // If it is, set it to the target's MaxHP.
  target._walkingDeadHp = user.mhp;
}
// Check if the user received any HP healing.
if (target.result().hpDamage < 0) {
  // Carry over the healing to the amount of HP the target needs left to save itself from death.
  target._walkingDeadHp += target.result().hpDamage;
}
// If the target's HP is 0 or less...
if (target.hp <= 0) {
  // Then set the target's HP to 1.
  target.setHp(1);
}
</Custom Respond Effect>
Place these notetags inside of the K.O. state’s notebox
<Custom Apply Effect>
// Check if the user is affected by Living Dead and hasn't failed the Walking Dead save.
if (user.isStateAffected(141) && !user._walkingDeadFailed) {
  // Remove the K.O. state.
  user.removeState(1);
  // Remove Living Dead state.
  user.removeState(141);
  // Add the Walking Dead state.
  user.addState(142);
  // Set the user's HP to 1.
  user.setHp(1);
}
</Custom Apply Effect>

Happy thriving!