No Kill Like Overkill (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.


In Borderlands 2, when a unit is killed with No Kill Like Overkill, excess damage is stored for the next attack making it better to not skimp on using lesser attacks to efficiently kill enemies. Here’s how to recreate the 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 the following code into your No Kill Like Overkill Skill. Change the values to fit your game’s settings.
<Pre-Damage Eval>
// Get the target's current HP.
target._currentHp = target.hp;
</Pre-Damage Eval>

<Post-Damage Eval>
// Check if the target's current HP was positive and is now 0 or lower.
if (target._currentHp && target.hp <= 0) {
  // If it is, calculate the different between the damage dealt and the former current HP.
  var dmg = target.result().hpDamage - target._currentHp;
  // If the damage value was greater than zero...
  if (dmg > 0) {
    // Then declare the Overkill State ID.
    var overkillStateId = 152;
    // Add the state to the user.
    user.addState(overkillStateId);
    // Set the user's overkill damage bonus to the damage difference.
    user._overkillBonus = dmg;
    // Play an animation on the user.
    user.startAnimation(51);
  }
}
target._currentHp = undefined;
</Post-Damage Eval>
Place the following code into your Overkill state’s notebox. Change the values to fit your game’s settings.
<Custom Confirm Effect>
// Check if the action deals damage to HP.
if (this.isHpEffect() && value > 0) {
  // Default the overkill bonus to 0 if it doesn't exist.
  user._overkillBonus = user._overkillBonus || 0;
  // Add the overkill damage bonus to the current damage. It will cap at 5 times the damage dealt.
  value += Math.min(value * 5, user._overkillBonus);
  // Play an extra animation on the target.
  target.startAnimation(13);
}
</Custom Confirm Effect>

Happy overkilling!