Open main menu

Bulbapedia β

Changes

Talk:Pokémon data structure in Generation III

1,204 bytes added, 16:44, 29 September 2007
Boxed Trade
::Yeah, basically each individual Pokémon in the game is defined by this structure. You got your wild encounter data and trainer data and that's just a simple species/level pair but when you actually encounter those monsters, they get a full 100 byte structure built up. Any specific questions? --[[User:Kyoufu Kawa|Kyoufu Kawa]] 17:28, 5 September 2007 (UTC)
 
==Using the Data==
This page is beautiful. I was part way into cracking the data structure myself, having finally figured out the character set by making a Pokemon be named ABCDEEEE, and then searching the pattern in memory. I googled to see if anyone else had started documenting it, and I found the page for the 100-byte data structures! Anyways, how can you possible use this thing, with the damned "The save file is deleted" message? Easy:
1. Save the game state in VBA - you know the "Save Game - Oldest Slot" routing. The file that it makes is a GZIP'd copy of the GBA's RAM. So to edit it, just ungzip it!
::I have been able to perform a manual trade of sorts between saved states of VBA v1.8 with success. The 80 bytes values in the VBA saved state can literally be copy and pasted between games. The simplest way to do this is to paste the 80 bytes right on top of a Poke already in the box. Basically you follow the above procedure for step one above, but on two saved files. Open both in the hex editor, and copy/paste the value from one into the other, on top of a Poke that you don't mind "trading" out, like Magikarp. I have not yet tested this between different flavors of Gen 3, but it definitely works for Sapphire to Sapphire trades.
::: It'll work. I mentioned on my talk page that I'm working on that I'm working on an opensource G3 clone? Any monster it generates can be hand-copied to any original G3 game, the full 100 bytes. And yes, they'll be Outsiders, so they get boosted experiece and give you the finger if you lack badges. --[[User:Kyoufu Kawa|Kyoufu Kawa]] 18:20, 27 September 2007 (UTC)
:::: I saw something about openpoke, but didn't look long enough or couldn't find the source. I was considering a '''[[Boxed Trade]] Reader''' tool that would read a saved-state, rip the up to 420 Pokémon present in the user's box into compressed ASCII strings or simple hex. It would complement the '''Boxed Trade Writer''' tool, which would simply search for one particular Pokémon and replace it with another, as specified by the user using compressed strings or simple hex generated by the previous utility.
:::: '''Boxed Trade Writer''' would consist of nothing more than decompression/recompression wrapping and sed, made user friendly, regardless of what type of saved memory dump it was editing.
:::: '''Boxed Trade Reader''' would ideally be a little more advanced; if the Pokémon Box weren't at the anticipated location in memory, it ought to contain enough data analysis logic to be able to search out the general region of the boxed Pokémon. Finding repeats of 80 that don't repeat every 40 or every 16 bytes as well is pretty simple math, but verifying it all with the Pokémon checksum would make it foolproof, which is why I was most interested in your source code.
 
::I may document this better in the future, also, I don't expect that 100% manual trading between game-based saves will ever work because of the whole ROM-checksum issue, there will always be some calculator or something needed.
77
edits