Post by goldensandslash on May 21, 2020 18:38:39 GMT
Have you ever wondered what a Pokémon looks like? I mean, sure, there's a bunch of graphical displays on your Game Boy, different pixels being colored in different ways, but that's just what it looks like to a human observer. That's a subjective viewpoint. What does it objectively look like though?
Well, unsurprisingly, it's just a bunch of ones and zeroes. Let's take a look at an example from Gen 1.
1011110000000001000100001000100100000000010101000101011011111000000101001001110011001000111001110011101011001000000000100111010000111100000000010110110000000010010001000000000001011000000000110010000000001101101101010011001001000000010010000111100001001000000110001000100101000000101100001011100011000100101001
Yep, that's a Pokémon. It's a bit unwieldy to talk about in this form. It'd be easier if we converted this giant binary number into hexadecimal.
2F004422401515BE05273239CEB2009D0F005B0091001600C8036D4C90121E120622502C2E3129
That's our Pokémon.
When the game looks at the data for your Pokémon, it sees something like this. Each and every Pokémon has a data structure like this. But, like, what does it all mean? Well, let's take a look.
We'll start with the first two digits: 2F. What does this mean? Well, this tells us what species of Pokémon we're dealing with. 2F. The game is in hexadecimal (base-16), so let's just go ahead and convert that into decimal (base-10), and we see that this returns a number of 47. So it's Pokémon number 47. Uh... which one is that? Well, the 47th Pokémon in the Pokédex is Parasect, so is it that? Nope!
Rather than just using Pokédex order like a sensible person, Gen 1 games have the list of Pokémon programmed in a completely arbitrary order. I'm guessing this is just the order that the programmers came up with the designs and put them into the game:
1. Rhydon
2. Kangaskhan
3. Nidoran-Male
4. Clefairy
5. Spearow
6. Voltorb
7. Nidoking
8. Slowbro
9. Ivysaur
10. Exeggutor
11. Lickitung
12. Exeggcute
13. Grimer
14. Gengar
15. Nidoran-Female
16. Nidoqueen
17. Cubone
18. Rhyhorn
19. Lapras
20. Arcanine
21. Mew
22. Gyarados
23. Shellder
24. Tentacool
25. Gastly
26. Scyther
27. Staryu
28. Blastoise
29. Pinsir
30. Tangela
33. Growlithe
34. Onix
35. Fearow
36. Pidgey
37. Slowpoke
38. Kadabra
39. Graveler
40. Chansey
41. Machoke
42. Mr.Mime
43. Hitmonlee
44. Hitmonchan
45. Arbok
46. Parasect
47. Psyduck
48. Drowzee
49. Golem
51. Magmar
53. Electabuzz
54. Magneton
55. Koffing
57. Mankey
58. Seel
59. Diglett
60. Tauros
64. Farfetch'd
65. Venonat
66. Dragonite
70. Doduo
71. Poliwag
72. Jynx
73. Moltres
74. Articuno
75. Zapdos
76. Ditto
77. Meowth
78. Krabby
82. Vulpix
83. Ninetales
84. Pikachu
85. Raichu
88. Dratini
89. Dragonair
90. Kabuto
91. Kabutops
92. Horsea
93. Seadra
96. Sandshrew
97. Sandslash
98. Omanyte
99. Omastar
100. Jigglypuff
101. Wigglytuff
102. Eevee
103. Flareon
104. Jolteon
105. Vaporeon
106. Machop
107. Zubat
108. Ekans
109. Paras
110. Poliwhirl
111. Poliwrath
112. Weedle
113. Kakuna
114. Beedrill
116. Dodrio
117. Primeape
118. Dugtrio
119. Venomoth
120. Dewgong
123. Caterpie
124. Metapod
125. Butterfree
126. Machamp
128. Golduck
129. Hypno
130. Golbat
131. Mewtwo
132. Snorlax
133. Magikarp
136. Muk
138. Kingler
139. Cloyster
141. Electrode
142. Clefable
143. Weezing
144. Persian
145. Marowak
147. Haunter
148. Abra
149. Alakazam
150. Pidgeotto
151. Pidgeot
152. Starmie
153. Bulbasaur
154. Venusaur
155. Tentacruel
157. Goldeen
158. Seaking
163. Ponyta
164. Rapidash
165. Rattata
166. Raticate
167. Nidorino
168. Nidorina
169. Geodude
170. Porygon
171. Aerodactyl
173. Magnemite
176. Charmander
177. Squirtle
178. Charmeleon
179. Wartortle
180. Charizard
185. Oddish
186. Gloom
187. Vileplume
188. Bellsprout
189. Weepinbell
190. Victreebel
You may notice that some numbers were skipped. For example, there is no Pokémon at number 160. What's going on there? Well, the two digits at the beginning can store any number from 0 to 255. But only 151 of those numbers have data for Pokémon. If there is a number there that does not correspond to a Pokémon (such as 160), then a glitch Pokémon is used instead. This is also the case for any number above 190. So why is it programmed this way? Why not just have a list of 151 Pokémon? Well, it's likely that there were originally 190 different Pokémon, and 39 of them were taken out. This theory is seemingly confirmed when you look at some of the artwork from the Gen 2 Beta previews. The artwork of the new Pokémon are numbered. Chikorita is 191, Qwilfish is 250, Marill is 222, Girafarig is 242, Cyndaquil is 197, and Tyranitar is 183, hinting that Tyranitar was originally a Gen 1 Pokémon that got scrapped. This was later confirmed in an interview with Shigeki Morimoto.
Anyways, let's get back to our example Pokémon. We see that it is number 47, which is Psyduck.
The next four digits are 0044. This tells us how much HP Psyduck has remaining. It has 0044 HP in Hex, which, put into decimal, is 68 HP.
Next is 22. This is the Pokémon's level. Remember that it is in Hex, so this isn't a Level 22 Psyduck, it's a Level 34 Psyduck. There's more to this part of the code, but we'll explore that later on.
After that is 40. This tells us what status ailment the Psyduck has. 00 means no status ailment, 04 means sleep, 08 means poison, 10 means burn, 20 means freeze, and 40 means paralyze. So this is a paralyzed Psyduck. You should notice that there are some status ailments missing. The most obvious is confusion. The reason for this is that confusion only exists during battle, and so it's stored elsewhere. The Pokémon data, when viewing a Pokémon in either your party or Bill's PC, won't show confusion. The other missing one is bad poison, inflicted by Toxic, which accelerates over time. This is also stored elsewhere, because it's only in battle. As soon as the battle ends, the bad poison will become normal poison.
The next part is 1515. This is the Pokémon's type. The first two digits are Type 1 and the second two digits are Type 2. For Pokémon with only a single type, you just put the same two-digit number twice. The types are as follows:
00 = Normal
01 = Fighting
02 = Flying
03 = Poison
04 = Ground
05 = Rock
07 = Bug
08 = Ghost
14 = Fire
15 = Water
16 = Grass
17 = Electric
18 = Psychic
19 = Ice
1A = Dragon
In our case, our Psyduck is a pure Water-type. This is obvious, because ALL PSYDUCK ARE THAT WAY. Yes, this part of the information is completely redundant. You can always figure out a Pokémon's type based on its species, so there's no need to code this separately. But they did it anyways (bad coding is gonna be a recurring theme). There are only two ways to change a Pokémon's type in Gen 1: evolve it, which would change its species as well; or have Porygon use Conversion, which would wear off after the end of the battle.
Speaking of bad programming, check out the next piece of data here: BE. This is the Pokémon's catch rate. This is easily the worst of the badly-programmed parts of Gen 1: they gave EACH INDIVIDUAL POKÉMON a catch rate. Not just each species, but each individual. It's completely redundant because, again, you can get this data via the species. In our case, Psyduck has a catch rate of 190, as it should. (By the way, this number is stored on the individual Pokémon and it will not change if the Pokémon's species changes via evolution.)
There is, however, an exception. By the time Yellow came out, they realized that this number was redundant, so they used it to mark your starter Pikachu. See, a normal Pikachu has a catch rate of 190, but the Pikachu that Professor Oak gives you at the start of the game has a special catch rate of 163. This is how the game knows which Pikachu is your starter (it also checks that the ID number of Pikachu's OT matches with yours). This allows the starter Pikachu to have some unique properties. Specifically...
...it walks onto the screen at the start of the battle, rather than being thrown out of a Poké Ball.
...it says "Pika!" instead of the standard Pikachu cry.
...it can participate in the Pikachu Beach minigame (Virtual Console version only).
...it will be unable to evolve into Raichu unless traded to another game first.
...it will be unable to be released unless traded to another game first or evolved first.
...it will have a friendship stat (which is stored elsewhere in the game).
...it will have unique animations and voicing different from other Pikachu if transferred to Pokémon Stadium or Pokémon Stadium 2.
Another interesting case is Kadabra. Kadabra has a catch rate of 100 in every single game. But, upon being captured, the game is hard-coded in Yellow (and only Yellow) to change this number to be 96. This is ONLY in Yellow and only on Kadabra. Why would they do that? Well, I'm guessing that they were preparing for Gen 2. More on this in a bit. First, let's talk about the prize Pokémon from Pokémon Stadium. These Pokémon are obtained by clearing Round 1 and Round 2 of the Gym Leader's Castle. But if you do, your Pokémon will be slightly different under-the-hood. Specifically, its catch rate is set to 167 if you obtained it from Round 1, and 168 if you obtained it from Round 2. The Amnesia Psyduck is also set to 168.
So why are these Pokémon marked? Held items.
Held items don't exist in Gen 1. But they do exist in Gen 2. I think that by the time Yellow and Stadium came out, the programmers realized that giving each individual Pokémon a catch rate was redundant, so they opted to repurpose this set of data. Indeed, in Gen 2, this part stores the Pokémon's held item. For example, suppose I gave a Pokémon a Protein to hold. This corresponds to the number 27. If I trade it over to Gen 1, then it has a catch rate of 27. This ensures that it will still be holding the Protein when I trade it back. The item isn't lost. (A catch rate of 0 corresponds to no held item.)
So why flag these Pokémon as being special? So that they can have different items when traded to Gen 2. There are several items that can ONLY be obtained this way. Most famously, TM09 (Psych Up) isn't found anywhere in the game in Gold/Silver/Crystal. The only way to get it is that an Abra caught in Gen 1 has the catch rate that would allow it to have this item upon being traded to Gen 2.
Out of curiosity, what's the held item that corresponds to our Psyduck? What's item 190? What will it hold when traded to Gen 2? The answer is... a corrupted glitchy mess. Something's gone wrong here. What happened?
Well, there are a few catch rates that are "bad" for Gen 2 items, and so they are changed upon being traded to Gen 2. A Pokémon with a catch rate of 25 will be changed to 146. A Pokémon with a catch rate of 45 will be changed to 83. A Pokémon with a catch rate of 50 will be changed to 174. And a Pokémon with a catch rate of 90, 100, 120, 127, 190, or 255 will be changed to 173. So after trading our Psyduck to Gen 2, its held item will be number 173, which is a regular Berry.
The next chunk of data to analyze is 05273239.
These are the Pokémon's four moves, in order. Psyduck knows Move 05, Move 27, Move 32, and Move 39. Converting that into decimal, it's 5, 39, 50, and 57. Which moves are those? Well, get ready for another massively-long list!
1. Pound
2. Karate Chop
3. Doubleslap
4. Comet Punch
5. Mega Punch
6. Pay Day
7. Fire Punch
8. Ice Punch
9. Thunderpunch
10. Scratch
11. Vicegrip
12. Guillotine
13. Razor Wind
14. Swords Dance
15. Cut
16. Gust
17. Wing Attack
18. Whirlwind
19. Fly
20. Bind
21. Slam
22. Vine Whip
23. Stomp
24. Double Kick
25. Mega Kick
26. Jump Kick
27. Rolling Kick
28. Sand-Attack
29. Headbutt
30. Horn Attack
31. Fury Attack
32. Horn Drill
33. Tackle
34. Body Slam
35. Wrap
36. Take Down
37. Thrash
38. Double-Edge
39. Tail Whip
40. Poison Sting
41. Twineedle
42. Pin Missile
43. Leer
44. Bite
45. Growl
46. Roar
47. Sing
48. Supersonic
49. Sonicboom
50. Disable
51. Acid
52. Ember
53. Flamethrower
54. Mist
55. Water Gun
56. Hydro Pump
57. Surf
58. Ice Beam
59. Blizzard
60. Psybeam
61. Bubblebeam
62. Aurora Beam
63. Hyper Beam
64. Peck
65. Drill Peck
66. Submission
67. Low Kick
68. Counter
69. Seismic Toss
70. Strength
71. Absorb
72. Mega Drain
73. Leech Seed
74. Growth
75. Razor Leaf
76. Solarbeam
77. Poisonpowder
78. Stun Spore
79. Sleep Powder
80. Petal Dance
81. String Shot
82. Dragon Rage
83. Fire Spin
84. Thundershock
85. Thunderbolt
86. Thunder Wave
87. Thunder
88. Rock Throw
89. Earthquake
90. Fissure
91. Dig
92. Toxic
93. Confusion
94. Psychic
95. Hypnosis
96. Meditate
97. Agility
98. Quick Attack
99. Rage
100. Teleport
101. Night Shade
102. Mimic
103. Screech
104. Double Team
105. Recover
106. Harden
107. Minimize
108. Smokescreen
109. Confuse Ray
110. Withdraw
111. Defense Curl
112. Barrier
113. Light Screen
114. Haze
115. Reflect
116. Focus Energy
117. Bide
118. Metronome
119. Mirror Move
120. Selfdestruct
121. Egg Bomb
122. Lick
123. Smog
124. Sludge
125. Bone Club
126. Fire Blast
127. Waterfall
128. Clamp
129. Swift
130. Skull Bash
131. Spike Cannon
132. Constrict
133. Amnesia
134. Kinesis
135. Softboiled
136. Hi Jump Kick
137. Glare
138. Dream Eater
139. Poison Gas
140. Barrage
141. Leech Life
142. Lovely Kiss
143. Sky Attack
144. Transform
145. Bubble
146. Dizzy Punch
147. Spore
148. Flash
149. Psywave
150. Splash
151. Acid Armor
152. Crabhammer
153. Explosion
154. Fury Swipes
155. Bonemerang
156. Rest
157. Rock Slide
158. Hyper Fang
159. Sharpen
160. Conversion
161. Tri Attack
162. Super Fang
163. Slash
164. Substitute
165. Struggle
So it looks like our Psyduck's moveset is Mega Punch, Tail Whip, Disable, and Surf. Fair enough.
The next data is CEB2. This is the ID number of Psyduck's OT, which is 52914 in decimal.
After that is 009D0F. This is how much total experience Psyduck has. This is 40207 in decimal. With that much experience, a Pokémon like Psyduck should be at Level 34, since it levels up in the Medium Fast group. And that checks out: we already saw it was Level 34. Only 2668 Exp. Points left until Level 35! This does seem to make the Pokémon's level redundant though, as it can easily be calculated from the experience.
The next string to analyze is 005B0091001600C8036D. It helps to break it up into chunks: 005B, 0091, 0016, 00C8, 036D. This is the Pokémon's stat experience (similar to EVs in modern games). They're in the order of HP, Attack, Defense, Speed, and Special. Not much really to talk about here.
After that is 4C90. This is the Pokémon's DVs (similar to IVs in current games). Now I know what you're thinking: how can a single 4-digit number store all five DVs? We needed twenty digits for stat experience. What makes DVs different? Well, for one, DVs can only go from 0 to 15, not 0 to 65535. This means that we only need a single digit to store each DV, since digits in hex can range from 0 to 15 (0 to F). They go in the order of Attack, Defense, Speed, and Special. Thus, this Psyduck's DVs are 4 Attack, 12 Defense, 9 Speed, and 0 Special.
What about HP?
Good question.
In Gen 1, a Pokémon's HP DV is calculated based on the values of the other four. First, you write the DVs in the order of Attack, Defense, Speed, Special. Then, if it's an odd number, you change it to a 1. If it's an even number, you change it to a 0. This gives you a four-digit binary number, which will be that Pokémon's HP DV. In the case of our Psyduck, the only odd-numbered DV is Speed, so it will have a binary number of 0010, which gives it an HP DV of 2.
The next piece of information we see is 121E1206. This information is the PP of each of Psyduck's moves. In order, from first move to last, this is 12, 1E, 12, 06. In decimal, that's 18, 30, 18, 6. Information about PP Ups is also stored here. You see, a move can never have more than 64 PP. That'd be a 40-PP move with three PP Ups having been used. But we have two hexadecimal digits to work with, so we can store numbers up to 256 here. That's a large chunk of unused numbers. As a result, this is how knowledge of PP Up usage is stored: an additional 64 is added for each PP Up used. We'll use one of the 18 PP moves as an example. If we used a PP Up on that move, then the number stored here would be 82. A second PP Up would be 146. And a third PP Up would be 210. In this example, though, no PP Ups have been used on any of this Psyduck's moves.
The next chunk of data is 22. This is the Pokémon's level. HEY WAIT A SECOND. Didn't we already do this? Yep. We did. And when we hit this point, the game recalculates the Pokémon's level based on this second number, even though, in practice, the two numbers are always identical to one another. This makes the first level calculation totally pointless! Talk about bad programming.
And then the last part of the massive number is 502C2E3129.
These are five two-digit numbers (50, 2C, 2E, 31, 29). These are Psyduck's stats, in order of HP, Attack, Defense, Speed, and Special. In decimal, this corresponds to 80, 44, 46, 49, and 41. We could have calculated these numbers ourselves using the Pokémon's species's base stats, and our Pokémon's level, DVs, and stat experience. But the game helpfully does it for us here. This should pose a question: why? Why not just terminate the code after the Pokémon's PP? Everything else after it seems redundant, right?
Well, that's a good point, and it seems that the programmers thought so too, because when you are viewing almost ANY Pokémon, the code does indeed terminate at that point. But there are six exceptions: the six Pokémon in your party. For whatever reason, the programmers wanted Pokémon in Bill's PC to be stored in a more compressed way, so their coding stops after the PP is calculated. But party Pokémon have the second "level" calculation and the stat calculation. I'm guessing this is because they can level up and change their stats as a result, while Pokémon in Bill's PC cannot do so unless withdrawn first.
And in fact, upon being withdrawn from Bill's PC, a Pokémon's stats are re-calculated again. This actually leads to a potential exploit that the player can use: normally, when your Pokémon gains stat experience, its stats won't change to reflect that until it levels up. But by depositing it and then withdrawing it, you can reap those benefits immediately. This trick can also be used to continue to "stat train" Pokémon after they reach Level 100.
Well, unsurprisingly, it's just a bunch of ones and zeroes. Let's take a look at an example from Gen 1.
1011110000000001000100001000100100000000010101000101011011111000000101001001110011001000111001110011101011001000000000100111010000111100000000010110110000000010010001000000000001011000000000110010000000001101101101010011001001000000010010000111100001001000000110001000100101000000101100001011100011000100101001
Yep, that's a Pokémon. It's a bit unwieldy to talk about in this form. It'd be easier if we converted this giant binary number into hexadecimal.
2F004422401515BE05273239CEB2009D0F005B0091001600C8036D4C90121E120622502C2E3129
That's our Pokémon.
When the game looks at the data for your Pokémon, it sees something like this. Each and every Pokémon has a data structure like this. But, like, what does it all mean? Well, let's take a look.
We'll start with the first two digits: 2F. What does this mean? Well, this tells us what species of Pokémon we're dealing with. 2F. The game is in hexadecimal (base-16), so let's just go ahead and convert that into decimal (base-10), and we see that this returns a number of 47. So it's Pokémon number 47. Uh... which one is that? Well, the 47th Pokémon in the Pokédex is Parasect, so is it that? Nope!
Rather than just using Pokédex order like a sensible person, Gen 1 games have the list of Pokémon programmed in a completely arbitrary order. I'm guessing this is just the order that the programmers came up with the designs and put them into the game:
1. Rhydon
2. Kangaskhan
3. Nidoran-Male
4. Clefairy
5. Spearow
6. Voltorb
7. Nidoking
8. Slowbro
9. Ivysaur
10. Exeggutor
11. Lickitung
12. Exeggcute
13. Grimer
14. Gengar
15. Nidoran-Female
16. Nidoqueen
17. Cubone
18. Rhyhorn
19. Lapras
20. Arcanine
21. Mew
22. Gyarados
23. Shellder
24. Tentacool
25. Gastly
26. Scyther
27. Staryu
28. Blastoise
29. Pinsir
30. Tangela
33. Growlithe
34. Onix
35. Fearow
36. Pidgey
37. Slowpoke
38. Kadabra
39. Graveler
40. Chansey
41. Machoke
42. Mr.Mime
43. Hitmonlee
44. Hitmonchan
45. Arbok
46. Parasect
47. Psyduck
48. Drowzee
49. Golem
51. Magmar
53. Electabuzz
54. Magneton
55. Koffing
57. Mankey
58. Seel
59. Diglett
60. Tauros
64. Farfetch'd
65. Venonat
66. Dragonite
70. Doduo
71. Poliwag
72. Jynx
73. Moltres
74. Articuno
75. Zapdos
76. Ditto
77. Meowth
78. Krabby
82. Vulpix
83. Ninetales
84. Pikachu
85. Raichu
88. Dratini
89. Dragonair
90. Kabuto
91. Kabutops
92. Horsea
93. Seadra
96. Sandshrew
97. Sandslash
98. Omanyte
99. Omastar
100. Jigglypuff
101. Wigglytuff
102. Eevee
103. Flareon
104. Jolteon
105. Vaporeon
106. Machop
107. Zubat
108. Ekans
109. Paras
110. Poliwhirl
111. Poliwrath
112. Weedle
113. Kakuna
114. Beedrill
116. Dodrio
117. Primeape
118. Dugtrio
119. Venomoth
120. Dewgong
123. Caterpie
124. Metapod
125. Butterfree
126. Machamp
128. Golduck
129. Hypno
130. Golbat
131. Mewtwo
132. Snorlax
133. Magikarp
136. Muk
138. Kingler
139. Cloyster
141. Electrode
142. Clefable
143. Weezing
144. Persian
145. Marowak
147. Haunter
148. Abra
149. Alakazam
150. Pidgeotto
151. Pidgeot
152. Starmie
153. Bulbasaur
154. Venusaur
155. Tentacruel
157. Goldeen
158. Seaking
163. Ponyta
164. Rapidash
165. Rattata
166. Raticate
167. Nidorino
168. Nidorina
169. Geodude
170. Porygon
171. Aerodactyl
173. Magnemite
176. Charmander
177. Squirtle
178. Charmeleon
179. Wartortle
180. Charizard
185. Oddish
186. Gloom
187. Vileplume
188. Bellsprout
189. Weepinbell
190. Victreebel
You may notice that some numbers were skipped. For example, there is no Pokémon at number 160. What's going on there? Well, the two digits at the beginning can store any number from 0 to 255. But only 151 of those numbers have data for Pokémon. If there is a number there that does not correspond to a Pokémon (such as 160), then a glitch Pokémon is used instead. This is also the case for any number above 190. So why is it programmed this way? Why not just have a list of 151 Pokémon? Well, it's likely that there were originally 190 different Pokémon, and 39 of them were taken out. This theory is seemingly confirmed when you look at some of the artwork from the Gen 2 Beta previews. The artwork of the new Pokémon are numbered. Chikorita is 191, Qwilfish is 250, Marill is 222, Girafarig is 242, Cyndaquil is 197, and Tyranitar is 183, hinting that Tyranitar was originally a Gen 1 Pokémon that got scrapped. This was later confirmed in an interview with Shigeki Morimoto.
Anyways, let's get back to our example Pokémon. We see that it is number 47, which is Psyduck.
The next four digits are 0044. This tells us how much HP Psyduck has remaining. It has 0044 HP in Hex, which, put into decimal, is 68 HP.
Next is 22. This is the Pokémon's level. Remember that it is in Hex, so this isn't a Level 22 Psyduck, it's a Level 34 Psyduck. There's more to this part of the code, but we'll explore that later on.
After that is 40. This tells us what status ailment the Psyduck has. 00 means no status ailment, 04 means sleep, 08 means poison, 10 means burn, 20 means freeze, and 40 means paralyze. So this is a paralyzed Psyduck. You should notice that there are some status ailments missing. The most obvious is confusion. The reason for this is that confusion only exists during battle, and so it's stored elsewhere. The Pokémon data, when viewing a Pokémon in either your party or Bill's PC, won't show confusion. The other missing one is bad poison, inflicted by Toxic, which accelerates over time. This is also stored elsewhere, because it's only in battle. As soon as the battle ends, the bad poison will become normal poison.
The next part is 1515. This is the Pokémon's type. The first two digits are Type 1 and the second two digits are Type 2. For Pokémon with only a single type, you just put the same two-digit number twice. The types are as follows:
00 = Normal
01 = Fighting
02 = Flying
03 = Poison
04 = Ground
05 = Rock
07 = Bug
08 = Ghost
14 = Fire
15 = Water
16 = Grass
17 = Electric
18 = Psychic
19 = Ice
1A = Dragon
In our case, our Psyduck is a pure Water-type. This is obvious, because ALL PSYDUCK ARE THAT WAY. Yes, this part of the information is completely redundant. You can always figure out a Pokémon's type based on its species, so there's no need to code this separately. But they did it anyways (bad coding is gonna be a recurring theme). There are only two ways to change a Pokémon's type in Gen 1: evolve it, which would change its species as well; or have Porygon use Conversion, which would wear off after the end of the battle.
Speaking of bad programming, check out the next piece of data here: BE. This is the Pokémon's catch rate. This is easily the worst of the badly-programmed parts of Gen 1: they gave EACH INDIVIDUAL POKÉMON a catch rate. Not just each species, but each individual. It's completely redundant because, again, you can get this data via the species. In our case, Psyduck has a catch rate of 190, as it should. (By the way, this number is stored on the individual Pokémon and it will not change if the Pokémon's species changes via evolution.)
There is, however, an exception. By the time Yellow came out, they realized that this number was redundant, so they used it to mark your starter Pikachu. See, a normal Pikachu has a catch rate of 190, but the Pikachu that Professor Oak gives you at the start of the game has a special catch rate of 163. This is how the game knows which Pikachu is your starter (it also checks that the ID number of Pikachu's OT matches with yours). This allows the starter Pikachu to have some unique properties. Specifically...
...it walks onto the screen at the start of the battle, rather than being thrown out of a Poké Ball.
...it says "Pika!" instead of the standard Pikachu cry.
...it can participate in the Pikachu Beach minigame (Virtual Console version only).
...it will be unable to evolve into Raichu unless traded to another game first.
...it will be unable to be released unless traded to another game first or evolved first.
...it will have a friendship stat (which is stored elsewhere in the game).
...it will have unique animations and voicing different from other Pikachu if transferred to Pokémon Stadium or Pokémon Stadium 2.
Another interesting case is Kadabra. Kadabra has a catch rate of 100 in every single game. But, upon being captured, the game is hard-coded in Yellow (and only Yellow) to change this number to be 96. This is ONLY in Yellow and only on Kadabra. Why would they do that? Well, I'm guessing that they were preparing for Gen 2. More on this in a bit. First, let's talk about the prize Pokémon from Pokémon Stadium. These Pokémon are obtained by clearing Round 1 and Round 2 of the Gym Leader's Castle. But if you do, your Pokémon will be slightly different under-the-hood. Specifically, its catch rate is set to 167 if you obtained it from Round 1, and 168 if you obtained it from Round 2. The Amnesia Psyduck is also set to 168.
So why are these Pokémon marked? Held items.
Held items don't exist in Gen 1. But they do exist in Gen 2. I think that by the time Yellow and Stadium came out, the programmers realized that giving each individual Pokémon a catch rate was redundant, so they opted to repurpose this set of data. Indeed, in Gen 2, this part stores the Pokémon's held item. For example, suppose I gave a Pokémon a Protein to hold. This corresponds to the number 27. If I trade it over to Gen 1, then it has a catch rate of 27. This ensures that it will still be holding the Protein when I trade it back. The item isn't lost. (A catch rate of 0 corresponds to no held item.)
So why flag these Pokémon as being special? So that they can have different items when traded to Gen 2. There are several items that can ONLY be obtained this way. Most famously, TM09 (Psych Up) isn't found anywhere in the game in Gold/Silver/Crystal. The only way to get it is that an Abra caught in Gen 1 has the catch rate that would allow it to have this item upon being traded to Gen 2.
Out of curiosity, what's the held item that corresponds to our Psyduck? What's item 190? What will it hold when traded to Gen 2? The answer is... a corrupted glitchy mess. Something's gone wrong here. What happened?
Well, there are a few catch rates that are "bad" for Gen 2 items, and so they are changed upon being traded to Gen 2. A Pokémon with a catch rate of 25 will be changed to 146. A Pokémon with a catch rate of 45 will be changed to 83. A Pokémon with a catch rate of 50 will be changed to 174. And a Pokémon with a catch rate of 90, 100, 120, 127, 190, or 255 will be changed to 173. So after trading our Psyduck to Gen 2, its held item will be number 173, which is a regular Berry.
The next chunk of data to analyze is 05273239.
These are the Pokémon's four moves, in order. Psyduck knows Move 05, Move 27, Move 32, and Move 39. Converting that into decimal, it's 5, 39, 50, and 57. Which moves are those? Well, get ready for another massively-long list!
1. Pound
2. Karate Chop
3. Doubleslap
4. Comet Punch
5. Mega Punch
6. Pay Day
7. Fire Punch
8. Ice Punch
9. Thunderpunch
10. Scratch
11. Vicegrip
12. Guillotine
13. Razor Wind
14. Swords Dance
15. Cut
16. Gust
17. Wing Attack
18. Whirlwind
19. Fly
20. Bind
21. Slam
22. Vine Whip
23. Stomp
24. Double Kick
25. Mega Kick
26. Jump Kick
27. Rolling Kick
28. Sand-Attack
29. Headbutt
30. Horn Attack
31. Fury Attack
32. Horn Drill
33. Tackle
34. Body Slam
35. Wrap
36. Take Down
37. Thrash
38. Double-Edge
39. Tail Whip
40. Poison Sting
41. Twineedle
42. Pin Missile
43. Leer
44. Bite
45. Growl
46. Roar
47. Sing
48. Supersonic
49. Sonicboom
50. Disable
51. Acid
52. Ember
53. Flamethrower
54. Mist
55. Water Gun
56. Hydro Pump
57. Surf
58. Ice Beam
59. Blizzard
60. Psybeam
61. Bubblebeam
62. Aurora Beam
63. Hyper Beam
64. Peck
65. Drill Peck
66. Submission
67. Low Kick
68. Counter
69. Seismic Toss
70. Strength
71. Absorb
72. Mega Drain
73. Leech Seed
74. Growth
75. Razor Leaf
76. Solarbeam
77. Poisonpowder
78. Stun Spore
79. Sleep Powder
80. Petal Dance
81. String Shot
82. Dragon Rage
83. Fire Spin
84. Thundershock
85. Thunderbolt
86. Thunder Wave
87. Thunder
88. Rock Throw
89. Earthquake
90. Fissure
91. Dig
92. Toxic
93. Confusion
94. Psychic
95. Hypnosis
96. Meditate
97. Agility
98. Quick Attack
99. Rage
100. Teleport
101. Night Shade
102. Mimic
103. Screech
104. Double Team
105. Recover
106. Harden
107. Minimize
108. Smokescreen
109. Confuse Ray
110. Withdraw
111. Defense Curl
112. Barrier
113. Light Screen
114. Haze
115. Reflect
116. Focus Energy
117. Bide
118. Metronome
119. Mirror Move
120. Selfdestruct
121. Egg Bomb
122. Lick
123. Smog
124. Sludge
125. Bone Club
126. Fire Blast
127. Waterfall
128. Clamp
129. Swift
130. Skull Bash
131. Spike Cannon
132. Constrict
133. Amnesia
134. Kinesis
135. Softboiled
136. Hi Jump Kick
137. Glare
138. Dream Eater
139. Poison Gas
140. Barrage
141. Leech Life
142. Lovely Kiss
143. Sky Attack
144. Transform
145. Bubble
146. Dizzy Punch
147. Spore
148. Flash
149. Psywave
150. Splash
151. Acid Armor
152. Crabhammer
153. Explosion
154. Fury Swipes
155. Bonemerang
156. Rest
157. Rock Slide
158. Hyper Fang
159. Sharpen
160. Conversion
161. Tri Attack
162. Super Fang
163. Slash
164. Substitute
165. Struggle
So it looks like our Psyduck's moveset is Mega Punch, Tail Whip, Disable, and Surf. Fair enough.
The next data is CEB2. This is the ID number of Psyduck's OT, which is 52914 in decimal.
After that is 009D0F. This is how much total experience Psyduck has. This is 40207 in decimal. With that much experience, a Pokémon like Psyduck should be at Level 34, since it levels up in the Medium Fast group. And that checks out: we already saw it was Level 34. Only 2668 Exp. Points left until Level 35! This does seem to make the Pokémon's level redundant though, as it can easily be calculated from the experience.
The next string to analyze is 005B0091001600C8036D. It helps to break it up into chunks: 005B, 0091, 0016, 00C8, 036D. This is the Pokémon's stat experience (similar to EVs in modern games). They're in the order of HP, Attack, Defense, Speed, and Special. Not much really to talk about here.
After that is 4C90. This is the Pokémon's DVs (similar to IVs in current games). Now I know what you're thinking: how can a single 4-digit number store all five DVs? We needed twenty digits for stat experience. What makes DVs different? Well, for one, DVs can only go from 0 to 15, not 0 to 65535. This means that we only need a single digit to store each DV, since digits in hex can range from 0 to 15 (0 to F). They go in the order of Attack, Defense, Speed, and Special. Thus, this Psyduck's DVs are 4 Attack, 12 Defense, 9 Speed, and 0 Special.
What about HP?
Good question.
In Gen 1, a Pokémon's HP DV is calculated based on the values of the other four. First, you write the DVs in the order of Attack, Defense, Speed, Special. Then, if it's an odd number, you change it to a 1. If it's an even number, you change it to a 0. This gives you a four-digit binary number, which will be that Pokémon's HP DV. In the case of our Psyduck, the only odd-numbered DV is Speed, so it will have a binary number of 0010, which gives it an HP DV of 2.
The next piece of information we see is 121E1206. This information is the PP of each of Psyduck's moves. In order, from first move to last, this is 12, 1E, 12, 06. In decimal, that's 18, 30, 18, 6. Information about PP Ups is also stored here. You see, a move can never have more than 64 PP. That'd be a 40-PP move with three PP Ups having been used. But we have two hexadecimal digits to work with, so we can store numbers up to 256 here. That's a large chunk of unused numbers. As a result, this is how knowledge of PP Up usage is stored: an additional 64 is added for each PP Up used. We'll use one of the 18 PP moves as an example. If we used a PP Up on that move, then the number stored here would be 82. A second PP Up would be 146. And a third PP Up would be 210. In this example, though, no PP Ups have been used on any of this Psyduck's moves.
The next chunk of data is 22. This is the Pokémon's level. HEY WAIT A SECOND. Didn't we already do this? Yep. We did. And when we hit this point, the game recalculates the Pokémon's level based on this second number, even though, in practice, the two numbers are always identical to one another. This makes the first level calculation totally pointless! Talk about bad programming.
And then the last part of the massive number is 502C2E3129.
These are five two-digit numbers (50, 2C, 2E, 31, 29). These are Psyduck's stats, in order of HP, Attack, Defense, Speed, and Special. In decimal, this corresponds to 80, 44, 46, 49, and 41. We could have calculated these numbers ourselves using the Pokémon's species's base stats, and our Pokémon's level, DVs, and stat experience. But the game helpfully does it for us here. This should pose a question: why? Why not just terminate the code after the Pokémon's PP? Everything else after it seems redundant, right?
Well, that's a good point, and it seems that the programmers thought so too, because when you are viewing almost ANY Pokémon, the code does indeed terminate at that point. But there are six exceptions: the six Pokémon in your party. For whatever reason, the programmers wanted Pokémon in Bill's PC to be stored in a more compressed way, so their coding stops after the PP is calculated. But party Pokémon have the second "level" calculation and the stat calculation. I'm guessing this is because they can level up and change their stats as a result, while Pokémon in Bill's PC cannot do so unless withdrawn first.
And in fact, upon being withdrawn from Bill's PC, a Pokémon's stats are re-calculated again. This actually leads to a potential exploit that the player can use: normally, when your Pokémon gains stat experience, its stats won't change to reflect that until it levels up. But by depositing it and then withdrawing it, you can reap those benefits immediately. This trick can also be used to continue to "stat train" Pokémon after they reach Level 100.