Hello Folks,
i hope the Title is straight forward but i explain it a little bit:
So, our beloved Maker (i'm talking about XP) has three Layers for building shiny Worlds, beside the Event and Fog/Panorama Layer. Though 2D, you can create the fine illusion that there is acutally some Height on the Map, i.e. Hills with different Levely, Mountains and so on. With the Help of the Priority and Passage Settings you create the Illusion for the Player, that he stands above or below something. Right ... we know that, its cool.
But our little Illusion is breaking step by step when we, the developer, think about cool Ideas like Bridges for example that the Player can cross above and below. Sure, there are Solutions for this. You can help yourself out with Events, Terrain Tag and so on. It works, thats fine. But its not cool and it works mostly only for the Player. See, i thought in the past Days a lot about Situations like, we take the Bridge Example again, where the Player and some NPC's give the Illusion there are on different Levels but in reality ... they are not. The Player wants to cross a Bridge and at the same Time a NPC wants to go under the Bridge? Nah! Create cool Dungeons and Situations like in Zelda - Link to the Past where Players and Enemies could act on different Levels in the same Situation? Nah!
Thats what i mean. Like i said, i thought about it and got some Ideas how it could work but the big Question is not how it could work but if it is possible at all with the Limits we have with the XP Maker. So I'm here to ask you cool mighty Scripters if there is any possibilty that this could be happen. My thoughts about it:
- Z Level VariableNPC's and the Player have a Variable (a local Variable like local switches per Event would come in handy here) that tracks and saves a value.
The Z Level can change when the Player and/or a NPC's walk over some Event that Triggers by Event touch/Player touch and changes the Variable of that Event or the Player. Think of Stairs for example, where the Trigger Event would lie at the beginning and end of the Stairs.
- Collision/Trigger Detection only on same Z LevelWe have our Z Level Variables stored, nice! Now the Collision detection must be altered. When it comes to collision/triggering it should be checked, if Player/Event is on the same Z level. If yes, well .. do your thing. If no, ignore that one. The Trigger/Interaction Thing would be a easy one (Conditional Branch checking if Z Level Variable are same). The big Thing, i guess, would be the Collision thing.
- Passage Detection ony on same Z LevelNow it is gettings interesting. Take the Bridge example again. The Bridge Tiles have different Passage Settings that the Ground below would have. So how we accomplish, that i.e. a NPC can walk below a Bridge and at the same Time the Player above the Bridge can actually walk over it and ONLY walk over it and not walk like through magic from one Bridge Tile to a Ground Tile that lies logically below?
Exclude Passage Detection for Tiles that don't have a specific "Z Terrain Tag". Okay, wait whats that all about i've come up with? Let me explain:
First, we would need an addition to Terrain Tag. There are scripts out there which allow unlimited Terrain Tags. Thats fine but we need the Possibility that a Tile could have a Terrain Tag and(!) another different Value (or Values), just call it "Z Terrain Tag" for this one. So in short another Terrain Tag Thing where we then can store the Value for the Z Level for a specific Tile. Imagine a NPC have a Z Level of 1 (Ground). The Bridge Tiles have a Z Terrain Tag of 2. Then the NPC would ignore the Passage Settings for the Bridge Tile because it is on another Z Level. It would interact with the Passage Settings of the Tile below the Bridge, in this case a Ground Tile with a Z Terrain Tag of 1.
- Drawing Tiles/Events/Player on the right Z LevelOne but importang thing is still unclear. We have the collision detection settled, the Tile Passage Detection Settled. Fine, but how could we tell the System, that when the Player is a Level higher than our NPC under the Bridge and it will Draw the Sprites correctly? I will maker it short. We need more Priorities.
There are 0 to 5. Somehow we have to raise that to 10 for example. I hope that is even possible.
The Bridge Tiles could have a Priority of 1. We all know, a standard Character Sprite has the Priority 0 on the part below and a Priority of 1 on the upper Part.
Now, when the Player walk up stairs, his Z Level Changes to 2. Now his Priority Level would go up too, in this case from 0 to 1 (for the lower part) and from 1 to 2 (for the higher part). Now the Player would be correctly displayer on the Bridge, a NPC on the other Hand with a Z Level of 1 would have the lower Priority Setting and so be displayed under the Bridge because the Bridge Tiles have a higher Priority.
My God .. i hope anbody can understand this
. Anyway ... i think this could work. The Thing is, will the RPG Maker XP Limits allow us to implement such ideas?
greetz