Connected Maps

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,403
Reaction score
3,387
First Language
English
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.



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.



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.


  • Recursive PositioningThis 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.

 
Last edited by a moderator:

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,114
Reaction score
11,464
First Language
English
Primarily Uses
RMVXA
Only yesterday I was struggling to work out how to connect 2 maps and now this arrives.

Thank your so much for saving my sanity (or rather, what's left of it)
 

estriole

Veteran
Veteran
Joined
Jun 27, 2012
Messages
1,033
Reaction score
339
First Language
indonesian
NICE script tsuki :D . quadruple thumbs up !!!!
 

pclaydon

Veteran
Veteran
Joined
Apr 7, 2012
Messages
77
Reaction score
20
First Language
English
Primarily Uses
does this still allow map names to appear when crossing over and for overlay maps to work or will they be unusable with this?
 

pclaydon

Veteran
Veteran
Joined
Apr 7, 2012
Messages
77
Reaction score
20
First Language
English
Primarily Uses
ok found a slight bug with map transfer events and thats f you make a map transfer to a house then the co-ordinates are messed up and when you exit then the connected maps are no longer connceted
 

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,403
Reaction score
3,387
First Language
English
Only yesterday I was struggling to work out how to connect 2 maps and now this arrives.


Thank your so much for saving my sanity (or rather, what's left of it)
It is only a test solution I have been looking for a more flexible solution similar to my overlay maps.


But I'm glad it has helped.


This is more of a solution for allowing people to make really huge maps.

does this still allow map names to appear when crossing over and for overlay maps to work or will they be unusable with this?
Use this add-on: http://forums.rpgmakerweb.com/index.php?/topic/10538-area-maps/


For overlay maps, I still need to address the overlay looping.


It will work after I figure out how to do that.

ok found a slight bug with map transfer events and thats f you make a map transfer to a house then the co-ordinates are messed up and when you exit then the connected maps are no longer connceted
Fixed.
 
Last edited by a moderator:

saikoare1490

Warper
Member
Joined
Feb 2, 2013
Messages
1
Reaction score
0
First Language
English
Primarily Uses
awesome..ive been wanting one of these scripts...hurray!! BD
 

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,403
Reaction score
3,387
First Language
English
Script has been updated.

I have added some shortcuts to the note-tag.

If you say "w" for the x-offset, that means the width of the (current) map.

If you say "h" for the y-offset, that means the height of the (current) map.

For example

<connect map: 12 w 0> # connect to the right edge of the map<connect map: 12 0 h> # connect to the bottom edge of the map<connect map: 12 w h> # connect to the lower-right corner of the mapThis might save you some time.

These shortcuts are not useful if you are using absolute positioning mode.
 
Last edited by a moderator:

NecroNeko

Veteran
Veteran
Joined
Jan 10, 2013
Messages
80
Reaction score
0
First Language
german
Primarily Uses
Would it be possible to use a ingame variable instead of the Map ID to determine which map is added to the top/right/left/bottom? This would result in the possibility to create more or less "random" dungeons as an example that are made of different pieces like a puzzle. It would take a lot of logic behind the scene to create them properly but... I could imagine it working. 
 

estriole

Veteran
Veteran
Joined
Jun 27, 2012
Messages
1,033
Reaction score
339
First Language
indonesian
maybe try this?

module TH  module Connected_Maps   Regex2 = /<connect[ _]map[ _]var: (\d+)\s+(w|-?\d+)\s+(h|-?\d+)\s*(\d+)?>/im  endendalias variable_load_notetag_connected_maps load_notetag_connected_mapsdef load_notetag_connected_maps variable_load_notetag_connected_maps res = self.note.scan(TH::Connected_Maps::Regex2) res.each {|result| map_id = $game_variables[result[0].to_i] offset_x = result[1] ? (result[1].downcase == "w" ? self.width : result[1].to_i) : 0 offset_y = result[2] ? (result[2].downcase == "h" ? self.height : result[2].to_i) : 0 recurse_limit = result[3] ? result[3].to_i : 1 @connected_maps.push([map_id, offset_x, offset_y, recurse_limit])}endput the snippet below hime script.

so instead using

<connect map: map_id offset_x offset_y>

you could use

<connect map var: variable_id offset_x offset_y>

but you must not use them both. since i think it might throw error :D .
 

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,403
Reaction score
3,387
First Language
English
There should not be an issue whether you designate by variables or direct designation by map ID.
 

redcachalot

Villager
Member
Joined
Sep 30, 2015
Messages
25
Reaction score
6
First Language
English
Primarily Uses
RMVXA
Hi!

Could you please explain the following:

1) where do we insert this note-tag in the VXAce editor <connect map: map_id offset_x offset_y>. Is it at the rightclick of a map and then going to map-properties -> notes ?

2) what is the name of "map_id" do we insert into this note-tag? 

For example, I have a game with most of my maps having location names. (I obviously dont have to insert my map's English name into this note-tag). So I've made two new maps named as default as map025 and map026.

Do I type this note-tag as <connect map: 24 w 0> if I want to connect  the right edge of map023 to map024?

3) On using your script, there is a Stackoverflow error message. This comes when I'm not trying to connect maps together, forcing me to remove your script from my game. I don't know if your script is clashing with the other scripts I've loaded (i.e. Yanfly engine etc etc)

4) Can these connected maps be viewed outside of playtest in the VXAce editor or is it only possible to do so in playtest?

P.S. Could you make a video on Youtube about this and post the link here? ... Pretty please!
 

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,403
Reaction score
3,387
First Language
English
1. Yes

2. For connections, you are connecting "other maps" to "this map".

Assuming you have two maps Map023 and Map024, and you are currently editing map 23's note

<connect map: 24 w 0>Will connect map 24 along the right edge of map 23.24 is the "other map", because you are currently editing map 23

3. I don't have the issue when I load it up in a new project, so it may be a compatibility issue with another script.

4. Only in-game.

For video, I may consider it.
 

trexman1234

Villager
Member
Joined
Feb 17, 2015
Messages
9
Reaction score
1
First Language
english
Primarily Uses
Can i put 2 notetags in one map?
 

JoePro

None Newb
Veteran
Joined
May 29, 2014
Messages
78
Reaction score
17
First Language
English
Primarily Uses
I have a couple of questions.


Is it possible to link a map to itself? Also, if MapA event(2) is triggered. Would that event then be triggered on any other map sharing the same id?
 

Sethorion

Villager
Member
Joined
May 8, 2015
Messages
19
Reaction score
7
First Language
English
Primarily Uses
I want to Utilize these other plugins in conjunction with this one. Is there likely to be a problem?


- ABS (Alpha Battle System)


- Terrax Lighting System (included in ABS)


- Orange Movement (This is what I am most worried about)


And does this maps plugin tax CPU more than usual?
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Finally did a test of sorts for the opening of my game... ... including this shot here.
My current status!?
It might be... QUAKE!!! :o
At least that was true several hours ago. :p
Quexp wrote on Shaz's profile.
I absolutely love your profile/pic! :kaoluv:
Stream will be live shortly with some Darkest Dungeon! Feel free to drop by!
I made a battle results screen for my minigame.. any feedback? :)

Forum statistics

Threads
100,686
Messages
978,416
Members
132,310
Latest member
hnhat
Top