redriders180
Mastermind of Pokemon Glazed
- 314
- Posts
- 14
- Years
- Path of Victory, Tunod
- Seen Dec 17, 2016
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
OT ID dword 4
Nickname 10 bytes 8
Language word 18
OT name 7 bytes 20
Mark byte 27
Checksum word 28
???? word 30
Data 48 bytes 32
Status ailment dword 80
Level byte 84
Pokérus remaining byte 85
Current HP word 86
Total HP word 88
Attack word 90
Defense word 92
Speed word 94
Sp. Attack word 96
Sp. Defense word 98
and the encrypted data:
Growth:
Species word 0
Item held word 2
Experience dword 4
PP bonuses byte 8
Friendship byte 9
??? word 10
Attacks:
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
Effort:
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
Coolness byte 6
Beauty byte 7
Cuteness byte 8
Smartness byte 9
Toughness byte 10
Feel byte 11
Misc:
Pokérus status byte 0
Location caught byte 1
Level caught signed byte 2
Poké Ball/Trainer gender byte 3
IVs dword 4
Ribbons 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 :)
Spoiler:
Personality dword 0
OT ID dword 4
Nickname 10 bytes 8
Language word 18
OT name 7 bytes 20
Mark byte 27
Checksum word 28
???? word 30
Data 48 bytes 32
Status ailment dword 80
Level byte 84
Pokérus remaining byte 85
Current HP word 86
Total HP word 88
Attack word 90
Defense word 92
Speed word 94
Sp. Attack word 96
Sp. Defense word 98
and the encrypted data:
Spoiler:
Growth:
Spoiler:
Species word 0
Item held word 2
Experience dword 4
PP bonuses byte 8
Friendship byte 9
??? word 10
Attacks:
Spoiler:
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
Effort:
Spoiler:
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
Coolness byte 6
Beauty byte 7
Cuteness byte 8
Smartness byte 9
Toughness byte 10
Feel byte 11
Misc:
Spoiler:
Pokérus status byte 0
Location caught byte 1
Level caught signed byte 2
Poké Ball/Trainer gender byte 3
IVs dword 4
Ribbons 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 :)
Last edited: