View Single Post
Old July 16th, 2012 (8:36 PM). Edited July 17th, 2012 by redriders180.
redriders180's Avatar
redriders180 redriders180 is offline
Mastermind of Pokemon Glazed
Join Date: Jun 2010
Location: Path of Victory, Tunod
Gender: Male
Nature: Quirky
Posts: 540
Send a message via AIM to redriders180 Send a message via Skype™ to redriders180
Time for me to appeal to the researchers of Pokecommunity in order to help with some things that might be interesting to do in a Rom Hack. Mainly, I'm talking about taking the Pokémon data structures, and modifying them to allow more useful things to be done with that data. To save you the trouble, I've copied the current data structures of the Gen III games:


Personality dword 0
dword 4
10 bytes 8
Language word 18
OT name
7 bytes 20
Mark byte 27
word 28
word 30
48 bytes 32
Status ailment
dword 80
byte 84
Pokérus remaining byte 85
Current HP
word 86
Total HP
word 88
word 90
word 92
word 94
Sp. Attack
word 96
Sp. Defense word 98

and the encrypted data:



Species word 0
Item held
word 2
dword 4
PP bonuses
byte 8
Friendship byte 9
word 10


Attack 1 word 0
Attack 2 word 2
Attack 3
word 4
Attack 4
word 6
PP 1
byte 8
PP 2 byte 9
PP 3
byte 10
PP 4 byte 11


HP EV byte 0
Attack EV
byte 1
Defense EV
byte 2
Speed EV
byte 3
Sp. Attack EV
byte 4
Sp. Defense EV
byte 5
byte 6
byte 7
byte 8
byte 9
Toughness byte 10
byte 11


Pokérus status byte 0
Location caught
byte 1
Level caught signed byte 2
Poké Ball/Trainer gender
byte 3
dword 4
dword 8

The above being copied from Bulbapedia.

Glancing at the above, there are many slots in the data that aren't used in Firered. Additionally, there are a few bytes that might not serve a purpose in a ROM hack, specifically language, which serves a purpose I currently don't know. I've heard that Pokerus in Firered is nonexistant as well, and the byte is basically unused. The six contest stats, and ribbons are also sitting unused. This unused data could be useful in porting over functions from Gen IV and V into Gen III. The "Pokerus Remaining" byte is the only unencrypted value I'm comfortable hacking, unless I receive confirmation that the language half-word is essentially unused.

The main function I have in mind for this byte is to breathe new life into a thread that seems to have hit a dead end: Hidden abilities. After browsing that thread, it seems most people were hung on the fact that abilities are controlled by a single bit, meaning two is the max. If we could somehow redirect the code to this byte, instead of to the bit that determines ability, we could easily figure out a way to unlock hidden abilities.

Gen IV also uses a byte for forme determination. I believe Jambo51 and Chaos Rush have been working on a method for enabling forme changes in their 649 Patches, and they probably use a different method to achieve it, this could be an alternate way. The Gen I and II games have a section of data in their Pokemon data structures that accounts for both primary and secondary typing. If we could use the Pokerus Remaining byte, as well as the language half-word, formes with different types could become more feasible.

The data structure could be used in plenty of other ways not mentioned, but I can't currently think of. I was hoping to collaborate to see if anyone has any info on how these structures are stored and modified, in addition to info that could be used for anything else I might've mentioned. If anything, I hope I set the wheels turning for someone out there

I think I'm done with ROM hacking. I'll still pop in and visit, though.

Reply With Quote