• 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?".
  • 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.

Inserting Battle Backgrounds

457
Posts
10
Years
  • Age 28
  • Seen Apr 9, 2024

Emerald Battle Backgrounds

Alright! This is the Battle Backgrounds table for Emerald. The table has the same concept for each background as FireRed has. I dunno if anyone already posted this kind of research but let's just say that I made fine research. LOL Having this format of having five pointers for each background:

Code:
VV VV VV 08  WW WW WW 08  XX XX XX 08  YY YY YY 08  ZZ ZZ ZZ 08
 
VV = Image Offset
WW = TileMap Offset
XX = Entry Image 
(Ex. The Grass that moves in front of the screen at the beginning of a grass battle.)
YY = Entry Image Tilemap
ZZ = Palette

The difference between FireRed and Emerald is that the Emerald's table only covers 10 backgrounds which are in this list:

  • Grass 1 (Normal Grass)
  • Grass 2 (Tall Grass)
  • Sand
  • Dive
  • Sea
  • Pond
  • Craggy (Controlled by 0xC behavior byte)
  • Cave
  • Trainer Battles (Indoor)
  • Trainer Battles (Outdoor) "can be called as the outdoor FIELD"

The table begins at 31ABA8 and ends at 31AC6F. The table hasn't the background for Gym Leader battles, Hideout battles, Pokemon League battles, Battle Frontier battles (doesn't count the Smeargle cave underneath Battle Frontier), and the backgrounds for the Weather Trio battles isn't in the table too. I'm pretty sure that the table is somewhere else but they are located separatedly. Here is the documentation of each background and their offsets and pointers in the original table:

Code:
- Grass 1 (Normal Grass)
--- D77D68 (image) - pointer 68 7D D7 08 at 31ABA8
--- D75008 (image tilemap) - pointer 08 50 D7 08 at 31ABAC
--- D7E280 (entry image) - pointer 80 E2 D7 08 at 31ABB0
--- D7E808 (entry image tilemap) - pointer 08 E8 D7 08 at 31ABB4
--- D78318 (image palette) - pointer 18 83 D7 08 at 31ABB8

- Grass 2 (Tall Grass)
--- D78600 (image) - pointer 00 86 D7 08 at 31ABBC
--- D78CB8 (image tilemap) - pointer B8 8C D7 08 at 31ABC0
--- D7E9C4 (entry image) - pointer C4 E9 D7 08 at 31ABC4
--- D7F0D4 (entry image tilemap) - pointer D4 F0 D7 08 at 31ABC8
--- D78C78 (image palette) - pointer 78 8C D7 08 at 31ABCC

- Sand
--- D78F68 (image) - pointer 68 8F D7 08 at 31ABD0
--- D795A8 (image tilemap) - pointer A8 95 D7 08 at 31ABD4
--- D7F3C0 (entry image) - pointer C0 F3 D7 08 at 31ABD8
--- D7F850 (entry image tilemap) - pointer 50 F8 D7 08 at 31ABDC
--- D79560 (image palette) - pointer 60 95 D7 08 at 31ABE0

- Dive
--- D79858 (image) - pointer 58 98 D7 08 at 31ABE4
--- D79E58 (image tilemap) - pointer 58 9E D7 08 at 31ABE8
--- D7F9F8 (entry image) - pointer F8 F9 D7 08 at 31ABEC
--- D7FEC4 (entry image tilemap) - pointer C4 FE D7 08 at 31ABF0
--- D79E10 (image palette) - pointer 10 9E D7 08 at 31ABF4

- Sea
--- D7A108 (image) - pointer 08 A1 D7 08 at 31ABF8
--- D7A720 (image tilemap) - pointer 20 A7 D7 08 at 31ABFC
--- D80054 (entry image) - pointer 54 00 D8 08 at 31AC00
--- D80660 (entry image tilemap) - pointer 60 06 D8 08 at 31AC04
--- D7A6DC (image palette) - pointer DC A6 D7 08 at 31AC08

- Pond
--- D7A9D0 (image) - pointer D0 A9 D7 08 at 31AC0C
--- D7AFB8 (image tilemap) - pointer B8 AF D7 08 at 31AC10
--- D80804 (entry image) - pointer 04 08 D8 08 at 31AC14
--- D80D50 (entry image tilemap) - pointer 50 0D D8 08 at 31AC18
--- D7AF78 (image palette) - pointer 78 AF D7 08 at 31AC1C

- Craggy
--- D7B268 (image) - pointer 68 B2 D7 08 at 31AC20
--- D7B864 (image tilemap) - pointer 64 B8 D7 08 at 31AC24
--- D80E9C (entry image) - pointer 9C 0E D8 08 at 31AC28
--- D8147C (entry image tilemap) - pointer 7C 14 D8 08 at 31AC2C
--- D7B828 (image palette) - pointer 28 B8 D7 08 at 31AC30

- Cave
--- D7BB14 (image) - pointer 14 BB D7 08 at 31AC34
--- D7C154 (image tilemap) - pointer 54 C1 D7 08 at 31AC38
--- D81610 (entry image) - pointer 10 16 D8 08 at 31AC3C
--- D81E2C (entry image tilemap) - pointer 2C 1E D8 08 at 31AC40
--- D7C10C (image palette) - pointer 0C C1 D7 08 at 31AC44

- Trainer Battles (Indoor)
--- D7C440 (image) - pointer 40 C4 D7 08 at 31AC48
--- D7CA28 (image tilemap) - pointer 28 CA D7 08 at 31AC4C
--- D820D4 (entry image) - pointer D4 20 D8 08 at 31AC50
--- D824E4 (entry image tilemap) - pointer E4 24 D8 08 at 31AC54
--- D7DEB4 (image palette) - pointer B4 DE D7 08 at 31AC58
* Noted that the Trainer Battles for Indoor and Outdoor are sharing the same except for the image palette. Trainer Battles for Indoors contains white-ish and dark-brown-ish palette while Trainer Battles for Outdoors contains yellow-green-ish and light-brown-ish palette.

- Trainer Battles (Outdoor) "almost going to be called as the outdoor field"
--- D7C440 (image) - pointer 40 C4 D7 08 at 31AC5C
--- D7CA28 (image tilemap) - pointer 28 CA D7 08 at 31AC60
--- D820D4 (entry image) - pointer D4 20 D8 08 at 31AC64
--- D824E4 (entry image tilemap) - pointer E4 24 D8 08 at 31AC68
--- D7C404 (image palette) - pointer 04 C4 D7 08 at 31AC6C
* Noted that the Trainer Battles for Indoor and Outdoor are sharing the same except for the image palette. Trainer Battles for Indoors contains white-ish and dark-brown-ish palette while Trainer Battles for Outdoors contains yellow-green-ish and light-brown-ish palette.

For Gym Leader and Battle Frontier battles, they have separated backgrounds. Now, here is the documentation on other special backgrounds and I just give the location of their pointers:

Code:
BATTLE FRONTIER image pointer @ 03579C
BATTLE FRONTIER image tilemap pointer @ 0357A4
BATTLE FRONTIER image palette pointer @ 0357AC

GROUDON image pointer @ 0357D0
GROUDON image tilemap pointer @ 0357D8
GROUDON image palette pointer @ 0357E0

KYOGRE image pointer @ 035804
KYOGRE image tilemap pointer @ 03580C
KYOGRE image palette pointer @ 035814

RAYQUAZA image pointer @ 035838
RAYQUAZA image tilemap pointer @ 035840
RAYQUAZA image palette pointer @ 035848

GYM LEADER image pointer @ 035884
GYM LEADER image tilemap pointer @ 03588C
GYM LEADER image palette pointer @ 035894

CHAMPION image pointer @ 0358B0
CHAMPION image tilemap pointer @ 0358B8
CHAMPION image palette pointer @ 0358C0

"Gym Style (AM)" image pointer @ 035964
"Gym Style (AM)" image tilemap pointer @ 03596C
"Gym Style (AM)" image palette pointer @ 035974
* (AM) - Advance Map

MAGMA HIDEOUT "Team Rocket Style (AM)" image pointer @ 03598C
MAGMA HIDEOUT "Team Rocket Style (AM)" image tilemap pointer @ 035994
MAGMA HIDEOUT "Team Rocket Style (AM)" image palette pointer @ 03599C
* (AM) - Advance Map
* Although that the Ruby's Magma Hideout isn't used in the normal gameplay of Emerald, it exists in Emerald just for a standard "Team Rocket Style" and for FireRed, it is used in Pokemon Tower.

AQUA HIDEOUT "03 (AM)" image pointer @ 0359B4
AQUA HIDEOUT "03 (AM)" image tilemap pointer @ 0359BC
AQUA HIDEOUT "03 (AM)" image palette pointer @ 0359C4
* (AM) - Advance Map
* In Emerald, the "03 ???" from the Fight Type, it is the Aqua Hideout. Although that in FireRed, it appears to be for Rocket Hideout.

ELITE FOUR 1 image pointer @ 0359DC
ELITE FOUR 1 image tilemap pointer @ 0359E4
ELITE FOUR 1 image palette pointer @ 0359EC

ELITE FOUR 2 image pointer @ 035A04
ELITE FOUR 2 image tilemap pointer @ 035A0C
ELITE FOUR 2 image palette pointer @ 035A14

ELITE FOUR 3 image pointer @ 035A2C
ELITE FOUR 3 image tilemap pointer @ 035A34
ELITE FOUR 3 image palette pointer @ 035A3C

ELITE FOUR 4 image pointer @ 035A5C
ELITE FOUR 4 image tilemap pointer @ 035A64
ELITE FOUR 4 image palette pointer @ 035A6C

"Big Red Pokeball (AM)" image pointer @ 035A90
"Big Red Pokeball (AM)" image tilemap pointer @ 035A98
"Big Red Pokeball (AM)" image palette pointer @ 035AA0
* (AM) - Advance Map

So far, that's only the separated backgrounds I've found in Emerald. Some of the images are aligned with the first ten backgrounds or the other backgrounds so be careful while repointing. Example: You have a background for the Elite Four and Champion but it relates with the Team Rocket Style background. I suggest that if you have good instincts, insert the image without repointing and just edit the pointers manually by using a HEX editor. I just gave all the information I have found so you won't be having problems dealing with Emerald background. I hope this help you a lot. Good luck!
 
Last edited:

Lance32497

LanceKoijer of Pokemon_Addicts
792
Posts
9
Years
Get me the right ones and I gladly will.:)

Hello! I inserted my Battle backgrounds in the rom and repointed every pointers of the bg but when I test it now, Only a blackscreen appears in the screen but the musoc is still playing..
by the way....
XX = Entry Image
(Ex. The Grass that moves in front of the
screen at the beginning of a grass battle.)
YY = Entry Image Tilemap
I didnt changed XX YY offset because O dont know what YY is...
I put in "Tilemap offset" where the inserted .raw is located in a rom,
What is the difference between Tilemap offset and Entry Image tilemap?
Does Not changing Entry Image Pointer affects so much in a rom?
 

Exelis'20

Cancer
22
Posts
9
Years
Hey buddy! I really don't understand how to change the values of the background palettes in the HEX editor, and the stray bytes part too.. Can you help me please??
 
457
Posts
10
Years
  • Age 28
  • Seen Apr 9, 2024
Hello! I inserted my Battle backgrounds in the rom and repointed every pointers of the bg but when I test it now, Only a blackscreen appears in the screen but the musoc is still playing..
by the way....

I didnt changed XX YY offset because O dont know what YY is...
I put in "Tilemap offset" where the inserted .raw is located in a rom,
What is the difference between Tilemap offset and Entry Image tilemap?
Does Not changing Entry Image Pointer affects so much in a rom?

The Tilemap offset is the one that controls the battle background:

Spoiler:


And the Entry Image is the one that moves in the beginning of the actual battle:

Spoiler:


Changing the Entry Image isn't affecting too much to ruin (unless you have changed the offset of palette of the background). I rather not to change them.

Hey buddy! I really don't understand how to change the values of the background palettes in the HEX editor, and the stray bytes part too.. Can you help me please??

Go to the offset of a palette of the background. You will see "10 60 00 00 00" hex values right? That symbolises compressed palette (totally different from uncompressed palette... but compressed palettes don't work too much in Advance Palette Editor (APE)). Next to "10 60 00 00 00" is the hex values of the colors which the background uses (while viewed in VBA's palette). There are stray bytes (00-s) after four colors (I will sample Emerald Champion background palette):

Spoiler:


Red underlines are the colors, yellow are stray bytes, and green is an entry for compressed palettes. Only change the ones in red. A background handles 16 colors... but noted that there are palettes that only handle 15, 14, 12 colors.
 

Exelis'20

Cancer
22
Posts
9
Years
Yeah thanks bro! by the way, the process in inserting the background in EMERALD is different in FIRERED?? If it's different, can you tell me the steps in inserting the tilemap (Battle Background) In Emerald?? Thanks very much :D
 

Dr. Seuss

Will finish GS Chronicles, I swear!
523
Posts
10
Years
Yeah thanks bro! by the way, the process in inserting the background in EMERALD is different in FIRERED?? If it's different, can you tell me the steps in inserting the tilemap (Battle Background) In Emerald?? Thanks very much :D

Is the same method, but you need find the offsets of every BG of emerald, probably if you see the Rom with Unlz you can found the offsets.
 
457
Posts
10
Years
  • Age 28
  • Seen Apr 9, 2024
Yeah thanks bro! by the way, the process in inserting the background in EMERALD is different in FIRERED?? If it's different, can you tell me the steps in inserting the tilemap (Battle Background) In Emerald?? Thanks very much :D

Is the same method, but you need find the offsets of every BG of emerald, probably if you see the Rom with Unlz you can found the offsets.

~GOLD! is right. It is in the same method. I have a documentation of Emerald's offsets here: http://www.pokecommunity.com/showpost.php?p=8469572&postcount=41
 
457
Posts
10
Years
  • Age 28
  • Seen Apr 9, 2024
ahhm ok, but may I leave these blank? because I Changed the palettes of the battle bg

If you are going to make them blank, well, you just need a new blank image (all transparent) and a tileset of the blank image. And, kinda less fancy. If you are changing the background image palettes, it doesn't change the entry image palettes (if you are staying with the same offset of the original palette). Don't worry about it, entry image palette are handled separately from it. :3

I'll make a post of explanation of palettes later once I have figured out things.
 
106
Posts
11
Years
OK, I tried inserting a new battle background on Emerald using the information
Raileys posted and I end up with something looking like this:
Spoiler:


If it helps, I completely ignore the original tutorial and just imported it straight into UnLZ. The background seems to be fine, it's just the platform thing.
 

LeiAlcantara025

Hack Expert Most IN Mapping
67
Posts
9
Years
  • Age 25
  • Seen Nov 8, 2019
Ca Someone Taught Me How To insert like this Battle Back grounds?
latest_battle_backgrounds_by_kymotonian-d48n22n.png
In Fire Red? No worry I have my own Battle BG Since Kyledove Forbid anyone to UseThis
 
457
Posts
10
Years
  • Age 28
  • Seen Apr 9, 2024

Manipulating Battle Background Palette

Have anyone wondered why the palettes of different battle backgrounds having twelve, thirteen, or sixteen (the transparent color counts) colors. Sometimes you want sixteen colors for the background and you want to maintain the original offset (only replacing values from it), but the original palette has only fifteen available colors. Solution to it? I have already found it out! I have amassed data to examine different palettes from different background. Then, finally, I have found one that can be universal to the maximum of sixteen colors (however, it is not only just the colors of the background… you will find out). Here's the data as promised:

Code:
10 60 00 00 00
[COLOR="Red"][B]00 00 DC 73 1B 4B 7E 57[/B] 00 [B]7C 5F 3C 4F 9A 67 5D 53[/B] 00 [B]7E 57 3D 53 5C 53 A8 4E[/B] 00 [B]0C 5B 51 6B 94 6F B8 73[/B][/COLOR] 
80 10
[COLOR="Orange"][B]1F B9 42 5D 53 7D 5F DA[/B] 00 [B]46 9D 6F 1B 4B 3C 4F FB[/B] 40 [B]4A[/B][/COLOR]
B0 1F
[COLOR="Green"][B]5F 23 DF 63 5F 2B[/B] 02 [B]9F 3B DF 43 00 00[/B][/COLOR]
F0 01 00 00

Let me explain. The data is a set of compressed palette. Each palette data contains three parts: the First Base, the Second Base, and the Entry Image Palette.
  • The red-bolded values are the First Base which is controlled in the 0x2 palette control in the tilemap. Literally, this is the basic and the main layer for the colors of the background. Noted that there are 2 bytes each color. After four colors, there is a stray byte which is 00 and is not always 00. The First Base contains sixteen colors (subtract one for the transparent color which is at the start of the palette).
  • The orange-bolded values are the Second Base which is controlled in the 0x3 palette control in the tilemap. This is the second layer of palettes for the background. It contains eight colors. In the fourth color, there is an insertion of the stray byte "00" between the two values. Then in the eight color, there is also an insertion of the stray byte "40" between the two values.
  • The green-bolded values are the Entry Image Palette which is used for the palette for the image-that-animates-to-the-left-then-disappears as you can see in the flow in the intro of a battle. It contains six colors and the stray bytes "02" appears after the third one. They can only be five colors but the highest possible is six colors (the rock entry image in the cave background having six). So, the sixth slot at 00 00 before the F0 01 is safe to use.
I still don't know how compressed palettes works but I have explained everything as far as I know. You may use this as the palettes for all available backgrounds. This palette data is ripped off from Elite Four Sidney's palette but if you use this data to other backgrounds, it will still work just focus on byte ordering and changing. You have a new grass background with this format is okay. If you want to maintain the entry image palette, just copy the palette used for the entry image just by looking at VBA's palette and image viewer.
 
Last edited:

AceRoku

Dev of Pokemon Flare
28
Posts
9
Years
  • Age 35
  • Seen Mar 21, 2015
Great ! This tutorial is very user-friendly. I'd recommend reading this.
 

Cruztown

Squirtle Squirt.
45
Posts
11
Years
  • Age 30
  • Seen Feb 1, 2024
Out of curiosity, what ties the battle backgrounds to Nature Power? How does it handle adding more backgrounds? Does it just default to Swift, or is there a separate table somewhere in the rom?
 
5,256
Posts
16
Years
Out of curiosity, what ties the battle backgrounds to Nature Power? How does it handle adding more backgrounds? Does it just default to Swift, or is there a separate table somewhere in the rom?

Doesn't Nature Power just go off of the map itself (the Inside, Route, Underground etc. settings in A-Map) and behaviour bytes?
 

Cruztown

Squirtle Squirt.
45
Posts
11
Years
  • Age 30
  • Seen Feb 1, 2024
Doesn't Nature Power just go off of the map itself (the Inside, Route, Underground etc. settings in A-Map) and behaviour bytes?

That might explain it. Looking at Hoenn (Emerald, BPEE), the desert on Route 111 is still marked as a plain "Route" with regular weather, yet has Earthquake as the called move, so behavior bytes would be the only thing I could immediately think to check.
 
Back
Top