Jump to content

Luck manipulation (Generation I): Difference between revisions

→‎Overworld: I think I meant "step" instead of "frame".
>Sherkel
m (Incredible! No need to shorten this if it's well-organized, which it is. Just adding a category to it.)
(→‎Overworld: I think I meant "step" instead of "frame".)
 
(One intermediate revision by the same user not shown)
Line 56:
|-
|
{| class="wikitable"
{| border=1 width="100%" align=left style="background:#f0f0f0; border:1px solid #000000; border-collapse:collapse;"
|-style="background: silver;"
! Encounter slot !! hRandomSub Range
|-
Line 109 ⟶ 108:
 
===Overworld===
This is the main component of most manipulations. For the purpose of keeping up frame-perfect inputs, the player should be constantly walking, which also manipulates the RNG slightly compared to staying put. At the beginning of each step, the tilemap is updated so that the new row or column that appears on the screen is displayed properly, which delays the framely RNG advancement slightly. The time delta is either 8.1875 (row) or 7.984375 (column) rDIV periods, so a step generally adds 8 to the RNG state (for one time only), but it can be either 9 or 7 depending on the frame on which this happens. Plus, at the end of each framestep, map loading will cause a "lag frame" where the game doesn't hit a halt instruction before V-Blank, which as mentioned above may slightly affect the RNG too.
 
Another main factor that affects overworld RNG is sprites. The running time of PrepareOAMData depends on how many sprites are visible on the screen (and some static properties of them), which affects the framely RNG advancement. In addition, for sprites currently on screen, the RNG is called to determine the direction the sprite would walk in (even if it cannot actually walk), and the delay until the next movement. This cycle begins when the sprite is first loaded on screen. Notice that the movement state of sprites persists when it becomes off-screen and even after saving and resetting, as long as the player doesn't leave the map. Therefore all manipulations assume that all sprites involved are initially unloaded.
Cookies help us deliver our services. By using our services, you agree to our use of cookies.