Connected Maps

ConnectMaps1

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.

Download

Script: download here

Usage

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.

connectMaps2

Positioning Modes

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.

  1. 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.connectMaps3
  2. 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>

    connectMaps4

There are several things to keep in mind about connected maps

  1. 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)
  2. You must begin from the top-left and connect maps to the right or bottom. You cannot connect maps to the left or top.
  3. Negative offsets are supported, but they will simply truncate your map if you shift it to the left or top.
  4. 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.
  5. 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.
  6. 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.

You may also like...

69 Responses

  1. It’s very interesting! If you need help, look here: ARA Agency

  2. sklep online says:

    Hi! Do you know if they make any plugins to assist with SEO?
    I’m trying to get my blog to rank for some targeted keywords but I’m
    not seeing very good gains. If you know of any please
    share. Thank you! You can read similar text here:
    E-commerce

  3. ecommerce says:

    Hello, I read your blog like every week. Your story-telling
    style is witty, keep it up! I saw similar here: Sklep online

  4. ecommerce says:

    Thanks for ones marvelous posting! I actually enjoyed reading it, you can be a great author.I will
    ensure that I bookmark your blog and will often come back at some point.
    I want to encourage that you continue your great
    job, have a nice weekend! I saw similar here: Sklep online

  5. Wow, marvelous weblog structure! How lengthy have you been blogging for?
    you make running a blog look easy. The entire glance of your web site is great, as smartly as the
    content material! You can see similar here sklep internetowy

  6. Lucette says:

    I’m really inspired along with your writing abilities and also with the layout
    in your weblog. Is this a paid theme or did you
    customize it yourself? Anyway keep up the nice quality writing, it’s uncommon to
    see a great blog like this one today..

  7. Natishia says:

    Hey there I am so grateful I found your blog, I really found you by accident, while I was researching
    on Google for something else, Anyways I am here now and would just like to say
    thanks a lot for a tremendous post and a all round thrilling blog (I also love the theme/design), I don’t have time to look
    over it all at the moment but I have bookmarked
    it and also added in your RSS feeds, so when I have time
    I will be back to read more, Please do keep up the awesome job.

  8. Phelan says:

    Nice post. I was checking constantly this blog and
    I’m impressed! Very useful info particularly the last part 🙂 I care for such info much.
    I was looking for this certain info for a long time. Thank you and best of luck.

  9. Vontrell says:

    Hello would you mind letting me know which web host you’re working with?
    I’ve loaded your blog in 3 different internet browsers and I
    must say this blog loads a lot faster then most.

    Can you suggest a good internet hosting provider at a fair price?

    Many thanks, I appreciate it!

  10. Tekeshia says:

    I think the admin of this web page is actually working hard for his website, for the reason that here every
    material is quality based data.

  11. Tykia says:

    Everything is very open with a very clear clarification of the issues.
    It was really informative. Your site is useful. Thanks for sharing!

  12. Shanyn says:

    Hi there, i read your blog occasionally and i own a similar one
    and i was just wondering if you get a lot of spam feedback?
    If so how do you protect against it, any plugin or anything
    you can suggest? I get so much lately it’s driving me crazy
    so any help is very much appreciated.

  13. Lakysha says:

    After I initially left a comment I appear to have clicked on the -Notify me when new comments
    are added- checkbox and from now on each time a comment is added I
    recieve four emails with the exact same comment.
    Is there a means you can remove me from that service?
    Cheers!

  14. Billye says:

    Appreciation to my father who stated to me on the topic of this blog, this webpage is truly
    awesome.

  15. Sadie says:

    I enjoy what you guys tend to be up too. This kind of clever work and reporting!
    Keep up the awesome works guys I’ve included you guys to
    my own blogroll.

  16. GethN7 says:

    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.

  17. GethN7 says:

    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.

  18. Burandon says:

    I didn’t understood. Can you please create a demo?

  19. Blackikun says:

    Hello Hime-san,

    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 🙂

    • Hime says:

      I haven’t had any plans to port it to MV.

      • Chris says:

        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.

  20. Mireille says:

    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?

    • Hime says:

      Do you mean, transferring to a regular map, or a map that is connected to other maps?

      • Mireille says:

        Transferring TO a regular map, FROM a map that’s connected to other ones.

        • Hime says:

          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.

          • Mireille says:

            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.
            https://onedrive.live.com/redir?resid=B48A61A4948805BD!2432&authkey=!AOUCqqO-Cy08dUo&ithint=file%2crar

            Let me know if you have problems opening the project. Thanks again!

          • Mireille says:

            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.

        • Hime says:

          Script has been updated. This should address the transfer issue.

      • Mireille says:

        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

          • Mireille says:

            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”

          • Hime says:

            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?

          • Mireille says:

            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.

          • Hime says:

            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?

  21. Rémi Ferment says:

    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 !

  22. Conner says:

    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 😛

  23. Sales_Kital says:

    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?

    • Hime says:

      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.

  24. JBCaptain says:

    This isn’t working for me, it shows this message:
    “Script ‘Connected maps’ line 198: NameError occurred.
    undefined method ‘setup’ for class ‘Game_Map’

  25. Doesnt’ seem like this works with Sapphire Action System, any way you know of to make it work?

  26. Master Daisy says:

    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 ?

    Thanks

  27. Tsukihime says:

    Replace “snowyplace” with the numerical ID of the map. For the offsets, you just pick numbers, or say “w” or “h”.

    <2 0 h>
    

    Will place map 2 under the current map.

    • Pizzahut92 says:

      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.

  28. Tsukihime says:

    Omit the < characters > otherwise the blog eats them up. Or use the appropriate escaped forms if you know them (ampersand lt;)

  29. Pizzahut92 says:

    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:

    |

  30. Pizzahut92 says:

    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.

    • Tsukihime says:

      Yes, you would put it in the map properties. What is your note-tag

      • Pizzahut92 says:

        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.

  31. FireSpirt says:

    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.

    • Tsukihime says:

      These are one-way connections, so if A is connected to B, then you need to manually make B connected to A as well.

      • FireSpirt says:

        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

  32. chaos17 says:

    “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 ?

  33. 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?

Leave a Reply to Hime Cancel reply

Your email address will not be published. Required fields are marked *