Glitch City Laboratories Archives

Glitch City Laboratories closed on 1 September 2020 (announcement). This is an archived copy of an article from Glitch City Laboratories wiki.

A live version of this article is available at the Glitch City Wiki here.

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

You may also download the archive of the wiki in .tar.gz or .xml.gz formats.

RNG oddities (Generation III)

Miscellaneous glitches of Pokémon Ruby and Sapphire, Pokémon FireRed and LeafGreen and Pokémon Emerald

Exclusive to Ruby and Sapphire:

256x item selling price glitch | Amazing Trainers | Berry glitch | Draining hitpoints animation glitch | Evolution animation glitch | Sticky Hold glitch | Mossdeep City Skitty glitch | Truck glitch | Nightmare glitch | Mossdeep City Skitty glitch

Acro Bike instability glitches (Japanese only) | Dark red selector glitch (International only) | Excessive doll arrangement glitch (Japanese only) | Mail and Trick glitches (Japanese only) | Surf on land (Japanese only)

Exclusive to FireRed and LeafGreen:

Celadon City origin glitch | Pokédex species glitch | Roaming Pokémon Roar glitch

Exclusive to Emerald:

Battle Pike poison knockout glitch | Black curtains glitch | Mart worker glitch | Mover Vigoroth cry glitch (Japanese only)

In various or all entries:

Azurill gender glitch | Boss HP recruit glitch (Mystery Dungeon) | Decamark-specific glitches | Dewford Gym footprint glitch | Evolution move-learning glitch | Focus Punch glitch | Roaming Pokémon IV glitch | Sky Pillar glitch | Thunderbolt glitch | VBlank RNG interrupt glitch

(view, talk, edit)

While luck manipulation can be considered a class of non-glitch exploits, there are aspects of RNG implementation in the Generation III handheld games that are almost certainly unintentional.

Emerald initial seeding

In Pokémon Emerald, no matter what, the RNG seed is 0 upon bootup, despite the existence of substantial initial seeding algorithms in Pokémon Ruby and Sapphire and Pokémon FireRed and LeafGreen. (When the internal battery has run dry or is disconnected in Ruby and Sapphire, the algorithm always returns 5A0, resulting in the same predictability as in Emerald. It takes the internal clock roughly two days to stop functioning after the battery is disconnected.)

VBlank RNG interrupt glitch ("Methods")

In all five games, there exist multiple sets of PIDs and IVs for a given Egg or encounter on any given frame. Even though the effects of this are mostly innocuous and potentially beneficial to the player, these are due to a programming oversight.

The GBA's VBlank routine runs roughly once every 16.743 milliseconds. Stat generation is generally much faster than this, making four calls to the RNG returning a halfword each time, two each for the PID and IV spread. These can be predicted for any given current seed by running the LCG on each result manually, noting the upper 16 bits of each value. However, VBlank is an interrupt and the LCG advances by one sequential state every time it's run, so to generate the needed four values, an additional call sometimes needs to be made.

These unintended orders have been referred to as "methods" by various sources. Three have been confirmed to occur on official hardware. Each has a counterpart that includes the random encounter nature hunt routine ("Methods H-1, H-2, and H-4"). Method H-1 almost never occurs, as the slowness of the nature hunt almost always causes VBlank to interrupt the four main RNG calls. Method 4 has frequently occurred in Pokémon Box Ruby & Sapphire, and H-1 has been occasionally witnessed in Pokémon Ruby and Sapphire.

+ Sequential RNG callsMethodPID1PID2IV1IV2