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.
Today’s Tips & Tricks will feature an idea on how to make certain tiles on the map cause different effects in-battle. This can lead to more interesting battles and even change play styles on what tiles to avoid and venture. Here’s how to make the effect in RPG Maker MV!
You can grab the copy/paste code here: Insert the following code into your passive state’s terrain notetag. Change the values in red and green to fit your game’s needs.
<Custom Passive Condition> // Check if the player is in battle. if ($gameParty.inBattle()) { // Make a list of the allowed background1's that will cause this effect to activate. var background1 = ['SF_Factory', 'SF_Factory_Damaged', 'SF_Metal1', 'SF_Metal2', 'SF_Metal2_Damaged', 'SF_MetalLattice']; // Make a list of the allowed background2's that will cause this effect to activate. var background2 = ['SF_Factory', 'SF_Laboratory', 'SF_Metal']; // Get the current spriteset. var spriteset = SceneManager._scene._spriteset; // Check if the spriteset exists. if (spriteset) { // If the current background has both backgrounds 1 and 2, then the effect is active. condition = background1.contains(spriteset.battleback1Name()) && background2.contains(spriteset.battleback2Name()); // Otherwise... } else { // The effect is not active. condition = false; } // If the player isn't in battle... } else { // The effect is not active. condition = false; } </Custom Passive Condition>
Happy RPG Making!
Please wait while you are redirected...or Click Here if you do not want to wait.