# Glitch City Laboratories Archives

Glitch City Laboratories closed on 1 September 2020 (announcement). This is an archived copy of a thread from Glitch City Laboratories Forums.

You can join Glitch City Research Institute to ask questions or discuss current developments.

You may also download the archive of this forum in .tar.gz, .sql.gz, or .sqlite.gz formats.

## Generation II Glitch Discussion

### Incomplete OT check in Pokémon Crystal - Page 1

Previous Page

- 1

Next Page

#### Incomplete OT check in Pokémon Crystal

Posted by: Bent`
Date: 2012-07-08 00:22:47
To catch Hooh in Pokémon Crystal, you must catch Raikou, Entei, and Suicune in the same game file and have the Pokémon stored in your party or PC, then talk to Eusine in Celadon Pokémon Center.
The game checks the species, ID number, and OT of every Pokémon in the party and PC until it finds a match (so a Raikou, Entei, or Suicune traded from another game will not match). However, it only checks the first five characters of the OT name. This worked correctly in Pocket Monsters Crystal, where player names were only five characters long, but the English version of Pokémon Crystal supports player names up to seven.
`ld hl, PlayerName
ld a, [de]
cp [hl]
jr nz, .notfound
cp "@"
jr z, .found ; reached end of string
inc hl
inc de
ld a, [de]
cp [hl]
jr nz, .notfound
cp $50
jr z, .found
inc hl
inc de
ld a, [de]
cp [hl]
jr nz, .notfound
cp $50
jr z, .found
inc hl
inc de
ld a, [de]
cp [hl]
jr nz, .notfound
cp $50
jr z, .found
inc hl
inc de
ld a, [de]
cp [hl]
jr z, .found
.notfound`
A quick fix would be to copy/paste two more instances of this ASM, to check two more characters.
`ld a, [de]
cp [hl]
jr nz, .notfound
cp $50
jr z, .found
inc hl
inc de`
Of course, this would be hard to exploit, because you would need a second game file with the same ID number anyway (165536 chance).

#### Re: Incomplete OT check in Pokémon Crystal

Posted by: Ketsuban
Date: 2012-07-09 11:05:17
Isn't there a GameShark code to change your ID number?

#### Re: Incomplete OT check in Pokémon Crystal

Posted by: GARYM9
Date: 2012-07-09 15:16:34

> Isn't there a GameShark code to change your ID number?

There's a GameShark code to encounter a Ho-oh so there's no point to abuse the exploit with it. :V

#### Re: Incomplete OT check in Pokémon Crystal

Posted by: Raven Freak
Date: 2012-07-09 19:50:51
That's rather interesting that they forgot about this line of code. Is there any other checks that involve the player's name in the game? If so, there's probably multiple instances of this error. This is definitely making me want to start hacking Crystal now. :P

#### Re: Incomplete OT check in Pokémon Crystal

Posted by: Bent`
Date: 2012-07-10 00:05:06

> That's rather interesting that they forgot about this line of code. Is there any other checks that involve the player's name in the game?

Yes, but they generally do a nullterminated compare instead of relying on the maximum length of the name.
In fact, several additions to Crystal were programmed in a strange way. I suspect they pushed some inexperienced programmers onto Crystal who werent there for Pokémon G/S. (Examples of other weird implementations: Buenas Password is added very haphazardly; the Battle Tower appears to have a connection to Route 40, but instead the edge of the route was manually added to the edge of the map, even adding a faux NPC!)
Previous Page

- 1

Next Page