- 5,256
- Posts
- 17
- Years
- Age 27
- Leicester, UK
- Seen Mar 18, 2025
[FR] - Sideways Stairs
A common issue when it comes to mapping is the inability to properly use sideways stairs, a situation which usually leads to one of two outcomes. The first is that the map is changed, usually at the expense of its playable design and aesthetics, to instead use a vertical set of stairs. The second, which often looks very unprofessional, is to use sideways stair tiles anyway, and to just make them act like regular, passable tiles. This looks so bad because there is no sense of elevation when the player walks up, and can break immersion and make movement awkward. The following implementation can create a far easier, pseudo-3D effect which alleviates all of these issues. Here is a small sample .gif of the implementation:![[PokeCommunity.com] [FR] Sideways Stairs [PokeCommunity.com] [FR] Sideways Stairs](https://i.imgur.com/8B2jW2w.gif)
This tutorial applies strictly for the US FireRed ROM. As always, it is strongly recommended that, before modifying a ROM (and, indeed, as progress is made), back ups are created to minimise the risk of data loss or corruption.
Step 1 - Modifying the routine
- Download the sideways_stairs.asm routine attached to this post.
- Load the downloaded file in a text editor of your choice.
- Locate a word-aligned address in your ROM with xC38 bytes of free space.
- Update the expression for the start_address symbol in the routine's file from 0xXXXXXX to the address you have located.
- Identify a contiguous set of six, unused behaviour bytes. By default, the implementation uses bytes 0xB0 through to 0xB5.
- Update the expression for the behaviour_0 symbol in the routine's file from 0xB0 to the first of the six behaviour bytes you have identified.
- Save the sideways_stairs.asm file.
Note that you do not need to change the behaviour_0 symbol if the behaviour bytes 0xB0, 0xB1, 0xB2, 0xB3, 0xB4 and 0xB5 are unused in your ROM.
Step 2 - Assemble and insert the routine
- Assemble the sideways_stairs.asm routine.
- Load the produced sideways_stairs.bin file in your hex editor.
- Navigate to x5BB5C in both the ROM and the .bin file.
- Copy the (non-xFF) bytes from this address in the .bin file.
- Paste the copied bytes at the same address in the ROM.
- Repeat the above three steps at the following addresses: x5C104, x5C14C, x5C17C, x64540, x64584, x645B4 and xBD3C8.
- Navigate to the address of free space used for the start_address symbol in both the ROM and the .bin file.
- Copy bytes from this address in the .bin file to the end of the .bin file.
- Paste the copied bytes at the same address in the ROM.
- Save the ROM.
After this step, sideways stairs are fully implemented in your ROM.
Step 3 - Using the sideways stairs in a map
The sideways stairs have now been fully implemented in the ROM, programatically. This step is in diagram form and simply demonstrates how a map should use the new behaviour bytes to achieve the sideways stairs effect. This thereby assumes the reader is knowledgeable of how to manipulate tile sets and on how to assign tiles behaviour bytes.![[PokeCommunity.com] [FR] Sideways Stairs [PokeCommunity.com] [FR] Sideways Stairs](https://i.imgur.com/rv63epQ.png)
The image above should adequately demonstrate the pattern required to properly use the sideways stairs implementation. The bytes atop the tiles indicate which behaviour byte they require to function properly. This image fails to demonstrate stairs of larger vertical lengths, but trial and error is recommended to truly grasp how the behaviour bytes function. With regards to the movement permissions, the only pertinent information is that the "bottom" of every column of stair tiles should be impassable, and the rest passable; this should, incidentally, form a stair shape, such as below:
![[PokeCommunity.com] [FR] Sideways Stairs [PokeCommunity.com] [FR] Sideways Stairs](https://i.imgur.com/1xJh6QV.png)
The background bytes for the special tiles do not need to be anything special, but ideally would be x00 x20.
Drawbacks
This implementation currently has a number of drawbacks.- Non-playable person events will not interact properly with this implementation by default: you would need to create a unique movement type that could interact with sideways stairs.
Attachments
Last edited: