In this thread I present primarily a
theory on learned moves and evolutions in R/B/Y. The main application of the method I detail is to find "stone" and trade evolutions for glitch Pokemon, as we have all been suspecting exist for a long time. To actually apply the method a HEX editor and ROM are required. I have personally investigated only on a Blue version ROM, but it is reasonable to conclude that the results can be generalized to Red and Yellow.
Summaries are in
blue, for the skimmers among you.
------------------------------
Part 1 is not new information:
1. Evolutions and learned moves for all Pokemon are stored together in a database separate from the main Pokemon database (usually referred to as simply the Pokemon Database). For nonglitch Pokemon this database begins at offset 3B1D8 and ends at 3B9EB, and goes in HEX order, not Dex order.The format of the learned moves and evolutions database is illustrated by this example, which I have copied from Okk:
Weepinbell:
00 02 2F 01 BE 00 0D 23 0F 4D 12 4F 17 4E 1D 33 26 4B 31 15
Victreebel:
00 00 0D 23 0F 4D 12 4F
For those who don't know how to read this:
Weepinbell evolves into Victreebel via leaf stone at level 1 or above (00 02 2F 01 BE)
Weepinbell learns: L13 - Wrap, L15 - Poisonpowder, L18 - Sleep Powder, L23 - Stun Spore, L29 - Acid, L38 - Razor Leaf, L49 - Slam
Victreebel learns: L13 - Wrap, L15 - Poisonpowder, L18 - Sleep Powder
Now the above description is not completely accurate, and is not the whole story. One detail that we need to be aware of is that the
leading 00 that marks the beginning of each entry here is correctly interpreted as an
ending 00 that marks the end. (This can be verified by noticing that Rhydon's entry, the very first, does not have the extra leading 00.)
But even more important, while seemingly trivial, is this:
The entries are of variable length. This suggests that there exists a pointer / reference / lookup table that explicity gives the initial offset of each entry. Where might such a table be? Why, directly preceding the database itself, of course! (Ctrl+F doesn't work here, sorry.) A casual glance picks out suspicious patterns:
This sample taken from 3B05C (the beginning of the reference table) to 3B07F.
D8 71 E6 71
F2 71 03 72 15 72 24 72 33 72 3B 72 4B 72 5E 72
62 72 6E 72 80 72 91 72 97 72 A8 72 B0 72 BF 72Comparing with the initial offsets for the first few entries in the database (and here is where "ending 00" instead of "leading 00" counts - otherwise everything would be off by 1):
Pokemon - Initial Offset - Reference Table Entry
Rhydon - 3B
1D8 -
D8 7
1Kangaskhan - 3B
1E6 -
E6 7
1Nidoran M - 3B
1F2 -
F2 7
1Clefairy - 3B
203 -
03 7
2The conclusion is clear: The reference table entries, when interpreted with least significant byte first, give the initial offsets of the database entries,
except that a correction of 34000 (hex) is implied.
------------------------------
To extend our results to glitch Pokemon, we search the ROM for data from the Melchiors. Ctrl+F is indispensible. We will use "A" (RB:[BF]) as our example and the subject of our search. Simply pick a few learned moves from "A"'s GlitchDex entry, convert them to the required form, and Ctrl+F away:
E6 04 -
01EDC, 4A015, 6D94E, 6DA40. - lvl 230 learn comet punch
F0 CC -
01E0E, 3C527, 3C5E3, 3C703, 3C786. - lvl 240 learn TM04
F9 F0 - 01D6E, 01D7F, 01D8D, 01DF3,
01E14,
01E70, 66947, 69008. - lvl 249 learn TM40
FE 15 - 01567, 01637, 01C45,
01ECA, 0C493, 0C629, 2078D, 30339, 4C8AC, 4CD9E. - lvl 254 learn Slam
Our search indicates that 01E00 - 01F00 is the approximate range we're dealing with.
Now let's go back to that reference table. The reference table entry for "A" (by extrapolation) is 00 1E. That seems to go along with the results of our search... except that the correction of 34000 is neglected. Indeed, searches on some other glitch Pokemon also suggest that
the "correction" does not apply to glitch Pokemon.
This all summarizes to point number 2:
2. The initial offset for each Pokemon's evolutions and learned moves data entry is given explicitly by a pointer table beginning at offset 3B05C. The pointers given by the table only give 2 bytes per Pokemon (with LSB first); for nonglitch Pokemon, a correction of 34000 is implied, but for glitch Pokemon, there is no such "correction".------------------------------
For part #3, I'm not going to offer the justifying evidence here. Take notice especially of the "reading by 3's" principle:
3. The evolutions list is divided into entries consisting of 3 bytes each, except for those of "stone" evolutions, which have 4 bytes instead. The first byte in each entry indicates the evolution method, 01 meaning by level up, 02 meaning by evolution item (stone), 03 meaning by trade, 00 meaning the end of the evolutions list, and else meaning that the whole triplet is to be ignored. The second byte (third for "stone" evolutions) is the minimum level required for evolution and the third (fourth for "stone" evolutions) is the Pokemon evolved into. The second byte for "stone" evolutions indicates which item is required for evolution.------------------------------
Let's go back to our example. Here are the data starting at 01E00:
18 9C F0 CB A7 C8 F8 00 7C E0 BF 7D E0 C0 F0 CC
Now notice, if you haven't already, that
the evolutions list is NOT terminated by a 00 if the 00 is not the leading byte of a "triplet", as is the case in this example. In fact, the actual "terminating 00" (which is the term I will use) for the evolutions list for "A" is at 01E63, some while later. Examination of all this data reveals that "A" does not have any evolutions, whether by level up, stone, or trade.
Yet "A" learns TM04 at level 240, which from our search above must be at offset 01E0E; that's
before the evolutions list terminates.
One possible explanation, which you may be suspecting yourself, is that the "reading by 3's" principle is not always true. Perhaps. But there's a simpler explanation though:
While the evolutions list does not necessarily end at the first 00, the learned moves list does begin there.To give some evidence, I will list the entireity of "A"'s learned moves data, all the way up to the terminating 00 for learned moves at 01F1A. Starred items match with existing data from Melchior. This list accounts for all the learned moves in existing GlitchDex data (except possibly one, see the entry with a +). This list also predicts that "A" learns TM40 at lvl 111, which is not confirmed in existing GlitchDex data. The list was done entirely by hand.
[spoiler]01E08 - 7C E0 - lvl 124 learn TM24 *
BF 7D - lvl 191 learn Bone Club *
E0 C0 - lvl 224 learn "Superglitch" [C0] *
F0 CC - lvl 240 learn TM04 *
01E10 - 6F F0 - lvl 111 learn TM40 (Not confirmed)
CD 67 - lvl 205 learn Screech *
F9 F0 - lvl 249 learn TM40 *
CE 6F - lvl 206 learn Defense Curl *
01E18 - F0 CF - lvl 240 learn TM07 (can't learn 2 moves at the same level)
67 F0 - lvl 103 learn TM40 *
CB 47 - lvl 203 learn Absorb *
AF E0 - lvl 175 learn TM24 *
01E20 - CB D1 - lvl 203 learn TM09 (can't learn 2 moves at the same level)
73 2C - lvl 115 learn Bite *
73 2C - IDENTICAL TO 01E22
72 2C - lvl 114 learn Bite *
01E28 - 72 2C - IDENTICAL TO 01E26
D1 73 - lvl 209 learn Reflect *
2C 73 - lvl 44 learn Reflect *
2C 72 - lvl 44 learn Haze (can't learn 2 moves at the same level)
01E30 - 2C 72 - IDENTICAL TO 01E2E
2C D1 - lvl 44 learn TM09 (can't learn 2 moves at the same level)
73 2C - IDENTICAL TO 01E22
73 2C - IDENTICAL TO 01E22
01E38 - 72 2C - IDENTICAL TO 01E26
72 2C - IDENTICAL TO 01E26
D1 73 - IDENTICAL TO 01E2A
2C 73 - IDENTICAL TO 01E2C
01E40 - 2C 72 - IDENTICAL TO 01E2E
2C 72 - IDENTICAL TO 01E2E
23 05 - lvl 35 learn Mega Punch *
20 D9 - lvl 32 learn TM17 *
01E48 - 7D E0 - lvl 125 learn TM24 *
CE 7C - lvl 206 learn Sludge (can't learn 2 moves at the same level)
E0 CF - lvl 224 learn TM07 (can't learn 2 moves at the same level)
F8 00 - lvl 248 learn "Cooltrainer move" +Confirmed if "Cooltrainer move" counts as a "Superglitch"
01E50 - 7D E0 - IDENTICAL TO 01E48
CC 7C - lvl 204 learn Sludge *
E0 CD - lvl 224 learn TM05 (can't learn 2 moves at the same level)
F0 BF - lvl 240 learn "Superglitch" [BF] (can't learn 2 moves at the same level)
01E58 - 67 F0 - IDENTICAL TO 01E1A
C0 6F - lvl 192 learn Defense Curl *
F9 C9 - lvl 249 learn TM01 (can't learn 2 moves at the same level)
F0 C6 - lvl 240 learn HM03 (can't learn 2 moves at the same level)
01E60 - A7 C8 - lvl 167 learn HM05 *
F8 00 - IDENTICAL TO 01E4E
7C E0 - IDENTICAL TO 01E08
BF 7D - IDENTICAL TO 01E0A
01E68 - E0 C0 - IDENTICAL TO 01E0C
F0 C7 - lvl 240 learn HM04 (can't learn 2 moves at the same level)
6F F0 - IDENTICAL TO 01E10
C8 67 - lvl 200 learn Screech *
01E70 - F9 F0 - IDENTICAL TO 01E14
C9 6F - lvl 201 learn Defense Curl *
F0 CA - lvl 240 learn TM02 (can't learn 2 moves at the same level)
67 F0 - IDENTICAL TO 01E1A
01E78 - C6 47 - lvl 198 learn Absorb *
AF E0 - IDENTICAL TO 01E1E
C6 D1 - lvl 198 learn TM09 (can't learn 2 moves at the same level)
73 2C - IDENTICAL TO 01E22
01E80 - 72 2C - IDENTICAL TO 01E26
D1 73 - IDENTICAL TO 01E2A
2C 72 - IDENTICAL TO 01E2E
2C D1 - IDENTICAL TO 01E32
01E88 - 73 2C - IDENTICAL TO 01E22
72 2C - IDENTICAL TO 01E26
D1 73 - IDENTICAL TO 01E2A
2C 72 - IDENTICAL TO 01E2E
01E90 - 2C D1 - IDENTICAL TO 01E32
73 2C - IDENTICAL TO 01E22
72 2C - IDENTICAL TO 01E26
D1 73 - IDENTICAL TO 01E2A
01E98 - 2C 72 - IDENTICAL TO 01E2E
2C D1 - IDENTICAL TO 01E32
73 2C - IDENTICAL TO 01E22
72 2C - IDENTICAL TO 01E26
01EA0 - D1 73 - IDENTICAL TO 01E2A
2C 72 - IDENTICAL TO 01E2E
23 05 - IDENTICAL TO 01E44
20 D5 - lvl 32 learn TM13 (can't learn 2 moves at the same level)
01EA8 - 7D E0 - IDENTICAL TO 01E48
C9 7C - lvl 201 learn Sludge (can't learn 2 moves at the same level)
E0 CA - lvl 224 learn TM02 (can't learn 2 moves at the same level)
F8 00 - IDENTICAL TO 01E4E
01EB0 - 7D E0 - IDENTICAL TO 01E48
C7 7C - lvl 199 learn Sludge *
E0 C8 - lvl 224 learn HM05 (can't learn 2 moves at the same level)
F0 BF - IDENTICAL TO 01E56
01EB8 - 67 F0 - IDENTICAL TO 01E1A
C0 6F - IDENTICAL TO 01E5A
F9 C9 - IDENTICAL TO 01E5C
F0 D7 - lvl 240 learn TM15 (can't learn 2 moves at the same level)
01EC0 - A7 C8 - IDENTICAL TO 01E60
F0 D8 - lvl 240 learn TM16 (can't learn 2 moves at the same level)
3C E0 - lvl 60 learn TM24 *
D8 FE - lvl 216 learn TM54 *
01EC8 - 14 D8 - lvl 20 learn TM16 *
FE 15 - lvl 254 learn Slam *
28 28 - lvl 40 learn Poison Sting *
21 40 - lvl 33 learn Peck *
01ED0 - 91 0E - lvl 145 learn Swords Dance *
10 FA - lvl 16 learn TM50 *
85 D0 - lvl 133 learn TM08 *
3C E6 - lvl 60 learn TM30 (can't learn 2 moves at the same level)
01ED8 - 07 EA - lvl 7 learn TM34 *
85 D0 - IDENTICAL TO 01ED4
E6 04 - lvl 230 learn Comet Punch *
20 08 - lvl 32 learn Ice Punch (can't learn 2 moves at the same level)
01EE0 - 7E 0F - lvl 126 learn Cut *
22 0D - lvl 34 learn Razor Wind *
20 FA - lvl 32 learn TM50 (can't learn 2 moves at the same level)
18 06 - lvl 24 learn Pay Day *
01EE8 - 7E 07 - lvl 126 learn Fire Punch (can't learn 2 moves at the same level)
22 0D - IDENTICAL TO 01EE2
20 FA - IDENTICAL TO 01EE4
F0 D7 - IDENTICAL TO 01EBE
01EF0 - 0F D0 - lvl 15 learn TM08 *
AF E0 - IDENTICAL TO 01E1E
D8 C9 - lvl 216 learn TM01 (can't learn 2 moves at the same level)
AF E0 - IDENTICAL TO 01E1E
01EF8 - D8 FA - lvl 216 learn TM50 (can't learn 2 moves at the same level)
85 D0 - IDENTICAL TO 01ED4
E6 03 - lvl 230 learn Doubleslap (can't learn 2 moves at the same level)
FE 02 - lvl 254 learn Karate Chop (can't learn 2 moves at the same level)
01F00 - 21 19 - lvl 33 learn Mega Kick (can't learn 2 moves at the same level)
1F 38 - lvl 31 learn Hydro Pump *
08 21 - lvl 8 learn Tackle *
29 1F - lvl 41 learn Fury Attack *
01F08 - 28 03 - lvl 40 learn Doubleslap (can't learn 2 moves at the same level)
21 39 - lvl 33 learn Surf (can't learn 2 moves at the same level)
1F 11 - lvl 31 learn Wing Attack (can't learn 2 moves at the same level)
30 90 - lvl 48 learn Transform *
01F10 - 0E 10 - lvl 14 learn Gust *
2A 12 - lvl 42 learn Whirlwind *
13 0D - lvl 19 learn Razor Wind *
20 FA - IDENTICAL TO 01EE4
01F18 - C9 81 - lvl 201 learn Swift (can't learn 2 moves at the same level)
00 - terminating 00[/spoiler]
I would say that's an excellent match.
The summary that doesn't shorten anything:
4. Despite the fact that the evolution list does NOT necessarily end when it reaches a 00 (since it need not be the first byte in a triplet), the level-up moves list DOES begin immediately after the first 00. In the level-up moves list, each entry is 2 bytes long; the first byte indicates the level at which the move is learned, and the second byte indicates which move is learned. A 00 in the first byte marks the end of the list. The restriction is that two moves cannot be learned at the same level; if the level up moves table contains more than one move to be learned at the same level, only the first one that occurs in the list can be learned. The same move can be learned multiple times; however, keep in mind that if a Pokemon already knows a certain move and it reaches a level at which it is scheduled to learn that same move, the option will not be given to learn that move again.And that's all there is to it!
Summary for "A":
Pointer Table Entry: 00 1E (pointer table entry at offset 3B1D8)
Initial Offset for Evolutions: 01E00
Terminating 00 for Evolutions: 01E63
Initial 00 for Learned Moves: 01E07
Terminating 00 for Learned Moves: 01F1A
EVOLUTIONS
None
LEARNED MOVES
See above.------------------------------
The point of learning all this is, by parsing through the evolutions list for each glitch Pokemon, previously undiscovered "stone" and trade evolutions can be found.
As a demonstration of this, here is a
glitch Pokemon stone evolution discovered using the above methods. The example shown here is not one that I would consider a "typical example"; it manages to highlight some other curious stuff as well.
We notice that "Japanese symbol" (RB:[C1]), "O PkMn4 X" (RB:[CF]), and "|| g" (RB:[EE]) all evolve into Spearow at level 9. This leads us to suspect that their database entries have the same location, or nearly the same. And indeed, their respective reference table entries are 27 28, 0E 28, and 0E 28. But we immediately notice a problem: 27 minus 0E is not a multiple of 3! They are
misaligned. Fortunately:
02860 - AF D0 7A EA B0 D0 C9 00 08 04 0C
02 0A 06 0E 01
02870 - 09 05
Explanation: There are no evolutions for either the 0280E start or the 02827 start, up to the 02860's. Now, put into triplets, the "Japanese symbol" evolutions data reads
AFD07A EAB0D0 C90008 040C02 0A060E
010905and registers the known Spearow evolution. However, the "O PkMn4 X" and "|| g" evolutions data reads
AFD0 7AEAB0 D0C900 08040C
020A060E 010905;
the triplets are paired differently due to the misaligned start. We discover that
there is a stone evolution for "O PkMn4 X" and "|| g" into Gengar at or above level 6 using Moon Stone .
But this is not just a regular coincidence here: Not only is there a "stone" evolution for them, the item required for evolution is indeed an
actual stone here.
Curiously, when I tested this for "O PkMn4 X", using the Moon Stone did not work. Fortunately, though, there's also the
Evolve without a stone glitch, and using that method it did work. Don't ask me why the evolve without a stone glitch is required and actual stones don't work.



(Comments on the screenshots:
The Exxegutor was there for evolve without a stone.
Sorry I overwrote the original name; it was accidental.
Yes I could have done it one level earlier but whatever.)
------------------------------
In conclusion: I am confident that we will be able to find a great many "stone" and trade evolutions for the glitches. Naively considering "probability", "stone" and trade evolutions should account for 2/3 of all the glitch evolutions out there!
Incidentally, as more glitch "stone" evolutions are discovered, the evolve with a stone glitch will certainly elevate to "Major Glitch" status.
Edit: Took the data for "A" out of the code box because it was really damn small. Still in a spoiler. The format is crud now but whatever.