From CloudModding TWW Wiki

This is a placeholder page. It will be made into an actual page at a later date. For the time being, information about the chunk types that are found in DZR and DZS files can be found at https://github.com/LordNed/WindEditor/wiki/DZS-and-DZR.

ACTR

ACTR, short for actor, defines most of the entities within the map. These include NPCs, enemies, and most switches.

The ACTR chunk also has variants used for different layers, so that a map can have a different set of entities at different points in the story. For these variants, the final R in ACTR is replaced with a hexadecimal number between 0 and 0xB. ACTR is always loaded, regardless of the active layer; ACT0 through ACTB are loaded depending on the active layer.

Size: 0x20 bytes.

Offset Size Name Description
0x00
8
Actor Name Determines which actor this is.
0x08
4
Parameters One of the parameter fields - a bitfield that holds multiple variables which differ for each actor.
0x0C
4
X Pos Floating point X position.
0x10
4
Y Pos Floating point Y position.
0x14
4
Z Pos Floating point Z position.
0x18
2
Auxilary Parameters 1 Another parameter bitfield.
0x1A
2
Y Rotation
0x1C
2
Auxilary Parameters 2 Another parameter bitfield.
0x1E
2
Enemy Number A flag index for this enemy staying dead as long as you remain in this stage. Changing rooms will not reset these flags but changing stages will. If this flag index is -1 the enemy won't stay dead.

AROB and RARO

AROB and its refactored version, RARO, provide CAMR and RCAM entities with position and rotation data for the camera.

//0x14/20 bytes long
// Position
/*0x00*/ float XPosition;
/*0x04*/ float YPosition;
/*0x08*/ float ZPosition;
// Rotation
/*0x0C*/ short XRotation;
/*0x0E*/ short YRotation;
/*0x10*/ short ZRotation;
// Padding
/*0x12*/ short Padding;

CAMR and RCAM

CAMR and its refactored version, RCAM, allow the event system to take control of the camera through a special event called "MapToolCamera". This is often used to point out the results of blowing up a rock with a bomb, among other things.

//0x14/20 bytes long
/*0x00*/ string CameraType; // String, from a list in the .dol, giving the camera type
/*0x10*/ byte ArobRaroIndex; // Index of the AROB/RARO chunk this entry uses
/*0x11*/ byte Padding1;
/*0x12*/ byte Padding2;
/*0x13*/ byte Padding3;

Camera Types

As mentioned above, there is a list of valid camera types that can be found in the game's executable. They are listed below.

  •  ????
  • Field
  • Dungeon
  • Plain
  • DungeonDown
  • DungeonUp
  • DungeonCorner
  • Jump
  • DungeonWide
  • Room
  • FieldCushion
  • OverLook
  • Corridor
  • Subject
  • DungeonPassage
  • Cliff
  • Cliff2

These may or may not be valid, as they seem to be intended for specific cases.

  • MajTower
  • Boss01
  • Boss02
  • Gamoss
  • MiniIsland
  • Amoss
  • Cafe
  • P_Ganon1
  • P_Ganon2
  • WindBoss
  • P_Ganon3
  • G_BedRoom
  • G_Roof
  • G_BedRoom2
  • Boss04
  • WindHall
  • BigBird
  • DStairs

COLO

COLO allows the environmental lighting chunk, ENVR, to change the map's lighting based on the time of day. An in-game day is apparently divided into 6 parts: dawn, morning, noon, afternoon, dusk, and night.

//0xC/12 bytes long
// A entries
/*0x00*/ byte DawnPaleIndexA; //Index of Pale entry to use for dawn
/*0x01*/ byte MorningPaleIndexA; //Index of Pale entry to use for morning
/*0x02*/ byte NoonPaleIndexA; //Index of Pale entry to use for noon
/*0x03*/ byte AfternoonPaleIndexA; //Index of Pale entry to use for the evening
/*0x04*/ byte DuskPaleIndexA; //Index of Pale entry to use for dusk
/*0x05*/ byte NightPaleIndexA; //Index of Pale entry to use for night
// B entries
/*0x06*/ byte DawnPaleIndexB; //Index of Pale entry to use for dawn
/*0x07*/ byte MorningPaleIndexB; //Index of Pale entry to use for morning
/*0x08*/ byte NoonPaleIndexB; //Index of Pale entry to use for noon
/*0x09*/ byte AfternoonPaleIndexB; //Index of Pale entry to use for the evening
/*0x0A*/ byte DuskPaleIndexB; //Index of Pale entry to use for dusk
/*0x0B*/ byte NightPaleIndexB; //Index of Pale entry to use for night

It has been observed that the B entries may represent something other than an extra set of indexes. This must be investigated further.

DMAP

To-do

DOOR and TGDR

To-do

ENVR

This is the top layer of the game's environmental lighting system. It changes the lighting based on the current weather condition. There appears to be 4 conditions: clear, raining, snowing, and an as-yet unknown 4th condition.

//0x8/8 bytes long
// First set
/*0x00*/ byte FirstClearColoIndex; //Colo entry to use for clear weather
/*0x01*/ byte FirstRainingColoIndex; //Colo entry to use for rainy weather
/*0x02*/ byte FirstSnowingColoIndex; //Colo entry to use for snowy weather
/*0x03*/ byte FirstUnknown2ColoIndex; //Colo entry to use for an unknown condition
// Second set
/*0x04*/ byte SecondClearColoIndex;
/*0x05*/ byte SecondRainingColoIndex;
/*0x06*/ byte SecondSnowingColoIndex;
/*0x07*/ byte SecondUnknown2ColoIndex;

It has been observed that the second set of indexes might represent something other than, well, a second set of indexes. This must be investigated further.

EVNT

EVNT allows events from the map's event_list.dat to be referenced by objects within it. This chunk is still not completely understood, and needs further investigation.

//0x18/24 bytes long
/*0x00*/ byte Unknown1; //0xFF/255 in the majority of the time
/*0x01*/ string Name; //The name of the event, from /stage/dat/event_list.dat
/*0x10*/ byte Unknown2; //Only set when name == "MapToolCamera"
/*0x11*/ byte Unknown3; //Only set when name == "MaptoolCamera"
/*0x12*/ byte Unknown4;
/*0x13*/ byte Unknown5;
/*0x14*/ byte RoomNum; //Not always set
/*0x15*/ byte Padding1;
/*0x16*/ byte Padding2;
/*0x17*/ byte Padding3;

When the name of the event is "MapToolCamera", it indicates that this event moves the camera based on the CAMR or RCAM entry it references.


STAG

The STAG chunk defines properties of the stage. This chunk should be present in the stage.dzs file for the stage.

Size: 0x14 bytes.

Offset Size Name Description
0x00
4
Depth Min Floating point.
0x04
4
Depth Max Floating point.
0x08
1
Unknown1
0x09
1
Bitfield 1 See below
0x0A
2
Bitfield 2 See below
0x0C
4
Bitfield 3 See below
0x10
1
Unknown 2
0x11
1
Unknown 3
0x12
2
Draw Range

Bitfield 1

Mask Field Name Description
0x01 Is Dungeon A boolean for whether this stage is a dungeon or not.
0xFE Stage ID This is an index in the save file's list of stage infos, which controls which set of flags to use for this stage. Documentation on all Stage IDs can be found here.

Bitfield 2

Mask Field Name Description
0x0003 Unknown1
0x0004 Unknown2
0x07F8 Particle Bank ID This stage will load the particle bank with this ID. You can get the file path like so: "files/res/Particle/Pscene%03d.jpc" % particle_bank_id
0xF800 Unknown3

Bitfield 3

Mask Field Name Description
0x000000FF Unknown1
0x00070000 Unknown2 Collision related. If this value is equal to 3, solid objects falling on Link's head will not damage him and void him out, he will simply be allowed to walk around inside the object.