Map Linked Battle Effects (MV Plugin Tips & Tricks)
VisuStella, Caz Wolf, Fallen Angel Olivia, Atelier Irina, and other affiliated content creators.
Ever wanted to link certain region ID’s to have certain effects applied when you encounter a battle on them? Now you can! This Tips & Tricks will show you just how to do that! 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 Passive Condition> // Set the initial condition setting to true. var condition = true; // Check if it is a battle playtest... if (BattleManager.isBattleTest()) { // ...set it to false. condition = false; // Check if a map exists and the party is in battle. } else if ($gameMap && $gameParty.inBattle()) { // Make a list of the active maps to automatically enable the effect. var activeMaps = []; // Insert the ID's of the maps you want this state to be active on. activeMaps.push(123, 124, 125, 126, 75); activeMaps.push(127, 128, 129, 130); // Make a list of the terrain tags to automatically enable the effect. var terrainTags = []; // Insert the terrain tags you want this state to be active on. terrainTags.push(0, 1, 2, 3); // Make a list of the region ID's to enable the effect. var regionIds = []; // Insert the region ID's you want this state to be active on. regionIds.push(10, 11, 12, 13); regionIds.push(14, 15, 16, 17); // Check if the list of active maps has any items. if (activeMaps.length > 0) { // Check if the active maps do not contain the current map. if (!activeMaps.contains($gameMap.mapId())) { // If it doesn't, disable the effect. condition = false; } } // Check if the list of terrain tags has any items. if (terrainTags.length > 0) { // Check if the terrain tags do not contain the current terrain tag. if (!terrainTags.contains($gamePlayer.terrainTag())) { // If it doesn't, disable the effect. condition = false; } } // Check if the list of region ID's has any items. if (regionIds.length > 0) { // Check if the region ID's do not contain the current region ID. if (!regionIds.contains($gamePlayer.regionId())) { // If it doesn't, disable the effect. condition = false; } } // If the player isn't in battle... } else { // ...then disable the effect. condition = false; } </Custom Passive Condition> Enjoy! |