Jump to content

Celebi Egg glitch (party method): Difference between revisions

no edit summary
>Torchickens
No edit summary
>Bbbbbbbbba
No edit summary
Line 30:
5) Deposit the first Pokémon and then the second Pokémon, and use move PkMn w/o mail to move the Egg to the top of the party.
 
6) Deposit Pokémon 2-65, which may shift back bytes for the Egg's name each time. After the depositing, Beat Up [0xFB] (move 3) will shift into the Pokémon species byte 2, allowing you to obtain Celebi after hatching the Egg.
 
7) Use the Bicycle to cycle around until the Egg hatches into a Celebi.
Line 42:
 
To see which IDs correspond with which moves, Pokémon and items, refer to [[The Big HEX List]].
 
==Explanation==
In Gen II, the party Pokémon data are stored in the wram as follows:
 
Party count (1 byte)
Party Pokémon 1 species (1 byte)
Party Pokémon 2 species (1 byte)
...
Party Pokémon 6 species (1 byte)
Extra space used for end-of-party marker (1 byte)
Party Pokémon 1 data (48 bytes)
Party Pokémon 2 data (48 bytes)
...
Party Pokémon 6 data (48 bytes)
Party Pokémon 1 OT name (11 bytes)
Party Pokémon 2 OT name (11 bytes)
...
Party Pokémon 6 OT name (11 bytes)
Party Pokémon 1 nickname (11 bytes)
Party Pokémon 2 nickname (11 bytes)
...
Party Pokémon 6 nickname (11 bytes)
Unused (22 bytes)
Pokédex caught flags (16 bytes)
Pokédex seen flags (16 bytes)
...
 
Of course, the species list is usually redundant since the species information is stored in the 48-byte Party Pokémon data struct (one exception is when the Pokémon is an egg, the species list will have EGG (hex FD) while the data struct has the real species). The list is terminated with an FF end-of-party marker, which is completely redundant since the party count is stored in the first byte, but the code uses the end-of-party marker in many places because it is faster to check for a FF marker than it is to keep track of numbers. The key to this glitch is to corrupt this FF marker.
 
To this end, a ????? (hex 00) is put at the top of the party, then a seventh Pokémon is moved into the party, which is possible because Bill's PC recognizes both FF and 00 as end-of-party markers, and thus thinks the player only has 0 Pokémon in the party.
 
When a Pokémon is inserted into the party with the "move PkMn w/o mail" option, it is first inserted into the species list (according to the FF end-of-party marker), then inserted into the nickname list, OT name list, and Pokémon data list in that order (according to the party count byte). The insertion into the species list bumps the FF marker to the first byte of "Party Pokémon 1 data" (the data of ?????), then the insertion to the Pokémon data list bumps it to the second Pokémon data slot, in sync with the species list.
 
Now the ????? is removed from the party by depositing it in the Day Care (necessary because it is "invisible" to Bill's PC), which removes it first from the species list (again, according to the FF end-of-party marker), then from the OT name list, the Pokémon data list, the nickname list (by shifting the entire cHunk of data under the removed Pokémon, up to Pokémon slot 6, up a slot). Now, removal from the species list finds the first FF marker in the first byte of "Party Pokémon 2 data", so it corrupts "Party Pokémon 1 data" by shifting everything up a byte, and setting the last byte to FF. Then the FF marker in the first byte of "Party Pokémon 2 data" is removed.
 
Depositing the first Pokémon into the PC will similarly only corrupt its own data (which doesn't even matter, because depositing a Pokémon into the PC ''first'' copies it into the box, ''then'' removes it from the party), but when depositing the second Pokémon, there is probably no more FF mark in the Pokémon data, which means the corruption extends to the OT names, nicknames, Pokédex flags, and possibly beyond that. This is visible in the linked video, as the nicknames of the Sudowoodos become "UDOWOODO".
 
Moving the egg to the top of the party, as mentioned above, inserts into the species list and thus also causes corruption, but it just reverses the corruption caused by removing the second Pokémon (which is probably a good thing, as we are not left with more unprintable characters on the screen). Now depositing four Pokémon will corrupt again in the "shift up" direction, and this time the corruption touches the data of the egg, which is our real goal, shifting the third move up 4 bytes to become the species. (Interestingly, the reason the game allows you to deposit all four Pokémon, leaving only the egg, isn't that Bill's PC thinks you have 6 Pokémon, but that due to data corruption, the egg doesn't have 0 current HP like normal eggs do.)
 
==YouTube video==
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.