From CloudModding OoT Wiki
Jump to: navigation, search

Scenes are the different locations within Ocarina of Time.

Scene Table

For more information, see Scene Table.

Scene Setups

For documentation of all scene setups, see Scene Setups.

Scene Format

For the scene file format, see Scenes and Rooms.

Restriction Flags

code (File)
Restriction Flags
NTSC 1.00E62B000B6D2B0?800F7350?

Each scene entry is 1 word long. Format: IDxxyyzz

  • ID = Scene ID
  • x = Restriction Flags
    • 0x01, 0x02, 0x03 Bottles
    • 0x04, 0x08, 0x0C Unused?
    • 0x10, 0x20, 0x30 B Button
    • 0x40, 0x80, 0xC0 Unused?
  • y = Restriction Flags
    • 0x01, 0x02, 0x03 Warp Songs
    • 0x04, 0x08, 0x0C Ocarina
    • 0x10, 0x20, 0x30 Hookshot & Longshot
    • 0x40, 0x80, 0xC0 Trade Items
  • z = Restriction Flags
    • 0x01, 0x02, 0x03 Global
    • 0x04, 0x08, 0x0C Din's Fire & Nayru's Love
    • 0x10, 0x20, 0x30 Farore's Wind
    • 0x40, 0x80, 0xC0 Sun's Song (note that Sun's Song is also banned on a per-room basis)

Time-Based Lighting

Select areas in the game have lighting that changes depending on the current "world time". Some notes on this:

800F1640 is a byte value that stores an id used to keep certain lighting/skybox settings between scenes:

Id Purpose
0 Default
1 Cloudy Hyrule Field (from Market as adult)
2 Cloudy Kakariko
5 Raining in Kakariko and Kakariko Graveyard

Environment Lighting Blending

800F1658 stores an array of five different Environment Lighting Blend settings, each record being 0x2A bytes long. The purpose for each setting is as follows:

Index Purpose
0 Clear Sky Lighting/Fog, uses environment settings ids 0-3
1 Overcast Sky Lighting/Fog
4 Kakariko Village / Kakariko Graveyard Rain.

Each 0x2A byte record is subdivided into an array of seven different "time blocks", with the following structure:

0x00 ushort //Start World Time
0x02 ushort //End World Time
0x04 byte  //Environment Setting Index A
0x05 byte  //Environment Setting Index B

The Environment Setting Index refers to the data referenced by the 0x0F scene header command.

Hardcoded Stuff

Save Warping

When reloading from a save, the game checks a byte value that stores the scene number that the game was saved in, in order to determine where to spawn Link. Saving in scenes 0-26? will cause you to spawn in a set location based on a table in code.

U1.0 Notes

800902F0 - Start of the Spawn Entrance Index correction routine. Immediately follows the call that copies the save file
B7EA40 - Jump Table for setting the spawn entrance index on save load. Indexed by the scene number that the file was saved in. 26 entries.
800FC090 - List of Entrance Indexes that are set to 11A5D0 when reloading a save inside a dungeon. 

Game Over Warping

Whenever you get game over within a boss room/fight scene, or within one of the the tower collapse scenes, your spawn will be set to the main entrance of the dungeon:

Id Scene Respawn Scene Entrance Index
17 Gohma's Boss Room Deku Tree 0000
18 King Dodongo Boss Room Dodongo's Cavern 0004
19 Barinade Boss Room Inside Jabu-Jabu's Belly
20 Phantom Ganon Boss Room Forest Temple
21 Volvagia Boss Room Fire Temple
22 Morpha Boss Room Water Temple 0010
23 Spirit Temple Boss Room Spirit Temple 00??
24 Bongo Bongo Boss Room Shadow Temple
25 Ganondorf Boss Room Ganon's Tower Climb
14 Ganon's Tower Collapse Interior Ganon's Tower Collapse Exterior
15 Ganon's Tower Collapse Interior (Exit)
26 Ganon's Tower Collapse Exterior
79 Ganon Battle

Tower Collapse Sequence Timer

The timer used in the Tower Collapse sequence is the same one used for the trade items that expire when the player takes too long to deliver them. Outside of the Tower Collapse scenes, this timer behaves like a trade item timer. Inside of the Tower Collapse scenes, the behavior is more complex.

There are two temporary scene flags (0x36 and 0x37) set during Tower Collapse. Temporary switch flag 0x36 determines that the trade timer should warp you to Ganon's tower if it expires, rather than triggering the miniquest failure, while temporary switch flag 0x37 determines that the tower collapse sequence has started. This creates the following outcomes:

0x36 0x37 Result
0 0 If you're in a tower collapse map when a timer expires, it acts as if the trade item timer expired
0 1 You have infinite time to complete tower collapse, timer expiration warps you nowhere
1 0 If your in a tower collapse map, you warp to the top of Ganon's tower but it softlocks because the trade timer is stuck at 0
1 1 Normal tower collapse sequence

Custom Scene Setups

By default, scene setups 0-3 are reserved for combinations of day/night, child/adult. However, there are some hard-coded exceptions:

  • Scene 81 (Hyrule Field): Setup 0 is used for both day and night versions of Hyrule Field as a child, while setup 1 is used for after Zelda throws the Ocarina of Time, but before it's obtained.
  • Scene 85 (Kokiri Forest): Setup 2 is used for the Adult version of Kokiri Forest when it has been invaded by monsters, while setup 3 is used for after the Forest Temple has been completed.
  • Scene 99 (Lon Lon Ranch): Exists, but forget how (think it's the child version?)

Switch Flags

When creating a new save, a permanent switch flag within the Water Temple's set of flags is initialized to a default value, in order to set the dungeon's starting water level.