Combo Attack (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 MapleStory, the Fighter class gains access to Combo Attack. As the Fighter attacks, combos stack up and increase the Fighter’s damage. These combos can be released and used later to unleash attacks that require combo count. Here’s how to create 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.

Warning for RPG Maker MZ Users

Warning.jpg

If you are using RPG Maker MZ and VisuStella MZ, the following code may or MAY NOT work as this Tips & Tricks is made for RPG Maker MV. VisuStella MZ is NOT responsible if this Tips & Trick does not work because the code base for RPG Maker MV and RPG Maker MZ are different and the code base between Yanfly Engine Plugins and VisuStella MZ is even more drastically different.

Instructions

Follow video instructions.

You can get the copy/paste code here:

Place these notetags inside of your Combo State‘s notebox. Change the values to match the demands of your game.
<Custom Apply Effect>
// Defaults user's combo stacks to 0.
user._comboStacks = user._comboStacks || 0;
// Get the current number of stacks. Min 0, Max 10.
var stacks = user._comboStacks.clamp(0, 10);
// Set the combo counter for the state.
user.setStateCounter(stateId, 'x' + stacks);
</Custom Apply Effect>

<Custom Remove Effect>
// Reset combo stacks to 0.
user._comboStacks = 0;
// Get the current number of stacks. Min 0, Max 10.
var stacks = user._comboStacks.clamp(0, 10);
// Set the combo counter for the state.
user.setStateCounter(stateId, 'x' + stacks);
</Custom Remove Effect>

<Custom Confirm Effect>
// Check if the user is delivering physical damage and the action does not have "Combo" in its name.
if (this.isPhysical() && value > 0 && !this.item().name.match('Combo')) {
  // Defaults user's combo stacks to 0.
  user._comboStacks = user._comboStacks || 0;
  // Get the current number of stacks. Min 0, Max 10.
  var stacks = user._comboStacks.clamp(0, 10);
  // Calculate the extra damage rate from Combo stacks.
  var rate = 1.00 + stacks * 0.10;
  // Round the damage upward.
  value = Math.ceil(value * rate);
  // Increase stack count.
  stacks += 1;
  // Set stack count min to 0, max to 10.
  stacks = stacks.clamp(0, 10);
  // Set the combo counter for the state.
  user.setStateCounter(stateId, 'x' + stacks);
  // Apply stack count to user's combo count.
  user._comboStacks = stacks;
}
</Custom Confirm Effect>
Place these notetags inside of your Combo Skill’s notebox. Change the values to match the demands of your game.
<Custom Requirement>
// Defaults user's combo stacks to 0.
user._comboStacks = user._comboStacks || 0;
// Set condition to whether or not the combo stacks are above 2.
value = user._comboStacks >= 2;
</Custom Requirement>

<Custom Execution>
// Defaults user's combo stacks to 0.
user._comboStacks = user._comboStacks || 0;
// Get user's combo stacks.
var stacks = user._comboStacks;
// Reduce user's combo stacks.
stacks -= 2;
// Set stack count min to 0, max to 10.
stacks = stacks.clamp(0, 10);
// Get Combo Attack state ID.
var comboStateId = 136;
// Set the combo counter for the state.
user.setStateCounter(comboStateId, 'x' + stacks);
// Apply stack counter to user's combo count.
user._comboStacks = stacks;
</Custom Execution>

Happy comboing!