A key technique used by competitive Final Fantasy IV speedruns is seed 92 manipulation, which provides a guaranteed seed 92 at the start of the game, leading to zero encounters between the start of the game and entering the Village of Mist (as long as you take an extra step before leaving the castle). This document details the technical details of how the manipulation works as well as the procedure for setting it up.
At any given time, the current encounter pattern is determined by the encounter seed (stored in memory at 0x7E17EF
). A detailed explation of encounter RNG is beyond the scope of this guide, but suffice it to say that we are primarily interested in the initial value of the encounter seed when starting a new game.
In order for you to understand how the initial encounter seed is determined, I must first introduce a value we will refer to as the frame counter. This value (stored in memory at 0x7E0FFF
) is incremented once per frame in various parts of the game. For our purposes, it's important to note that it is incremented while on the title screen and while walking in the field (overworld and dungeon maps), but is not incremented while in battle or in menus (including the load game menu).
The initial encounter seed is determined in one of two ways, depending on if you are starting a new game or loading an existing save:
Putting these facts together, we can analyze how the seed 92 manipulation works.
In order for a new game to start on seed 92, the current value of the frame counter must be 92 when "New Game" is selected.
When walking near Baron castle, seed 81 turns out to be very convenient. It is the only seed that has its first encounter on step 10. Therefore, if we load a game and get out first encounter on the 10th step, we know that we are on seed 81.
If you load a save, immediately start walking and get an encounter on the 10th step, the frame counter will increment by 234 (160 walking frames plus some as the game loads and as the battle starts). (Certain things can cause an extra frame, like potentially having the Big Whale visible, so avoid that.)
The frame counter is a single byte that will wrap around from 255 to 0 each cycle. Since we want the frame counter to be 92 when we enter the battle (as it will not increment during the battle, the subsequent death, or on the load game screen), and since we know that it will increment by 234 frames, we know that we want the initial frame counter when we load the save to be (92 - 234) mod 256 = (92 + 256 - 234) = 114
.
Putting this all together, we know that we want the value of the frame counter to be 114 when we load our Baron save, and we also know that we want it to be seed 81 (so we get the encounter on the 10th step). Looking back on our rules for seeds when loading a save, we know that we need to load a save that satisfies the equation (X + 114) mod 256 = 81
. The answer, which can be calculated via (81 + 256 - 114)
, is 223. Therefore, we need a save near Baron on seed 223, ideally set up to make it easy to identify the 10th step, without risk of walking frame imperfectly.
Here is my recommended way to set up your cartridge or save file:
Congratulations! You are now set up for seed 92 manipulation. Of course, you're not done yet, because you still need to know how to actually use the manipulation to do a run.
When you're ready to do a run, you simply need to use the following procedure:
Of course, it sounds easy, but the hard part is finding the correct timing to press A on the title screen. The exact timing will vary from console to console (or emulator to emulator), so you may need to experiment a bit. As with above, if you properly do a hard reset beforehand, the timing should be consistent from attempt to attempt.
In order to make this process slightly less painful, consider using my Glitch Room Setup guide, which will tell you how to set up a special glitch room that will negate the need for hard resets. Do note that this will only replace the hard reset. You will still need to follow the remaining instructions, including pressing A with the correct timing.
If you are doing a different category (such as glitchless), that wants to start on a different seed, you can still use this manipulation. You will simply have to save on a seed other than 223. To determine the correct seed, you can use this spreadsheet.