Terrain Tags Script V1.2
Created by Neon Black
What is it?
This scripts adds a few region tags to the maker that cause certain regions to affect movement on that particular tile on the map. These are some simple changes like roofs and slopes, and a few more complex ones like bridges. These changes are designed to make maps more dynamic and interesting as well as simplify things that would have had to be created using events previously.
How can I use it?
There are are 3 main types of terrain options each with their own uses.
- Slopes - Regions 16 and 17 by default. Slopes grant the player diagonal movement when they are walked into and off of. To use these, simply place the region on top of ALL tiles that have diagonal stairs on them. Passability is slightly modified on these to allow thin staircases to be created requiring less room to pass than normal diagonal movement. By default region 16 refers to stairs that go up and to the left while region 17 refers to stairs that go up and to the right.
- Cover – Cover or ceiling tiles are tiles that the player can walk under but cannot walk over. By default these tiles are tagged with region 18. Since autotile passabillity gets messed up when you make certain autotiles passable, I also added blocking terrain tags. By default these are region 19. These prevent all movement onto them.
- Bridge – This is the most complex set of tags to work and the reason I added a demo to mess around with. Bridges get tagged with region 20. These can be walked under or over. Since using bridges and cover tags will erase upper layer images when used, I also added a “catwalk” tag. This tag can be used to tag bridges that use the upper layer. In this case the player will ALWAYS be ABOVE the lower tile, and the UPPER tile will act as a bridge you walk over and under. There are two other region tags that determine if a bridge is currently in upper or lower mode and that are also used to prevent the player from stepping off of a bridge to somewhere they’re not supposed to. Region 22 by default is the lower tag. If the player steps on this, all bridges and catwalks will be changed to the player and events walk UNDER them. Region 23 switches it so that the player and events walk OVER them. One more thing to note, the player can only step off of a bridge or catwalk tile onto another bridge, catwalk, or similar switching region. This means if the player is UNDER the bridge, they can only walk on tiles marked with 20, 21, or 22. Once they step on region 22, they can walk around normally. The same applies to region 23 while they’re on top of bridges.
What does it work with?
This should work with most other scripts. Considering it overwrites a movement method and a passage method it probably will not work with scripts that affect movement.
How can I get the code?
Version 1.2 (base script, 12.22.2012) is available from my pastebin account here or my mediafire account here.
I would like to use this code.
This work is licensed under a Creative Commons Attribution-NonCommercial 3.0 Unported License.
Permissions beyond the scope of this license may be available athttp://cphouseset.wo...d-terms-of-use/.
This is a script I made in an afternoon and forgot about. I did this because I wanted a way for players to walk up diagonal stairways easily, but I ended up wanting to add a bit more. So I did. It took a bit of tweaking to get everything adjusted right, but I think I’ve finally got everything down. I know the bridge tags are a bit hard to use, but if you skip those and just use the other tags it’s still a pretty awesome script. As always, enjoy!
Edited by Neon Black, 22 December 2012 - 01:50 AM.