Placeholder Maps
This script allows you to create “placeholder maps”, which are maps that are meant to be replaced with other maps when you load the map. It uses something called a “replace map formula”, which is just a regular ruby formula.
When you load a map such as transferring from one map to another, the engine first determines whether a different map should be loaded or not.
The intention behind this script is to allow you to easily change a map’s visuals (while keeping all transfer points basically the same) without having to find a way to set up your transfer events to check conditions to determine which map to go.
For example, suppose you have a castle town map, and later on in the story, the castle town is destroyed. Two maps are used to achieve this: one is the original castle town, the other is the ruins map. Your castle town may have a number of transfer points within the town leading to building interiors, or to other maps in your world. This means that you will likely have a number of other transfer events that lead to the castle town.
If all you want to do is change the way your castle town looks from the original to your ruined version while keeping all of the transfer points the same, you can simply write a replace map formula to load the appropriate map.
This script comes in handy when you have all your transfer events set up to a map, and then suddenly you want to have it so that all transfers will go to a very similar map when a condition is met. Instead of having to go and update all of your events, you can just put the condition on the map itself to replace the map, saving you a lot of trouble.
Download
Script: download here
Installation
In the script editor, place this script below Materials and above Main
Usage
To define a replace map formula, note-tag a map with
<replace map> FORMULA </replace map>
Where the formula can be any valid ruby formula that returns a map ID.
The following formula variables are available:
p - game party t - game troop s - game switches v - game variable
Example
Suppose that when our castle town is destroyed, switch 12 is turned ON.
Assuming the castle town map is map ID 5, and the castle town ruins map is
map ID 6, you would note-tag the castle town map with
<replace map> if s[12] 6 else 5 end </replace map>
For further organization, you might choose to create a placeholder map for the
purpose of being replaced.