Bubble Wrap (MV Plugin Tips & Tricks)
VisuStella, Caz Wolf, Fallen Angel Olivia, Atelier Irina, and other affiliated content creators.
In MMBN, the Bubble Wrap effect will block damage (except for Electric), remove itself, and then come back a few turns later, making it one of the better ways to mitigate damage as a whole! Here’s how we can recreate 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 Battle Effect> // Get the state ID for the bubble wrap effect state var bubbleWrapId = 295; // Add that state to the user user.addState(bubbleWrapId); // Set the cooldown to 0 user._bubbleWrapCooldown = 0; </Custom Battle Effect> <Custom Regenerate Effect> // Default the bubble wrap cooldown to 0 user._bubbleWrapCooldown = user._bubbleWrapCooldown || 0; // Check if the cooldown is above 0 if (user._bubbleWrapCooldown > 0) { // Decrease the cooldown by 1 user._bubbleWrapCooldown -= 1; // Check if the cooldown has reached 0 or less if (user._bubbleWrapCooldown <= 0) { // Get the state ID for the bubble wrap effect state var bubbleWrapId = 295; // Play an animation on the user user.startAnimation(82); // Add the state to the user user.addState(bubbleWrapId); } } </Custom Regenerate Effect>
<Custom React Effect> // Check if HP damage is dealt if (this.isHpEffect() && value > 0) { // Get the elements used for the effect var elements = this.getItemElements(); // Get the element ID for the lightning element var lightningElementId = 9; // Check if the lightning element isn't involved if (!elements.contains(lightningElementId)) { // If isn't involved, set the damage to 0 value = 0; } // Play an animation on the target target.startAnimation(4); // Remove the bubble wrap state from the target target.removeState(stateId); } </Custom React Effect> <Custom Remove Effect> // Set the bubble wrap cooldown to 3 turns user._bubbleWrapCooldown = 3; </Custom Remove Effect> Happy wrapping! |