• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Forum moderator applications are now open! Click here for details.
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

[Pokeemerald] Fully editing an existing battle background

Lunos

Random Uruguayan User
3,108
Posts
15
Years
I decided to write this because Avara's tutorial doesn't explain how to replace an existing battle background with a fully custom one.
This may not be the only or the best way to go about doing this, but it's the one way to do it that I know of.
Without further ado, let's get to it.

1) Make a 256x512 sheet following this example from Dr. Fuji's old binary hacking tutorial:
Spoiler:


I'll use a public battle background made by Solo993. The credits go to them.
Spoiler:


I didn't experiment much with the palettes honestly, but the battle background that I'm using here has 16 colors, so I'd suggest to stick to that.

2) Open Tilemap Studio and go to Tools -> Images to Tiles.

3) Load your sheet where it says "Input", and choose a folder to store the resultant tileset in the Output.
The rest of the fields should be left in their default values, except for the Color 0 of the Palette.
Make sure that's set to whatever you used as a transparent color.
G67aKBJ.png


Once you're ready, hit OK.

4) After that, Tilemap Studio will create a tileset and a tilemap out of the sheet we fed to it, and put them in the same folder where the sheet is located.
This tilemap is not quite ready to use though. We need to adjust its own palette.

5) After generating a tileset and a tilemap, Tilemap Studio opens a window called "Tilemap Options".
Set the Format to GBA tiles + 4bpp palettes, hit OK and Tilemap Studio will open our freshly made tilemap and tileset.
If you already closed it, open the Tilemap and Tileset manually by going to Tilemap -> Open and Tileset -> Load.
On a minor note, sometimes, Tilemap Studio will load the tileset automagically.

6) On the left side of the screen go to the Palettes tab.
You should see something like this:
Spoiler:


We can use the palettes of the vanilla battle backgrounds as a point of reference.
We'll see that the area where the platform on the Player's side is located normally uses the Color #3, the areas with a transparent color use the Color #0, and the rest uses the Color #2.
In my case, using the Color #3 over that battle platform makes it look glitchy in game, so I used the Color #2 for that too.
This was the result:
Spoiler:


The only thing we're missing now is the palette of the tileset.
There's multiple ways to get the palette of an image. I prefer to use GraphicsGale, like this:
Spoiler:


5) Rename the "tiles.bin" file to "map.bin" instead, and now just drag the 3 files into the folder that contains the battle background you want to change.
In my case, I'm going to replace the battle background used for caves, so I'll put the files in graphics/battle_terrain/cave

Now just build a ROM normally and test In Game:
53KUPMk.gif


Looks good, though the animated tiles used during the intro look incorrect.
Normally, the battle backgrounds use palettes of 48 colors, but here we're using a palette of 16, meaning we butchered 32.
I'm guessing those 32, or at least some of them, are used for the animated tiles.

What did I do to solve this problem?
First I grabbed the original palette.pal file for the cave battle background.
Then I replaced the first 16 colors of it (Lines 4 to 19) with the colors of the palette of the battle background I inserted in this tutorial using Notepad++.
This procedure seems to have worked, as I was able to restore the animated tiles normally used by this battle background to their former glory.
XjC1TSC.gif


The process to modify the other battle backgrounds should be no different.
Some of them have multiple palettes because a battle background can be used for multiple instances.
You'll have to mess around with that by yourselves a little.

And that's pretty much it.​
 
Last edited:
Back
Top