Connected Maps

● ARCHIVED · READ-ONLY
Started by Tsukihime 20 posts View original ↗
  1. 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 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>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
  2. 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)
  3. NICE script tsuki :D . quadruple thumbs up !!!!
  4. does this still allow map names to appear when crossing over and for overlay maps to work or will they be unusable with this?
  5. 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
  6. ksjp17 said:
    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.

    pclaydon said:
    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.

    pclaydon said:
    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.
  7. pclaydon said:
    for overlay maps to work or will they be unusable with this?
    Overlay map script has been updated and now works correctly with this script.
  8. awesome..ive been wanting one of these scripts...hurray!! BD
  9. 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.
  10. 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. 
  11. 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 .
  12. There should not be an issue whether you designate by variables or direct designation by map ID.
  13. 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!
  14. 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.
  15. Can i put 2 notetags in one map?
  16. 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?
  17. 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?
  18. I don't think I understand how to use this.

    I made a test map of 17x17 with a grass field, a bit of water and a boat access, and then another map of 17x17 with pure water in a clean VXA project.

    I added <connect map: 2, w, h> in the notes of MAP001 and <connect map: 1, w, h> in the notes of MAP002, and yet I'm not being transitioned to MAP002 :/


    RPGVXAce_20221213_090958343.pngRPGVXAce_20221213_091002540.png
  19. Nanjo said:
    I added <connect map: 2, w, h>
    You realize that w & h are width and height right?
    on Hime's webpage it has a picture showing the maps connected.
    check that out. and test the settings
  20. Roninator2 said:
    You realize that w & h are width and height right?
    on Hime's webpage it has a picture showing the maps connected.
    check that out. and test the settings
    Yeah, I do. The script's comments say you can just use w and h instead of giving specific coord numbers.
    You can use the letter "w" for offset_x to mean the width of the map.
    You can use the letter "h" for offset_y to mean the height of the map.

    Also, I saw the picture but I honestly didn't understand it :LZSlol:

    I still did try giving individual coords though, like "7, 0" and then going with the boat to X 7 Y 0 but that still didn't really work :/