Greetings,
I'm relatively new to the world of Romhacks, and would like some help understanding a specific concept.
I'm currently working on a Romhack for the GameBoy Color title
Pokémon Trading Card Game released in 1998.
I've been using "WindHex" to edit the .gbc file for the game in order to correct typos, edit card text, and edit deck compositions.
To do so, I managed to find a forum post from 2004 explaining how the game determines what cards are included in a deck.
The information I have is as follows:
For the CPU Decks, the format is [Amount] [Card]. For example :
===============================================
0x30848-0x3086F : Grandmaster Ronald
===============================================
14 02 04 07 01 3D 02 40 01 5A 01 5F 01 72 01 76
02 B9 04 BC 04 BF 03 C0 02 C1 01 C3 03 C5 01 C9
02 CA 03 D0 03 D5 01 E3
0x14 = 20
0x02 : Fire Energy
=> 20× Fire Energy
The part of this info I need help understanding is the code in
red.
Thanks to this post and the info from the Data Crystal notes page about the game (found
here), I was able to determine that this is how the deck is constructed:
14 02 = 20x Fire Energy
04 07 = 4x Double Colorless Energy
01 3D = 1x Flareon LV22 (GB)
02 40 = 2x Legendary Moltres LV37
01 5A = 1x Vaporeon LV29 (GB)
01 5F = 1x Legendary Articuno LV37
01 72 = 1x Jolteon LV24 (GB)
01 76 = 1x Legendary Zapdos LV68
02 B9 = 2x Kangaskhan LV40
04 BC = 4x Eevee LV12
04 BF = 4x Dratini LV10
03 C0 = 3x Dragonair LV33
02 C1 = 2x Legendary Dragonite LV41 (GB)
01 C3 = 1x Professor Oak
03 C5 = 3x Bill
01 C9 = 1x Pokémon Trader
02 CA = 2x Pokémon Breeder
03 D0 = 3x Energy Removal
03 D5 = 3x Scoop Up
01 E3 = 1x Gambler
In WindHex, I was able to find the part of the code above in blue with ease:

But I don't understand what the part in red 0x30848-0x3086F means, or how it refers to the line 00030840 where the code starts in WindHex.
Thanks to some info from Bulbapedia, I know for certain that one of the decks I wish to edit has 1 Jynx, 3 Rattata, 2 Raticate, 2 Bill, 2 Potion, 1 Full Heal. Based on this and the info from Data Crystal, I should be able to find the following code string somewhere:
01 9C 03 A7 02 A8 02 C5 02 DD 01 DF
01 9C = 1 Jynx
03 A7 = 3 Rattata
02 A8 = 2 Raticate
02 C5 = 2 Bill
02 DD = 2 Potion
01 DF = 1 Full Heal
But searching through the game's code via WindHex's Hex Search feature, it says the string was not found. (And yes, I checked the boxes for "Ignore Case" and "Search From the Beginning")
As per this example from the forum post:
0x14 = 20
0x02 : Fire Energy
=> 20× Fire Energy
It is my understanding that "0x14" is hex code for 20.
Since the Deck I'm looking for also has 14 Water Energy and 10 Psychic Energy, that would mean:
0x0e should mean 14
0x03 should mean Water Energy
0x0a should mean 10
0x06 should mean Psychic Energy
and since there is no "0x" anywhere in the code string in blue, I tried searching for 0e030a06, but I did not find any results.
and now I kind of got lost there...
Any help on how to go from there and obtain the information I need to find the deck I wish to edit would be greatly appreciated!
Thanks!
December 22, 2021, 02:00:26 am - (Auto Merged - Double Posts are not allowed before 7 days.)
Ok, so from looking around in the code, I managed to find where several other decks are located.
For example:
--------------------------------------------------
Line 00030420 is where the code of the
Charmander & Friends Deck starts:
0A 02 08 04 06 05 02 30 01 31 01 32 02 36 01 38
02 39 01 3B 02 60 01 67 02 69 01 6B 01 75 02 79
01 7A 01 7D 01 7E 02 A7 01 A8 01 B1 01 C3 02 C5
01 D2 01 D6 01 D8 02 DD 02 DF
0A 02 = 10 Fire Energy
08 04 = 8 Lightning Energy
06 05 = 6 Fighting Energy
etc.
--------------------------------------------------
Line 00030480 is where the code of the
Squirtle & Friends Deck starts:
0B 03 06 05 08 06 02 41 01 42 01 43 02 4B 01 4C
01 55 01 56 01 53 01 54 01 59 02 8E 01 8F 02 94
01 97 01 7D 01 7E 02 80 01 88 02 A7 01 A8 01 B1
01 C3 01 C5 01 D2 01 D4 01 D5 01 DA 01 DD 01 DF
0B 03 = 11 Water Energy
06 05 = 6 Fighting Energy
08 06 = 8 Psychic Energy
etc.
--------------------------------------------------
Line 000304F0 is where the code of the
Bulbasaur & Friends Deck starts:
0B 01 03 02 09 03 02 08 01 09 01 0B 02 0C 01 0D
02 14 02 17 01 18 01 2D 01 3E 01 4B 01 4C 02 4F
01 50 02 53 01 54 01 5B 01 AF 01 B1 02 BC 01 B9
01 C3 01 D2 01 D4 02 D8 01 D9 02 DF 01 E0
0B 01 = Grass Energy
03 02 = Fire Energy
09 03 = Water Energy
etc.
--------------------------------------------------
Ghost Deck (Robert, Psychic Club) starts on line 00030AD0
Flower Garden Deck (Kristin, Grass Club) starts on line 00030A70
etc.
Essentially, I realized I have no problem searching for specific decks by looking at their energy card counts.
However, the deck I'm looking for is the one given to you during the tutorial.
It is simply called the "
Practice Deck".
According to Bulbapedia, it states:
Due to it being used only in the practice battle against Sam, the cards are dealt the same way each time, and therefore some of the cards listed below may never appear during the duels.
Nevertheless, the whole deck data is found from inside the game data and can therefore be listed here.It seems like it should be around somewhere the game code, but I simply cannot find it for some reason...
This is rather quite puzzling.