Map Regions
This script allows you to separate your map into separate “map regions”.
Each region can be treated as a separate section of the map, with their own names, music, and battlebacks.
When you move from one region to another, the new region’s name will be
used and the new region’s music will be played.
Download
Script: download here
Installation
In the script editor, install this script below Materisls and above Main
Usage
To create a map region, note-tag the map with
The following options are available. You do not need to include all of them.
name - the name of the region bback1 - name of the file for the floor battleback bback2 - name of the file for the wall battleback bgm - the BGM to play when you move into this region bgs - the BGS to play when you move into this region fade - the fade duration for the previous BGM in milliseconds common_event - the ID of the common event to run
When a region name is specified, the name of the map is changed to the region name. The map name window will also be shown automatically when you move into a new region.
To enable region battlebacks, you need to first check the “specify battleback”
box for the map.
You can specify the volume and pitch of the music files if needed. These are specified as percentages, where 100 means 100% volume/pitch, and 50 means 50% volume/pitch.
The fade duration is specified in milliseconds. Therefore, if you want the music to fade out for a second, you would write 1000.
For the common event, if you need access to the map region data via script calls, you can use
$game_player.region_id - the current region $game_player.last_region_id - the previous region
Example
Here’s map region 10 with the name “Grassland”, using Theme1 as the BGM, and a
Storm BGS with a lowered volume:
<map region: 10> name: Grassland bgm: Theme1 bgs: Storm 50 </map region>
Hi, I’ve installed the script and included a region but whenever I enter a new region (in this case region id 11) it only displays the name of the entire map and not the unique name. Can you think of anything that might cause this?
The same thing happens with your example in the script. If I remove the display name for the map then it shows nothing. I hope you can help.
Hi Hime
Excellent script, exactly what I needed. I can’t seem to get it to work correctly though. Will it only work with a specific RPG maker?
Yes, this is only for Ace. All ruby scripts are for Ace.
Great script. I’m using it to eliminate event copy and paste for exiting towns. I’m having a small issue though. The first town of my game is unexitable, and had copy pasted events that have the second party member tell the first to sneak out through the well so they aren’t caught.
I eliminated 80 copies of that by using your script, however; triggering the text with your script and a step backwards results in the BGM shutting itself off. if I have the script replay the same BGM, it starts the song over and has an awkward second pause. I just want to use the region to trigger my common event, I don’t want to force the music to change or go silent. In every other scenario that’s fine since it’s a map transition, but here it isn’t.
Is there a way to still call the common event by region stepping, but not have it automatically end the playing music?
I’ve updated the script so that if the new region has the same music name, it does not restart the BGM. See if that solves the problem.
Hey Hime!
This is such great script, thanks!
But I have a question:
Can you tell me how to add an "Script call"-option
Because I'm using a weather fx script and it should change the weather when entering another region
I would be glad if you helped me :]
I've added the option to call a common event, which allows you to use script calls (and any event commands).