Tips & Tricks – Restart State Turns – 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.

For today’s Tips & Tricks, we’ll be covering an effect that allows skills to restart and reset a state type’s turn counter back to what it was originally! Here’s how we can make this effect happen!

You can grab the copy/paste code here: 


Insert the following Lunatic Mode code into your skill’s notebox. Change the value in red to fit your game’s settings.

<After Eval>
// Get the target's current states
var states = target.states();
// Set the category to check to 'enchant'
var category = 'enchant';
category = category.toUpperCase();
// Loop through each of the states
for (var i = 0; i < states.length; ++i) {
  // Get the currently looped state
  var state = states[i];
  // Check if the state exists and is party of the matching category
  if (state && state.category.contains(category)) {
    // Reset the state turn count
    target.resetStateCounts(state.id);
  }
}
</After Eval>

Enjoy!

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