Tips & Tricks – Illness (Grandia Xtreme) – 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 Grandia Xtreme, a unit afflicted by illness will, at the end of each turn, gain a random debuff or status ailment except illness. This means that as the battle continues on and if illness is left unchecked, the character will get boggled down more and more by various status ailments. How horrifying! Here’s how we can make this effect in RPG Maker MV!

You can grab the copy/paste code here: 


Insert the following Lunatic Mode code into your illness state. Change the values in red to reflect your game’s settings!

<Custom Regenerate Effect>
// The rate to get a debuff instead of an ailment
var debuffChance = 0.25;
// If debuff chance succeeds
if (Math.random() < debuffChance) {
  var allowedParams = [];
  // Insert Param ID's you want to randomly add here:
  allowedParams.push(2, 3, 4, 5, 6, 7);
  // Get a random debuff from the pool
  var id = allowedParams[Math.floor(Math.random() * allowedParams.length)];
  // The number of turns for that debuff
  var turns = 5;
  // Add the debuff to the target
  target.addDebuff(id, turns);
  // Play an animation on the target
  target.startAnimation(54);
// If the debuff chance fails
} else {
  // Make a pool for ailments
  var allowedStates = [];
  // Insert states you want to randomly add here:
  allowedStates.push(21, 22, 26, 27);
  allowedStates.push(31, 36, 37, 38);
  allowedStates.push(41, 42, 43, 46);
  allowedStates.push(51, 56, 57, 58);
  allowedStates.push(60, 61, 66, 67);
  // Loop through each of the ailments
  while (allowedStates.length > 0) {
    // Get a random state from the pool
    var id = allowedStates[Math.floor(Math.random() * allowedStates.length)];
    // Remove the state from the pool
    allowedStates.splice(allowedStates.indexOf(id), 1);
    // Check if the target isn't affected by it
    if (!target.isStateAffected(id)) {
      // Add the state to that target
      target.addState(id);
      // Play an animation
      target.startAnimation(55);
      // Stop the loop
      break;
    }
  }
}
</Custom Regenerate 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, Plugins, and Lunatic Pack ideas are placed within the Patreon-exclusive Sample Project for quick and easy access! If you'd like to make a Plugin 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!