Roaming Pokémon IV glitch
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
Bulbapedia also has an article about Roaming Pokémon IV glitch. |
The Roaming Pokémon indvidual values issue, sometimes referred to as simply the Roaming Pokémon glitch is an error regarding the possible range of individual value totals of Roaming Pokémon within the first four handheld Pokémon games; namely Pokémon Ruby, Pokémon Sapphire, Pokémon FireRed and Pokémon LeafGreen. It does not exist in the later games, such as Pokémon Emerald. The glitch although perhaps less noticeable to less experienced players, restricts Roaming Pokémon such as Latias, Latios or the Legendary Beasts from having an IV total greater than 38. Specifically, the affected Pokémon would always have 0 IVs in the Special Attack, Special Defence, Defence and Speed stats and a maximum 7 IVs in the Attack stat, the individual value for HP however, remains unchanged.
Technical explanation
Information for the individual values of a Pokémon is read in a qword (a total of 32 ONs in binary) or four bytes. Hence the permutations of the individual values a Pokémon has is denoted by 11111111111111111111111111111111 or a total of 4294967296 possibilities, which includes the unlikely circumstances of a Pokémon having 0 IVs in every stat. When the player encounters a Roaming Pokémon however, an oversight by Nintendo was that only the first byte is defined (the first eight bits). By default, if the other bytes for the individual values are not defined every other bit is taken as 0. Therefore, the permutations are reduced to just 11111111 or 256. HP was the first stat in the data structure so it remains unchanged, but the other stats except Attack remain undefined and the Attack IV can only be an integer between 0 and 7.