Jump to content

Recommended Posts

This script allows you to connect maps together, providing a seamless transition from one map to another. You can create a map in separate parts and then connect it all together to produce one large map. This should in theory allow you to exceed the 500x500 limit imposed by the editor.

 

ConnectMaps1.jpg

 

Download

 

Get it at Hime Works

Add-ons: Area Maps - convert each connected map into a separate area

 

Usage

 

It is very easy to connect maps. Simply 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.jpg

 

Positioning Modes

 

This script provides two types of positioning for of map connecting. Only one may be used at any time. By default it is "recursive positioning", but you change it 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.

     

    ConnectMaps3.jpg

     

  • 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.jpg
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.

     

    ConnectMaps5.jpg

Edited by Tsukihime

Share this post


Link to post
Share on other sites

How do events work with this?  For example: Map 2 has an autorun event and is connected to Map 1.  Will it run as soon as you step foot in the Map 1 area or will it take effect when you get inside the Map 2 area?

Share this post


Link to post
Share on other sites

That's what I was thinking.  Too bad.  :(  I was going to connect all my maps (My mapping is like a pokemon game), but that wouldn't do so well with events all over the place.  XD

Share this post


Link to post
Share on other sites

Sorry for this, but anyone got a demo for this? either im really stupid or im just too slow to understand but i have read it over and over, i still can't get it to work when i try ingame :/

 

A demo would be appreciated! thanks

Share this post


Link to post
Share on other sites

I wish there was an example for this. I gotta keep playing but its a bit confusing as I'm a visual seeing learner. Like I gotta see it in action then tear it apart. 

 

I'm trying just basic Absolute Positioning all my maps are 100x100.

Share this post


Link to post
Share on other sites

The best I could get is map 2 to connect to map 4. I tried everything possible to get map 4 to connect to map 2. I also made a small map trying figure it but I guess I'm a bit of an idiot.

 

OvfpqTu.png

Share this post


Link to post
Share on other sites

Looking at the code, I never added support for connecting maps to the left or from above (eg: negative offsets)

I can look at it again, but I don't remember why it was never done.

Edited by Tsukihime

Share this post


Link to post
Share on other sites

Looking at the code, I never added support for connecting maps to the left or from above (eg: negative offsets)

I can look at it again, but I don't remember why it was never done.

Ahh so I can't do like an entire grid based world. Okay thanks for the info. 

Share this post


Link to post
Share on other sites

Ahh so I can't do like an entire grid based world. Okay thanks for the info.

 

You can. It just doesn't support negative offsets right now.

 

Would this allow you to place one map on top of another?

Yes, but they should be the same tileset.

Edited by Tsukihime

Share this post


Link to post
Share on other sites

 

Ahh so I can't do like an entire grid based world. Okay thanks for the info.

 

You can. It just doesn't support negative offsets right now.

 

Would this allow you to place one map on top of another?

Yes, but they should be the same tileset.

 

So if I'm still building North South East and West do I just start at like a crazy number like 100,000?

Share this post


Link to post
Share on other sites

So if I'm still building North South East and West do I just start at like a crazy number like 100,000?

No, since all positions are based on the current map.

 

In your grid example, if you started at map 7, then you can do two things

 

1. Connect 2, 6, and 4 to map 7 (using absolute connections)

2. Connect 2 and 6 to map 7, then connect 4 to either map 2 or map 6 (using relative connections)

 

Because the script currently does not accept negative offsets, you can only realistically start on map 7. Every transfer needs to go to map 7, and you'll have to figure out how to set the correct position (using variables would be the easiest way. Set the coordinates before you transfer, and then use them in the transfer).

 

Note that for compatibility reasons, I would recommend to use the same map consistently for transfers. This is because some scripts, for example, use the map ID to store information. Self-switches are your biggest concern, since they require the map ID and event ID to get the correct data.

 

In your grid example, transferring to map 4 is not the same as transferring to map 7 to the engine, even if you set them up to both connect things together such that you achieve the same result. You might have the same event appear on both maps, but if you set a self-switch on one map for that event, it wouldn't be set in the other map.

Edited by Tsukihime

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×
Top ArrowTop Arrow Highlighted