From CloudModding OoT Wiki

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
VersionOffsetVRomVRam
Debug108A1000B9CA1000B9CB308012587080125990
NTSC 1.00E62B000B6D2B0?800F7350?

Each scene entry is 1 word long.

Format

IDxxyyzz

each byte consists of four 2bit flags

  • ID = Scene ID
x Restriction Flags
Name Use Flags
c_bottle Bottles 01 02 03
a_button A Button 04 08 0C
b_button B Button 10 20 30
h_gage Health Gauge 40 80 C0
y Restriction Flags
Name Use Flags
c_warp Warp Songs 01 02 03
c_ocarina Ocarina 04 08 0C
c_hook Hookshot & Longshot 10 20 30
c_warasibe Trade Items 40 80 C0
z Restriction Flags
Name Use Flags
another Global 01 02 03
m_magic Din's Fire & Nayru's Love 04 08 0C
m_wind Farore's Wind 10 20 30
c_sunmoon Sun's Song 40 80 C0

(Note that the Sun's Song is also banned on a per-room basis.)

(The 2 bit entries are always 1 or 0 except sunsong is set to 3 in scenes with redeads and the chamber of sages uses 2 on everything except 0 on Abutton)

Data

The data below was taken from the Debug ROM.

ID X Y Z Map Name
51 00 00 10 Hyrule Field
52 00 00 10 Kakariko Village
53 00 00 10 Graveyard
54 00 00 10 Zora's River
55 00 00 10 Kokiri Forest
56 00 00 10 Sacred Forest Meadow
57 00 00 10 Lake Hylia
58 00 00 10 Zora's Domain
59 00 00 10 Zora's Fountain
5A 00 00 10 Gerudo Valley
5B 00 00 10 Lost Woods
5C 00 00 10 Desert Colossus
5D 00 00 10 Gerudo's Fortress
5E 00 00 10 Haunted Wasteland
5F 00 00 10 Hyrule Castle
64 00 00 10 Ganon's Castle Exterior
60 00 00 10 Death Mountain Trail
61 00 00 10 Death Mountain Crater
62 00 00 10 Goron City
63 00 00 10 Lon Lon Ranch
43 00 10 15 Temple of Time
44 A2 AA AA Chamber of the Sages
42 11 55 55 Shooting Gallery
45 11 55 55 Castle Hedge Maze (Day)
46 11 55 55 Castle Hedge Maze (Night)
3F 00 00 D0 Grave (Redead)
40 00 00 D0 Grave (Fairy's Fountain)
41 00 00 D0 Royal Family's Tomb
3B 00 00 10 Great Fairy's Fountain (Upgrades)
3C 00 00 D0 Fairy's Fountain
3D 00 00 10 Great Fairy's Fountain (Spells)
1A 00 05 50 Tower Collapse Exterior [?]
4A 00 05 54 Castle Courtyard
49 11 55 55 Fishing Pond
4B 11 55 55 Bombchu Bowling Alley
4C 00 10 15 Ranch House & Silo
4D 00 10 14 Guard House
4E 10 15 55 Granny's Potion Shop
10 10 15 55 Treasure Box Shop
50 00 10 15 House of Skulltula
1B 00 10 15 Market Entrance (Child - Day)
1C 00 10 15 Market Entrance (Child - Night)
1D 00 10 D5 Market Entrance (Ruins)
20 00 10 15 Market (Child - Day)
21 00 10 15 Market (Child - Night)
22 00 10 D5 Market (Ruins)
1E 00 10 15 Back Alley (Child - Day)
1F 00 10 15 Back Alley (Child - Night)
23 00 10 15 Temple of Time Exterior (Child - Day)
24 00 10 15 Temple of Time Exterior (Child - Night)
25 00 10 D5 Temple of Time Exterior (Ruins)
34 10 10 15 Link's House
2A 10 10 15 Carpenter Boss's House
2B 10 10 15 Back Alley House (Man in Green)
26 10 10 15 Know-It-All Brothers' House
27 10 10 15 House of Twins
28 10 10 15 Mido's House
29 10 10 15 Saria's House
36 10 10 15 Stable
3A 10 10 15 Gravekeeper's Hut
35 10 10 15 Back Alley House (Dog Lady)
37 10 10 15 Impa's House
38 00 10 15 Lakeside Laboratory
39 10 10 15 Carpenters' Tent
2C 10 10 15 Bazaar
2D 10 10 15 Kokiri Shop
2E 10 10 15 Goron Shop
2F 10 10 15 Zora Shop
30 10 10 15 Kakariko Potion Shop
31 10 10 15 Market Potion Shop
32 10 10 15 Bombchu Shop
33 10 10 15 Happy Mask Shop

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
3
4
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
2
3
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. Save Context + 0x0000, which stores the current entrance index, is used to determine what location a savewarp should take you to.

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.

Zora's Domain Water Box

Function 8004213C (Debug Rom) contains extra logic for enabling one of the water boxes in King Zora's room in Zora's Domain