Illness (MV Plugin Tips & Tricks)
|
VisuStella, Caz Wolf, Fallen Angel Olivia, Atelier Irina, and other affiliated content creators.
|
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! Required PluginsThe 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. AboutThis 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 PluginsThis 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 UsersIf 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. InstructionsFollow video instructions. You can grab the copy/paste code here:
<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! |








