# How Can Players Catch a Shiny Pokemon in Pokemon Emerald Version?

**To catch a shiny Pokemon in Pokemon Emerald Version, players must repeat an encounter until a shiny Pokemon randomly spawns.** The odds of encountering a shiny Pokemon during a random encounter are determined by a mathematical formula based around the player's TrainerID and the encountered Pokemon's personality.

Hunting for shiny Pokemon in Pokemon Emerald version, or its counterpart Generation III games Ruby, Sapphire, FireRed and LeafGreen, is a numbers game. Each random encounter has the potential to become a shiny Pokemon encounter if the numbers line up properly. Generation III was the first Pokemon generation to use a mathematical formula to determine the probability of finding a shiny Pokemon, rather than basing the probabilities solely off of a Pokemon's individual stats. The formula for creating a shiny Pokemon is as follows:

(TrainerID xor SecretID) xor (PersonalityValue>>16 xor (PersonalityValue mod 65536))

In this formula, the TrainerID is a five-digit identification number assigned to the player's character upon the creation of a new save file. The SecretID is similar, but whereas players can check their TrainerID at any time from the Start Menu, the SecretID remains hidden from the player at all times. The two PersonalityValue references take in the first and second halves of the encountered Pokemon's assigned personality.

Once the formula has been resolved, a Pokemon will be assigned a value of either shiny or not shiny based on the resulting number. If the result of the equation is less than eight, the Pokemon will be shiny. If the result of the equation is greater than eight, the Pokemon will not be shiny. Using these numbers, a player has a 1/8192 chance of encountering a shiny Pokemon in the wild in Pokemon Emerald, Ruby and Sapphire versions.