This script allows you to create "overlay maps" on top of each other. In other words, map layering.
Overlay maps allow you to create much more visually attractive maps sinceyou now have control over different "layers", though you are unable to walk from one layer to another. For now anyways.
DownloadGet it at
Hime WorksHere is a demo:
https://www.dropbox.com/sh/sz6mpw5n2d6zxi2/...Maps%20demo.zipTutorialsHere are some tutorials that may be interesting
DescriptionAn overlay map is just another map, except it is drawn over your currentmap.
The overlay map comes with the following properties
- It does not need to use the same tileset as your current map. This meansyou can merge multiple tilesets together in a single map
- Events on the overlay map are processed in the current map, although you arestill not able to reference events from different maps.
- The player is unable to directly interact with the overlay map, or anything on the overlay map.
- The player, however, can indirectly interact with events on the overlaymap by setting switches or variables that will trigger the events.
- To transfer between layers, you must use player transfer events
- Map layers can re-use each other, so if one map uses another map as the top layer, then that map can use the previous map as the bottom layer
- Each layer has its own screen effects
[/*]
You can have an unlimited number of overlay maps, but note that having many map overlays will cause a significant drop in performance.
UsageCreate your maps as usual, taking into consideration how you want to layer them.
You might separate your maps into "floor" and "ceiling" or "floor, walls, ceiling", depending on how you like to organize things.
Note that because maps and overlay maps cannot interact with each other, all events on each overlay map are effectively bound to their own overlay map.
To assign overlay maps to a map, tag the map with
[code=auto:0]<overlay map: map_id order>
<overlay map: map_id order ox oy>
<overlay map: map_id order ox oy scroll_rate>
<overlay map: map_id order ox oy scroll_rate sync>
[/code]
The map ID is the ID of the map that will be drawn as an overlay.
The order determines whether it will be drawn above or below the current map.
If it is negative, then it will be drawn under.
If it is positive, then it will be drawn over.
If it is not specified, then it assumes to be over, in the order that the
tags are specified.
ox and oy determine the offset of the origin. By default, the map's origin
is drawn at (ox = 0, oy = 0), but you can change this if necessary.
The x-value specifies the horizontal offset. Positive values shift it to the
right, while negative values shift it to the left.
The y-value specifies the vertical offset. Positive values shift it down,
while negative values shift it up.
The scroll rate specifies how fast the overlay map scrolls per step taken.
The default scroll rate is 32, which means it will scroll
32 pixels per move, or basically one tile. Higher scroll rates mean the
overlay map will scroll faster for each step you take, while slower scroll
rates results in less scrolling for each step you take.
Sync specifies whether the overlay map is synchronized with the current
map. This means that any screen effects such as shaking or weather will affect
the overlay map as well.
0 = not synchronized
1 = synchronized
You can have multiple overlay maps by simply adding more tags. Note that the order they are drawn depends on the order you tag them.
ExampleA very simple example would be your party entering a castle. Rather than simply doing an event transfer, let's actually pass through the gates and into the inner yard.
I use a two-layer map. The base map will be the floor, to set the tiles where the player can walk. The overlay map will hold the walls and other tiles for the castle, but will not affect the passability of the floor tiles.
The floor will look like this. Notice that I have basically not drawn the gate and left it as some floor tiles.

Now I complete the castle by drawing the rest of it on my overlay map

These tiles do not affect my base map, but will make it look like a castle.
Finally, I test my results: walking in...

To the other side...
NotesI'm not a map artist, and so there are likely things I have not though of.
Feedback would be appreciated to improve this layering system.
This post has been edited by Tsukihime: Mar 20 2013, 08:02 AM