View Single Post
Old 23rd July 2015, 06:11 AM  
diegoisawesome
Working on Shining Opal, kinda
Ex-Staff
 
diegoisawesome's Avatar
 
Join Date: Jul 2013
Location: Goldenrod City, Johto
Age: 20
Posts: 67
diegoisawesome
Default The Secret Sauce: Triple-Layer Blocks

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!

Installation guide


FireRed/Emerald


First, download the pack that corresponds to your game:

FireRed (BPRE): http://www.mediafire.com/download/s6...FireRed%29.zip
Emerald (BPEE): http://www.mediafire.com/download/i0...Emerald%29.zip
For those interested, the source code is included within each pack.

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 + 1. 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 (don't add 1 this time!). 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:

FireRed: 6C AA 05 08 CE A9 05 08 0C AA 05 08 00 00 00 08
Emerald: 30 A0 08 08 D0 9F 08 08 92 9F 08 08 00 00 00 08

Again, 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 third binary file.

FireRed specific instruction: Change 0x60 to 0x70 at 0x352F0B and 0x1D to 0x1C at 0x352F16. Also, change 0x01 to 0x02 at 0x9B868 and "02 DC" to "2F D0" at 0x9B86E.

Ruby


First, download this pack:
http://www.mediafire.com/download/05...%28Ruby%29.zip
For those interested, the source code is included within each pack.

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!

Questions? Comments? Suggestions? Leave them below!
diegoisawesome is offline   Reply With Quote
Likes Foxz, Pia Carrot, Cruztown, soulryu, GoGoJJTech liked this post