Tips & Tricks – Confusion (Pokémon) – 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.

In Pokémon, a confused unit will have a chance to attack itself whenever it tries to perform an action unlike the RPG Maker MV confusion effect where it can randomly target an ally or enemy. Here’s how to replicate the Pokémon confusion effect in RPG Maker MV!

You can grab the copy/paste code here: 


Insert the following Lunatic Mode code into the Confusion state’s notebox. Change the values in red to fit your game’s settings.

<Custom Action Start Effect>
// Calculate the confusion success rate
var confuseRate = 0.50;
// Check RNG if it passed
if (Math.random() < confuseRate) {
  // Get the confusion skill for the user to perform
  var confusionSkill = 10;
  // Start the animation
  user.startAnimation(63);
  // Get the user's current action
  var action = user.currentAction();
  // Set it to the confusion skill
  action.setSkill(confusionSkill);
}
</Custom Action Start Effect>

Enjoy!

Happy RPG Making!


These plugins and Tips & Tricks ideas are made possible thanks to our creative patrons on Patreon! The majority of our Tips & Tricks ideas are placed within the Patreon-exclusive Sample Project for quick and easy access! If you'd like to make a Tips & Tricks suggestion, Yanfly's Patreon-based Suggestion Box a visit here:


If you have any bugs to report, visit the following link:


If you have any questions about Action Sequences, visit the following link:



Thank you!