Jump to content


Photo

Terrain Tags

terrain cover bridge slope map

  • Please log in to reply
24 replies to this topic

#1 Neon Black

Neon Black

    The Classy Prostitute

  • Member+
  • 678 posts
  • LocationEastern US
  • Primarily UsesRMVX Ace
  • First LanguageSarcasm

User's Awards

           

Posted 16 December 2012 - 11:21 PM

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 look like?
Spoiler



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.
Posted Image
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/.

Author’s Disclaimer:
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.

  • Archeia, Dr.Yami, Mihel and 15 others like this

#2 hyde9318

hyde9318

    Go to sleep....

  • Members
  • 1,516 posts
  • LocationMichigan, USA
  • Primarily UsesRMVX Ace
  • First LanguageEnglish

Posted 16 December 2012 - 11:48 PM

Whoa, this is cool. Very cool. This looks like a must-use for many different games. Awesome work on this!


Click a button below to visit each link!
6gxXsGZ.pngoKXD8jP.pngXd3SeYN.pngr2PMckB.pngpyCqUjU.pngyNspyrJ.png


#3 ディーノス

ディーノス

    Make a new destiny!

  • Members
  • 144 posts
  • LocationIndonesia
  • Primarily UsesRMVX Ace
  • First LanguageIndonesian

Posted 17 December 2012 - 12:11 AM

cool...
i'm gonna use this script for my project i guess

Member of

ryugas10.png

 

My Project (take this userbar if you want to support me :D )

userba10.png

 

 


#4 estriole

estriole

    Advanced Member

  • Members
  • 533 posts
  • Primarily UsesRMVX Ace
  • First Languageindonesian

Posted 18 December 2012 - 12:34 AM

start downloading the demo.... perhaps screenshot of how you set the terrain tag to set the bridge will be helpful information.
i'm curious how to set that thus i download the demo :D. finish downloading...

#5 Neon Black

Neon Black

    The Classy Prostitute

  • Member+
  • 678 posts
  • LocationEastern US
  • Primarily UsesRMVX Ace
  • First LanguageSarcasm

User's Awards

           

Posted 18 December 2012 - 01:19 AM

That's actually a really good idea! Thanks, I'll do that.

#6 Neon Black

Neon Black

    The Classy Prostitute

  • Member+
  • 678 posts
  • LocationEastern US
  • Primarily UsesRMVX Ace
  • First LanguageSarcasm

User's Awards

           

Posted 22 December 2012 - 01:52 AM

UPDATE version 1.1 to version 1.2:
  • Fixed an issue where maps returned to by loading a game do not always function properly. If this issue persists, please post details and I will get it resolved.
You can get the new version in the main post.
  • Archeia likes this

#7 pinkapinkie

pinkapinkie

    Advanced Member

  • Members
  • 68 posts
  • Primarily UsesRMVX Ace
  • First LanguageItalian

Posted 04 January 2013 - 11:09 AM

I encountered a bug. Try placing the cover region on a normally passable tile, or a walltop, and in the same map put the same tile but without the cover region. Now save over that particular tile, and reload. You should be actually stuck in place

I support:

 

shopbutton_zps80c596c5.png


#8 Neon Black

Neon Black

    The Classy Prostitute

  • Member+
  • 678 posts
  • LocationEastern US
  • Primarily UsesRMVX Ace
  • First LanguageSarcasm

User's Awards

           

Posted 04 January 2013 - 01:17 PM

Most likely the same bug as my bridge bug. I'll fix it after my new laptop arrives.

#9 thespartantraveler

thespartantraveler

    Advanced Member

  • Member+
  • 63 posts
  • LocationNewfoundland
  • Primarily UsesRMVX Ace
  • First LanguageEnglish

Posted 13 February 2013 - 08:23 PM

Great script! I did encounter a problem though, if a npc sprite is walking on the bridge when you walk under it, they fall through to the ground level.  The quick fix is to not have any sprites on the bridge, but is there a way to have them not fall through?



#10 Neon Black

Neon Black

    The Classy Prostitute

  • Member+
  • 678 posts
  • LocationEastern US
  • Primarily UsesRMVX Ace
  • First LanguageSarcasm

User's Awards

           

Posted 14 February 2013 - 08:45 AM

Yeah, there's sadly nothing that can be done about this.  Events and the player are always on the same level, it's actually the bridge that moves.  Sorry.



#11 thespartantraveler

thespartantraveler

    Advanced Member

  • Member+
  • 63 posts
  • LocationNewfoundland
  • Primarily UsesRMVX Ace
  • First LanguageEnglish

Posted 14 February 2013 - 09:53 AM

No worries Neon Black, its a little sad, but compared to how awesome the script is, its only a super minor thing.  



#12 Tsukihime

Tsukihime

    Advanced Member

  • Members
  • 5,377 posts
  • LocationToronto
  • Primarily UsesRMVX Ace
  • First LanguageEnglish

User's Awards

        

Posted 02 March 2013 - 11:41 PM

Two things while I tested this script.
Summary

1: allow users to specify an array for each type of terrain. Maybe regions 18,19,20 should be cover tiles, because one region is not enough when it comes to tile swapping.

2: layer 0 tiles are replacing layer 2 tiles when they are treated as cover tiles. Would it be possible to have the layer 2 tiles remain on top?

Anyways here are the details.

1. I just used this script to create secret corridors with the "cover" region with basically no effort required.

transparentTile5.jpg

Using the Tile Swap script in conjunction with this, you can do a region swap on the cover tiles
to display hidden paths (like how it was done in final fantasy 5 if you have the appropriate ability/class)

Find_Passages.png

However, a single map may have a lot of cover regions, but not every covered region is necessarily a hidden path.

I would suggest changing the configuration to support an array of region ID's, and possibly have it local for each map. This way, I might assign 18 and 19 as my cover tiles, and then quickly do a region swap on 18 to "show" hidden paths, while 19 will just be the regular cover tiles that don't change.

2. Here is another issue.
I loaded up the sample "Snow Castle (exterior)" map and wanted to "walk through the gates into the courtyard" as follows:

overhead1.jpg

But this doesn't look right.
Here is the original map in the editor

overhead2.jpg

And here is how I set up the region tiles

overhead3.jpg

I guess it would be this part
data[x, y, 2] = data[x, y, 0]
data[x, y, 0] = 0
tileset.flags[data[x, y, 2]] = 0x10

Not sure if there is any way to avoid replacing layer 2 stuff.

Edited by Tsukihime, 03 March 2013 - 01:24 AM.

My Scripts. Go here for Bugs and Requests.
Want to write a tutorial? Submit a community tutorial!

himeworks011.png

Like on Facebook: HimeWorks
Follow me on Twitter for the latest updates! @HimeWorks

#13 Neon Black

Neon Black

    The Classy Prostitute

  • Member+
  • 678 posts
  • LocationEastern US
  • Primarily UsesRMVX Ace
  • First LanguageSarcasm

User's Awards

           

Posted 03 March 2013 - 06:56 PM

For issue 2, currently there's not.  I do have a project I just decided I wanted to take on, so I may be able to fix that issue soon.

 

I'm going to add a few more tags in version 1.3, so I can add those things in for you.  This is my next project (I hope).



#14 Tharis

Tharis

    Newbie

  • Members
  • 6 posts
  • Primarily UsesRMVX Ace
  • First LanguageEnglish

Posted 25 May 2013 - 07:26 PM

Currently I have to say I love this script, there is just one problem I am coming across with it and it's the same issue Tsukihime is having.

 

Hopefully there is a work around soon. Hopefully there is a work around soon.

 

Map_Issue_zpsbd0f7092.png


Edited by Tharis, 25 May 2013 - 07:31 PM.


#15 Zebtal

Zebtal

    Newbie

  • Members
  • 1 posts
  • Primarily UsesRMVX Ace
  • First LanguageFrench

Posted 31 May 2013 - 03:42 AM

Just a quick post to say that your script is great, but I have this issue :

 

UPDATE version 1.1 to version 1.2:

  • Fixed an issue where maps returned to by loading a game do not always function properly. If this issue persists, please post details and I will get it resolved.
You can get the new version in the main post.

 

 

(concern for don't loading the script after loading the game) so I have to change any of the maps in which I can have this bug (eg maps of houses with a small tile to cover the character on the entrance and look pretty) otherwise at game loading the game character still stuck in the map : (

 

 
I hope version 1.3 is nearly done, and that still receive messages will motivate you to quickly post this version :)
 
Again thank you for this script and good luck for the rest.

Edited by Zebtal, 31 May 2013 - 03:43 AM.


#16 Merancapeman

Merancapeman

    Newbie

  • Members
  • 1 posts
  • Primarily UsesRMVX Ace
  • First LanguageEnglish

Posted 18 June 2013 - 05:28 PM

This is unfortunate, I was hoping there was a fix for that issue. As it stands my ladder looks funky when walking under it and half of it disappears, heh. However, I love this script all the same, and appreciate your work. Hope you fix this soon!



#17 Eatorl

Eatorl

    Newbie

  • Members
  • 2 posts
  • Primarily UsesRMVX Ace
  • First LanguageEspañol

Posted 08 August 2013 - 05:18 PM

Hello.

I see this Script as a powerful tool to complement the integrated functions of RPG maker Vx Ace! Thank you for develop it (:

However, there are certain issues as Tsukihime mentioned. The most visual and alarming problem would be the one of Issue 2 (I believe)
So I decided to take a look on that and try to contribute with some ideas:


Here is what I came with:


1.- Here you can see the Region distribution of a normal map.

 

Spoiler


2.- Now with the Script working:

 

Spoiler

Note: As you can see there are more elements than the first picture. Thats because:


3.- The Event Editor mode in the Rpg maker vx ace window

 

Spoiler

So basically what I am doing to solve the problem (kind of) is use Events as Tiles.

I do not know if this would cause a tremendous lag but if it's used moderately it could make the job.


You can spot the difference of the event and the tile with the big dragon statue, as a tile it looses its presence but the small dragon statues as events (above the player) remain visible.

I hope I could help!

Keep it on Neon Black. I would love to see an improved version of this great script!

Bye


Edited by Eatorl, 15 August 2013 - 10:54 AM.


#18 Shaz

Shaz

    Advanced Member

  • Global Moderators
  • 15,947 posts
  • LocationAustralia
  • Primarily UsesN/A

User's Awards

        

Posted 08 August 2013 - 05:34 PM

You need to use [] to enclose tags, not <>
Avatar by Nio Kasgami

18169c77d45bf093.jpg18169c77ee71a21e.png18169c77eb8a1676.png47e3eb338e149021.png47e3eb33011708d4.jpg47e3eb33c3fcdd85.jpg43b995025d32e369.jpg18169c77d1548695.jpg18169c77d05acf45.jpg43aa62e584d51b37.jpg18057e87da521186.jpg

Amaranth Games
http://www.amaranthia.com

#19 cityshrimp

cityshrimp

    Newbie

  • Members
  • 1 posts
  • Primarily UsesRMVX Ace

Posted 16 August 2013 - 02:49 PM

I’ve found a weird bug where some wall tiles become impassable even with no tags on them. To reproduce:
1. Place a region id 18 on a wall tile (like the top of a hill or roof)
2. Actor can walk around the top of the hill or roof
3. Transfer out of the map
4. Transfer back into the map
5. All tiles that look exactly like that wall tile becomes impassable even though they were fine previously.

After hours of research, it appears the problem is that Terrain Tags script will mess with the tileset flags. Upon loading the map a second time, the tileset flags will be messed up for some tiles.

To fix this, you need to reload the tileset file every time a map is loaded. The easy way to do that is add a line to Game_Map.setup, as such:

def setup(map_id)
$data_tilesets = load_data(“Data/Tilesets.rvdata2″) #Add this line
@map_id = map_id
@map = load_data(sprintf(“Data/Map%03d.rvdata2″, @map_id))
@tileset_id = @map.tileset_id
@display_x = 0
@display_y = 0
referesh_vehicles
setup_events
setup_scroll
setup_parallax
setup_battleback
@need_refresh = false
end

I've tested this on my game, and it doesn't cause any performance issues when loading maps.  I don’t know how many people care to walk on top of hills or roofs, but this may end up fixing some other weird problems when the map is loaded a second time.



#20 KitsuneKokuen

KitsuneKokuen

    Newbie

  • Members
  • 5 posts
  • Primarily UsesRMVX Ace
  • First LanguageEnglish

Posted 26 December 2013 - 03:55 AM

I'm having a problem where not all the cover tiles I have marked allow the character to pass under. 5YZcz.png

 

I have the tiles that are blank in that "T" Shape marked as 18 like all the rest when I playtest. But I still cant manage to pass under them. My goal is just to have the player be able to look like he goes behind the building. Any help is appreciated. Thanks.

 

Edit: Nevermind, I figured it out. I had event's on the roof that werent visible without realising it. Opps lol. Great script.


Edited by KitsuneKokuen, 26 December 2013 - 04:08 AM.






Also tagged with one or more of these keywords: terrain, cover, bridge, slope, map

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users