As some of you may already be aware, we have begun construction of a new forum as a rebirth of PHO and continuing on into future projects.
This forum is called Silph Co., and can be found by clicking the banner below. We are in the process of transferring some of our old resources, and the forum is open for posting. It will be sad to see PHO go, but we look forward to a bright future with Silph.
The forums here will be moved to an archive, and the url will redirect to the new site in the coming days/weeks.

Generation 3 (Traditional)Traditionally, Generation 3 is hacked using tools, hex editors and patches. This is for you if you do that.

Triple-Layer Blocks

What are triple-layer blocks, exactly, and why should I care?

If you've ever used a mapping tool (which almost everyone has), then you've come to notice that you can only "stack" a maximum of two layers on top of each other:

The problem at hand.

But what if you need to stack three things on top of each other? What do you do then besides squeezing two layers into one palette and make new tiles? Well, this is where triple-layer tiles come in handy!

Open the first binary file and your ROM in a hex editor of your choice (I prefer HxD). Copy the contents of the binary file and paste it at either address 0x5A9BC (FireRed) or 0x89F80 (Emerald). Find a chunk of free space (200 bytes is a good size to search for), round it up to the nearest multiple of 4 (0, 4, 8, or C), then replace the '00 00 00 08' from the end of the pasted chunk with a pointer to the free space you found, plus 1 (this is the only time you're adding 1 to an address in this tutorial, be careful!). Example: You found free space at 0xF45167. Round it up to 0xF45168, add 1, then reverse it to get 69 51 F4 08.

In the ROM, navigate to the rounded free space address (remember, don't add 1!). Open the second binary file, then copy and paste it into the ROM. Replace the '00 00 00 08' from the end of the pasted chunk with a pointer to the free space just after the pasted section. In that space, paste this code:

Ruby

Open the first binary file and your ROM in a hex editor of your choice (I prefer HxD). Copy the contents of the binary file and paste it at address 0x57E96. Find a chunk of free space (200 bytes is a good size to search for), round it up to the nearest multiple of 4 (0, 4, 8, or C), then replace the '00 00 00 08' from the end of the pasted chunk with a pointer to the free space you found. Example: You found free space at 0xF45167. Round it up to 0xF45168, then reverse it to get 68 51 F4 08.

In the ROM, navigate to the rounded free space address. In that space, paste this code:

A0 7F 05 08 28 7F 05 08 AC 7E 05 08 00 00 00 08

Replace the '00 00 00 08' from the end of the pasted chunk with a pointer to the free space just after the pasted section. In that space, paste the contents of the second binary file.

How to use your new powers

Congratulations! You now have the ability to use three layers at once! But how do you use this, you ask? It's pretty simple.

Set your first block to have the bottom two layers and a background byte of 30:

Setthe block immediately after it to be the top layer (this is your burner block):

What do I mean by a "burner block"? Well, it's a block that you wasted the bottom layer on and can't use it for much else. However, if you're creative, then you can find another use for it (such as a one-layer block).

The result

Looks ugly in Advance-Map, but...

Looks great in-game!

How do overworld sprites interact with these blocks? How would they look?

Another in-game example.
When the player or any other sprite goes on the triple-layer block, they'll always appear above the bottom two layers and below the top layer. This is due to how the block system works: a background byte of 00 uses the top two layers (sandwiching sprites between) and a background byte of 10 or 20 (depending on your game) uses the bottom two layers (putting sprites on top). The triple-layer block hack enables you to use all three of these block layers at once.

But what if I want all three below the player?

There's a way around it, but it's kind of "hacky" (heh). You have to set the "height" of the block (using movement permissions) to be higher than C. The caveat to this is, sprites at that height will appear above ALL blocks, even ones that the player would usually be under, so it's not the most convenient thing to use. If you REALLY need all three underneath the player for some reason, try and see if you can merge two of the layers together and use the normal system instead before attempting this.