Luck manipulation (Generation I)

From Glitch City Wiki
Revision as of 00:24, 8 February 2019 by >Sherkel
Jump to navigation Jump to search
This article is incomplete. Please feel free to add any missing information about the subject. It is missing: {{{1}}}.

Pseudorandom number generation in Pokémon Red, Blue, and Yellow uses the rDIV function, which is stored in hardware and thus makes intentionally landing on a specific value in these games very difficult and unreliable. The only known emulators that emulate this function properly are BGB, Sameboy, and Gambatte-Speedrun. The function also behaves differently between the original Game Boy, Game Boy Color, Super Game Boy, Super Game Boy 2, and 3DS Virtual Console. However, certain series of timed inputs based on the DMG-001's rDIV function have been discovered for use in speedrun routes and work as intended nearly all of the time provided the player does not miss any input windows. The save file's in-game time also affects the initial seed, and at times can cause one of these procedures to fail. What is needed to fix this is simply saving again.

Encounter slots are determined by a variable known as the DSum (the sum of hRandomAdd + hRandomSub in random.asm in pret's disassembly), which can be predicted within a reasonable range once the current value is guessed through the encounter slot of the last wild Pokémon encountered.

External links

  1. RNG manipulation FAQ on Pokémon Speedruns wiki
  2. DSum manipulation FAQ on Pokémon Speedruns wiki
  3. random.asm
This article or section is a stub. You can help Glitch City Wiki by expanding it.