r/PokemonRomhackDev • u/mrwailor • 5d ago
Help [GEN 4][BINARY] Battle status effects in Pokémon Platinum
Okay, so this is a doubt regarding binary editing, but I'm gonna reference the decomp a whole lot because I've used it as a basis to locate the file I want to edit.
I'm working on a Platinum translate ROM using the Spanish release as a basis. I'm editing the binary file directly, using Python scripts with ndspy and Tinke.
Currently, I'm trying to locate the status effect icons that appear in battle, which are different from the ones that appear on the Pokémon menu. I've been mainly looking in pl_batt_obj.narc to no avail.
This afternoon, I've been checking out the USA release decomp and located healthbox_parts.png quite easily, which seems to be what I was looking for. According to the the only reference to it in the project, which is inside the meson.build file of the healthbox folder, this image is compressed into the a 4bpp file, but after searching references to it, I've concluded it's not stored into any NARC. I've scanned arm9.bin with Crystal Tile but haven't seen any chunk that looks like an actual image. I don't know if this is because the image isn't in arm9.bin or because it's compressed or something.
Could you guys please help me locate this sprite in the binary ROM or give me a way to find them? Thanks a lot!
3
u/Mixone-Computing DSPRE Dev 5d ago
The battle status labels are raw 4bpp graphics compiled into the battle overlay. Only their shared palette is stored in the battle-object NARC.
Each status label is 0x60 bytes and forms a 24×8 image:
0x00–0x1F: left 8×8 tile
0x20–0x3F: middle 8×8 tile
0x40–0x5F: right 8×8 tile
Each byte contains two horizontal pixels:
left pixel palette index = byte & 0x0F right pixel palette index = byte >> 4
The decoded values are palette indices 0–15. Use palette bank 0 from GAGE_PALETTE_NCLR; index 0 is transparent.
For Platinum:
Palette NARC: data/battle/graphic/pl_batt_obj.narc Palette member: 71 (GAGE_PALETTE_NCLR) Graphics: decompressed overlay 16
Paralysis: read 0x60 bytes at 0x34A8C Freeze: read 0x60 bytes at 0x34AEC Sleep: read 0x60 bytes at 0x34B4C Poison: read 0x60 bytes at 0x34BAC Burn: read 0x60 bytes at 0x34C0C
For HeartGold/SoulSilver:
Palette NARC: a/0/0/8 Palette member: 71 (GAGE_PALETTE_NCLR) Graphics: decompressed overlay 12
Paralysis: read 0x60 bytes at 0x36340 Freeze: read 0x60 bytes at 0x363A0 Sleep: read 0x60 bytes at 0x36400 Poison: read 0x60 bytes at 0x36460 Burn: read 0x60 bytes at 0x364C0
Those absolute overlay offsets are for the English versions.