By default, RPG Maker displays one map when you are in the map scene. However, this map can be manipulated at runtime.
This script allows you to connect maps together, providing a seamless transition from one map to another (because there is no actual transition). You can create a map in separate parts and then connect it all together to produce one large map.
The editor has a limitation of 250000 tiles, or a 500×500 map. Using map connections allows you to overcome this limitation in the game.
Script: download here
To connect maps together, use note-tags in each map to specify which maps should be connected to it:
<connect map: map_id offset_x offset_y>
The map_id is the ID of the map that you want to connect to the current map, and the offset_x and offset_y is the position that the new map will be placed.
x-values shift it horizontally. Positive x-values shift it to the right, negative-x values shift it to the left.
y-values shift it vertically. Positive y-values shift it down, negative y-values shift it up.
Here is an example demonstrating how to connect map 2 to map 1 side-by-side.
This script provides two types of positioning for map connecting. Only one may be used at any time. By default it is “recursive positioning” but you can change this in the configuration.
- Absolute Positioning. This mode specifies all offsets to be in absolute coordinates, where the origin is fixed at the upper-left corner of the current map you are editing.
- Recursive Positioning. This mode specifies all offsets to be relative to the parent map. The origin is located at the upper left corner of each map.For example, if map 2 connects to map 1, and map 1 connects to map 2, then we can have a looping map. A special “recurse limit” argument is provided in order to tell the map when to stop looping. By default, this is 1.
<connect map: map_id offset_x offset_y recurse_limit>
There are several things to keep in mind about connected maps
- They all use the same tileset, so you cannot connect two maps with two different tilesets (you can, but the tileset will automatically change to the current map’s tileset)
- You must begin from the top-left and connect maps to the right or bottom. You cannot connect maps to the left or top.
- Negative offsets are supported, but they will simply truncate your map if you shift it to the left or top.
- Maps with different dimensions will result in empty, impassable black spots. You can decorate it with a parallax image so it isn’t just a black spot, but space doesn’t fill up by itself.
- All event ID’s are automatically adjusted, as are event commands. However, script calls are not updated, so if you are using any script calls that deal with events, you may need to re-consider your design.
- Any other property that relies on separate instances of the map are also gone (parallax maps, for example\
So unfortunately this is a very simple implementation of joining maps together. A better solution will be needed in order to fully combine maps together with separate tilesets, parallaxes, and so on.
Excuse me, but how would I combine four maps of the same size so they all would loop?
I need to make a large world map and need them to seamlessly loop together.
Excuse, but how would I combine four maps of the same size so they all would loop?
I need to make a large world map and need them to seamlessly loop together.
I didn’t understood. Can you please create a demo?
i really hope it´s okay to ask… but is there any chance that you have plans for porting this one to MV?
I have searching for a long time, but i couldn´t find anything about some kind of plugin. It would really be awesome if you have any plans for a port 🙂
I haven’t had any plans to port it to MV.
It’s a shame you don’t plan to port this to MV, because I’m looking for a plugin exactly like this for my game…I’m using the new MV3D plugin, and I want players to be able to see the entire world at once, not just one map at a time.
For some reason events that transfer the player to another map are not working on the connected maps. They send the player to the correct map but the wrong tile, and sometimes the player’s sprite doesn’t show up. There appears to be no way to calculate (from the coordinates in the command) which wrong tile the event will transfer to, although it is the same every time I test it. All transfer commands from the top-left map work fine, but commands from the other connected maps don’t work, regardless of which map the player is on at game start. I’m also using your area maps add-on but this problem was happening before I added that script.
Do you have any idea what’s causing this?
Do you mean, transferring to a regular map, or a map that is connected to other maps?
Transferring TO a regular map, FROM a map that’s connected to other ones.
I created a new project, created two maps, connected them together, created a third map, and then created a transfer event from the connected map to the third map. Transfer occurred as expected.
So maybe there’s more to it than just a simple transfer. Create a new project reproducing the issue and I can look at it.
Thanks for looking into it. In trying to recreate the problem I discovered that the cause is adding more scripts. When the project only had the connected maps script, transfers worked fine, but when I added unrelated scripts, the transfers were broken. I tried a number of different scripts and they all caused transfers to break, and I only needed to have one additional script for that to happen. Another one of your scripts is installed in this test project.
Also, the degree to which the transfer destination was wrong seems to be related to the size of the destination map, which is why that map is so big with so much unused space.
Let me know if you have problems opening the project. Thanks again!
Hi again Hime, I found the previous version of this script (April 2 2013) in the Crystal Pokemon Engine pack, and I’ve been playing around with it. Looks like that version handles transfer events perfectly, but of course neither reference events nor the patch you provided work with it.
Script has been updated. This should address the transfer issue.
Your Reference Events script also appears not to be working on the connected maps, but the events I’m trying to clone are transfer events so I’m not sure XD
Install this patch under both scripts: http://himeworks.com/redirect.php?type=script-patch&name=th_connected_maps_reference_events
The new version works! Thank you so much for your help!
Unfortunately it’s causing an error with the patch for reference events whenever the player transfers to a map that is connected and has cloned events on it. The error says “line 22: NoMethodError occurred. undefined method `id=’ for nil:NilClass”
That error suggests that there is no reference event with the ID that is specified in the note-tag. Are you trying to reference events that will be added to the map as a result of map connections?
No, the cloned events all reference events that are right next to it on the same map (2 or 3 adjacent tiles that all trigger the same event). I tried adding map IDs to the reference note tags and now the connected maps load with no error, but events from one map are offset onto the other (connected) one.
Do you mean that an event on map 2 that references another event on map 2, will reference the wrong event when map 2 is connected to map 1?
Hi, I’ve a problem with this script, when I connect two map and I test my game, I’ve a screen error who say : “Script ‘Connected Map line 171: NameError occurred.”, Help me please !
I would like to use this script in my commericial game. As long as credit is given, is this fine? It’s just gonna be like a 5 dollar game on steam when Im done 😛
For commercial inquiries please use the contact form.
A friend told me that a fully evented 500×500 map would cause massive ammounts of lag. I was wondering if this script works as a “chunk loading” type thing similar to minecraft or fallout where only the maps directly around the player are loaded.
Like, if someone made a 500×500 with this system and maps that were 25×25 each or so, would the 500×500 made with this script have less lag than the 500×500 made without it?
No, this script simply takes a bunch of maps and joins them together to form a larger map. The final result for the engine is the same as having a 500×500 map in your editor.
This isn’t working for me, it shows this message:
“Script ‘Connected maps’ line 198: NameError occurred.
undefined method ‘setup’ for class ‘Game_Map’
Did you install it properly?
Doesnt’ seem like this works with Sapphire Action System, any way you know of to make it work?
I have no experience with that battle system but maybe someone else might.
well, i just started using this script, ( i didn’t read the whole Usage) but after connecting two maps,
first of all ( i am using different tilesets for each map) so when i connect Map 1 (tilesets ID 10) with map 2 ( tilesets ID 12)
the Tilesets in map 2 dont show up….
which mean its only using the tilesest from map 1….. ( but it’s working if both map have the same tilesets)
is there any way to connect them with different tilesets ?
No, unfortunately this script currently only supports one tileset.
Thanks, i will be looking forward your next scripts …
Replace “snowyplace” with the numerical ID of the map. For the offsets, you just pick numbers, or say “w” or “h”.
Will place map 2 under the current map.
Alright, that seems to have worked. I’ve gotten it to where I can put the note tag for “snowyplace” to allow a connected map, but I can’t figure out how to have “DesertPart1” have snowy place connected above it. I tried putting a 50 instead of a 0 but that didn’t do anything.
Ya that’s a limitation with this script at the moment you can only connect to the right and bottom. I will have to figure out how to add support for that. You can try the version that Crystal Noel posted in the comments above.
Omit the < characters > otherwise the blog eats them up. Or use the appropriate escaped forms if you know them (ampersand lt;)
Ah. The tag was (less than sign)connect map: snowyplace w0 h50(greater than sign)
The formatting didn’t show up in the email notification, and I can’t see the comments past the last one I put, but what I put into the map properties notes for “DesertPart1” was:
I’m a bit new to the world of RPG maker scripting, so I was a bit confused on how to implement your script. I don’t know where to place the note-tags. You say to place them in the “map object” but I don’t know where to put it. I tried the map properties, but I’m either putting it in the wrong place or making an error. If you need further explanation, I can easily provide you with such information.
Yes, you would put it in the map properties. What is your note-tag
Well, I have a map called “DesertPart1” and another named “snowyplace”. I want “snowyplace” to be above the former, and each map is 50×50, so I believe I put “” I’m pretty sure I’m just misinterpreting your instructions.
It would be nice if this Script would also support -x and -y or at least load the full Map even if the Chars aren´t on the main Map.
These are one-way connections, so if A is connected to B, then you need to manually make B connected to A as well.
But if the Map scheme is something like:
Field | Field | Field
Field | Village | Field
Field | Field | Field
and you start in the Village you can´t connect all the Maps together
or am I just to stupid
Oh, hmm I see your point. Let me see how I can implement two-way connections.
“Any other property that relies on separate instances of the map are also gone (parallax maps, for example)” I am sorry to ask but my english isn’t really good. Does this mean that script won’t work with parallax and overly map ?
If you have two different maps, each map can have its own parallax image for the background. When you connect maps together, it becomes a single, large map. It’s no longer a bunch of separate maps with their own stuff.
So if I connect my maps I won’t need any teleport ? Sorry for the question but it’s hard for me to picture it without a demo.
Yes, if you look at the screenshot those are 4 separate maps joined together as one large map.
Okay, I will give it a try during the week. Thanks for the reply 🙂
I was able to successively modify the script and its add-on to work with negative offsets without a problem. Do you want to see the scripts?
Sure that would be great.
Your script did not work for me. I applied it to my maps, but I got a black screen. Do you use different note-tags?