Plugin Request: Underpass Tile Plugin (Reversed Version of KDKW's Overpass.js)

[I have searched the JavaScript Releases forum as well as other posts in RPG maker forums, it seems that all existing posts I have found are not talking about the exact same thing as I want]



Hello guys, thank you for clicking in and check this thread out!

I'm making my 1st game and encountered an issue about the passibility of bridges:

In the original RMMV software, a bridge cannot be set to be able to be passed by both above and under it. However, the KADOKAWA provided a .js plugin that allows you to use regional id tiles to set up the "bridge" region, which allows both to go above it and under it based on the direction you go across the region, shown as the graph:
upload_2019-11-10_17-57-38.png

by default the region tiles are #254 and #255, I changed them to #39 and #40. Basically what it does is to set up a "gate" (by #39) to allow you to go above the tiles covered by #40 regions if you went through the gate, I guess.

This works perfectly fine with the bridge from the original RMMV tilesets, as well as most of the vertical-direction bridges from other tilesets.

However, it gets a little bit tricky with those horizontal bridges with handrails, as shown in the graph:
upload_2019-11-10_18-4-35.png
upload_2019-11-10_18-4-55.png
upload_2019-11-10_18-5-3.png


You see, it's made up of 3 parts: 1: the upper handrail, 2: the bridge, and 3: the lower handrail.
the 2nd part is supposed to be set up as "o" to go under the player and the 1st & 3rd parts are supposed to be set up as "star" to go above the player for best visual performance:
upload_2019-11-10_18-8-11.png
upload_2019-11-10_18-8-26.png

upload_2019-11-10_18-9-11.png
upload_2019-11-10_18-9-20.png




However, this does not work really well with the OverpassTile.js, and here is what happens:

if I assign the bridge region to the entire bridge, the character will go above the lower handrail when on the bridge:
upload_2019-11-10_18-12-0.png
upload_2019-11-10_18-12-28.png




and if I only assign the bridge region to the bridge-only parts, the parts that are covered by the lower handrail will not be passable if I enter the bridge through the gate regions, and in this case, the player will only be able to use half of the width of the bridge, and that feels really uncomfortable.
if I enter the bridge through the unassigned regions ( the part covered by the handrail), if I move up, if will go under the assigned region to the ground level:
upload_2019-11-10_18-14-19.png
upload_2019-11-10_18-14-51.png
upload_2019-11-10_18-17-10.png
←see his hair?
upload_2019-11-10_18-18-8.png




I think the problem is because the region tiles don't identify layers of the other tiles, thus it doesn't care if there are 2 tiles laying together with different priorities.
I tried to play around with different passage setups for the tiles and it doesn't work out.



This could be done by heavy use of events, but definitely not the best way for this.
So, what I think is perfect for this is to develop a plugin which does exactly the opposite of the KADOKAWA's OverpassTile: assign an "UnderBridgeRegion" by the same way, which put the player under the tiles in assigned region, if the player goes through the region via the gate region, like this:

upload_2019-11-10_18-23-39.png


It would be great if somebody is willing to spare some of their valuable time to develop this plugin!
I'm ok to pay a reasonable price for this (similar price as the Yanfly's plugins maybe?) if this would help, and it would be great if this is open for commercial usages.


Thank you for reading!
It is also greatly appreciated if you can mention some other way to fix this problem without heavy usage of other features
Hi there!
There is a video that explains how you can do that without the using of a plugin, maybe it can help you.
Unfortunately, it is in Portuguese(Brazil), but I think you can get it.


Alternatively, you can use an image editor of your preference, and change the graphic of the horizontal bridge to use 3 vertical tiles, instead of two. So, you can put the side of the ropes in another tile, one that the player can't walk, and set that to a STAR.
the OverpassTile.js that is in the steam DLC has a bug in it, you can find the OverpassTileFix.js someone out there.
but if yo want to make bridges smoother (instead using events as shown above) which trigger when the player is
below of above (require switches or variables) variable is in this case better for the event though.

But if you make a free game you can try Ocram_Passages plugin or find the OverPassFix.js plugin.
but that one doesn't take care of regions on the other side of the bridge.
Ocram_Passages however draw events and Tiles above player and see when the player is on the next
level or not. (it's free but probabl exspensive when you use it for commercial) but its worth it because
its one of the best (dont buy a license directly though) do that on the very very very end of your game
if you go commercial, otherwise its free to use in non-commercial.
Hi there!
There is a video that explains how you can do that without the using of a plugin, maybe it can help you.
Unfortunately, it is in Portuguese(Brazil), but I think you can get it.


Alternatively, you can use an image editor of your preference, and change the graphic of the horizontal bridge to use 3 vertical tiles, instead of two. So, you can put the side of the ropes in another tile, one that the player can't walk, and set that to a STAR.



Hello there! Thank you so much for your information! Events are definitely capable of solving this issue, but not actually my first choice because my maps are generally bigger in scale with multiple events going on, thus I want to try to avoid using extra events as much as possible... I did quite a few editing on my tilesets, but it seems that editing the tile images are not going to solve the problem, because if I combine the handrail image and the bridge together, they basically become one single tile, and the character is either going to be above or under both of them, not in between them, which could look weird...
But still, thank you so much for your suggestions!

the OverpassTile.js that is in the steam DLC has a bug in it, you can find the OverpassTileFix.js someone out there.
but if yo want to make bridges smoother (instead using events as shown above) which trigger when the player is
below of above (require switches or variables) variable is in this case better for the event though.

But if you make a free game you can try Ocram_Passages plugin or find the OverPassFix.js plugin.
but that one doesn't take care of regions on the other side of the bridge.
Ocram_Passages however draw events and Tiles above player and see when the player is on the next
level or not. (it's free but probabl exspensive when you use it for commercial) but its worth it because
its one of the best (dont buy a license directly though) do that on the very very very end of your game
if you go commercial, otherwise its free to use in non-commercial.


Hi there! Thanks for the reply!
I'm currently using both of the KDKW's OverpassTile.js and AndrewX's OverpassTile Fix, the ladder is amazing, but not exactly the one fixing this problem... I had tried Ocram's plugin out, and was prepared to pay and credit in case I'm going to use it for commercial, but the underpass feature didn't work in my game, I didn't quite figure out why....
Thank you so much for the information!

Hi there! Thanks for the reply!
I'm currently using both of the KDKW's OverpassTile.js and AndrewX's OverpassTile Fix, the ladder is amazing, but not exactly the one fixing this problem... I had tried Ocram's plugin out, and was prepared to pay and credit in case I'm going to use it for commercial, but the underpass feature didn't work in my game, I didn't quite figure out why....
Thank you so much for the information!
*the latter
@Lei-Ray I merged your posts together as we do not allow double-posting.
If you want to quote more than one post, please use the multiquote button/+Quote all posts and then insert them in your own post.
region 16 is on the bottom stairs/ladder and in front and behind of the bridge (saying the character is on the bottom)
region 17 on top of the stairs/ladder and in front and end of the bridge (higher level)
region 18 cover the bridge so it can walk over the bridge

there is a video how this works and also pictures.
if you read it carefully, you do understand, it's maybe a hard plugin in the begin to use, but when you understand it,
you can make a lot of things possible 🙂
region 16 is on the bottom stairs/ladder and in front and behind of the bridge (saying the character is on the bottom)
region 17 on top of the stairs/ladder and in front and end of the bridge (higher level)
region 18 cover the bridge so it can walk over the bridge

there is a video how this works and also pictures.
if you read it carefully, you do understand, it's maybe a hard plugin in the begin to use, but when you understand it,
you can make a lot of things possible 🙂
Thanks for the reply, I'm currently double checking this plugin based on your detailed information... Do you have any idea if this plugin works also in the area with more than 2 levels? as the graph below:
upload_2019-11-12_14-49-58.png
Im not sure, but I think it doesn't have 2 levels though because I didn't extensively tested that. but it had some other problems
as well.

either way a plugin can help, or event it which takes a bit of more time, but its working (also on mobile phones).
however you approach it, is up to you though 🙂
Hello, did anyone found/have the "OverpassTileFix"?
OverpassTileFix.js
becase i am having the same graphic problem...
I do have the plugin, but a better way is OcramPassages to make it easier.
I do have the plugin, but a better way is OcramPassages to make it easier.
i can't work with ocram passages, Overpass works better to me..
can you please pass me the plugin? thank you 🙂)
i can't work with ocram passages, Overpass works better to me..
can you please pass me the plugin? thank you 🙂)
attached the file, for anyone need it or cannot find it. (place it below OverpassTile)
Thank you very much!
but i do have this.. and it still doesn't fix my issue.. :/
Thank you very much!
but i do have this.. and it still doesn't fix my issue.. :/
what is your tile settings?

as I have no clue otherwise.
the are marked with "star" (means it should be displayed above player)
I need to test a few things how this works, and probably rewrite
it to make it fully work, as I got a hunch where the issue is.

it has also unknown code which I used before, but don't know how
it fit inside the code.

I can include the fix inside it, but the way Ocram_Passages is used is
extended for higher level, lower level, so it does work for bridge,
underground passages, etc.

I was thinking if I rewrite this, to use region as Z level, so you can do multiple
level bridges, but this require time (this doesn't check specific event Id's,
as it should be added as well to get this to work.

for bridges, it should be doable, but I need to dive into the core what does what
to code this correctly.

this takes also a couple of days, depending how fast you need it or not.
you can do it optionaly if you want so take as much time you want..
i found a minimal solution with events and switches..
Thank you! 🙂
I see what I can do without promises though =)
trying to fix the graphic issue too.

Edit:
@TheRamenGirl I did some messing around and alter the code here
and there, but whatever I do, the result kept the same, and stays below
the player for some reason.

I have no idea how to separate 0x10 (star passability) above the player
from ignore the region.

I think this is also bit above my coding experience at the moment on
how MV draw tiles.

I'm really out of options, but Ocram_Passages was it able as he did
seperate those somehow.

while you only need 2 regions too, it should be doable, otherwise,
event it (follow the video link above to change tilesets for passability).

regions can work better, but I'm out of options, sorry.

Original thread: https://forums.rpgmakerweb.com/threads/plugin-request-underpass-tile-plugin-reversed-version-of-kdkws-overpass-js.115137/