mzxrules

OoT Spawning

Sep 22nd, 2016
196
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.70 KB | None | 0 0
  1. Spawning in Ocarina of Time is complex, which is why I've always had a hard time trying to cover how wrong warps work without getting too nitty gritty. Anyway...
  2.  
  3. There are about 806 spawn points in Ocarina of Time. These spawns are not referenced directly by any single variable. Rather, two key variables are used: the "Base Entrance Index" variable (which is a fixed value) and the "Scene Setup" variable (which is determined programmatically).
  4.  
  5. The "Base Entrance Index" variable is an index to Ocarina of Time's entrance table. Logically, it can be thought of as representing a single physical location in the game world for Link to spawn, regardless of conditions like time of day or Link's age.
  6.  
  7. The "Scene Setup" variable determines what loadout (if applicable) to use for the spawned scene. It's value is computed based on a number of variables. There are a few special case situations which deviate from the normal calculation.
  8.  
  9. The Entrance Table is a table of 1556 (0x614) records which defines scene to load, a spawn id (which does not directly resolve to a single spawn point), and a little data on how to transition between one area to the next.
  10.  
  11. Spawn resolution happens in these steps:
  12.  
  13. * The value for the Scene Setup variable is calculated
  14. * The Base Entrance Index and Scene Setup variables are added together, and the resulting index is used to look up a record on the Entrance Table.
  15. * A scene file is loaded, based on the entrance table record.
  16. * If applicable, the Scene Setup variable is used again to load a specific scene setup. Otherwise, the main scene setup is used instead
  17. * With the scene setup known, the spawn id from the entrance table record is used to look up a spawn in the scene setup
Add Comment
Please, Sign In to add comment