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.

2DMA

Settings for the minimap.

//0x38/56 bytes long
/*0x00*/ float fullMapImageScaleX;
/*0x04*/ float fullMapImageScaleY;
/*0x08*/ float fullMapSpaceScaleX;
/*0x0C*/ float fullMapSpaceScaleY;
/*0x10*/ float fullMapXCoord;
/*0x14*/ float fullMapYCoord;
/*0x18*/ float zoomedMapXScrolling1; //Something with scrolling, but that's also defined below?
/*0x1C*/ float zoomedMapYScrolling1; //Does something like scrolling on y-axis
/*0x20*/ float zoomedMapXScrolling2;
/*0x24*/ float zoomedMapYScrolling2;
/*0x28*/ float zoomedMapXCoord;
/*0x2C*/ float zoomedMapYCoord;
/*0x30*/ float zoomedMapScale; //That's what it appeared to affect, anyway
/*0x34*/ byte unknown1; //Always 0x80?
/*0x35*/ byte mapIndex; //number of the map image to use. For instance, using the first image would be 80, the second 81, and so on.
/*0x36*/ byte unknown2; //variable, but changing it has no immediate result
/*0x37*/ byte padding;

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
X Rotation Most actors don't need this for rotation, so it is often repurposed as another parameter bitfield instead.
0x1A
2
Y Rotation
0x1C
2
Z Rotation Most actors don't need this for rotation, so it is often repurposed as another parameter bitfield instead.
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

Settings for the dungeon maps accessed by pressing up on the D-pad.

//0x10/16 bytes long
/*0x00*/ float mapSpaceX;
/*0x04*/ float mapSpaceY;
/*0x08*/ float mapSpaceScale; //Larger values make the scale smaller. Fractional scale?
/*0x0C*/ float unknown1; //always 00 00 00 00? Could be filler or a terminator

DOOR

Functions the same as SCOB.

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.


PLYR

The PLYR chunk defines player spawn points. It has the same format as ACTR. The actor name should always be "Link" (even for spawn points intended to spawn other players such as Medli).

The PLYR chunk usually appears in the room.dzr file on a per-room basis. But for some stages like Earth Temple and Wind Temple it instead appears in the stage.dzs file. A stage having even a single spawn point in its stage.dzs causes all of the spawn points in that stage's room.dzr files to effectively be hidden, so do not attempt to mix per-room and per-stage spawns within a single stage.

Parameters

Mask Field Name Description
0x0000003F Room Number The room this spawn belongs to.
0x00000040 Unknown 1
0x00000080 Unknown 2
0x00000F00 Unknown 3
0x0000F000 Spawn Type Affects how the player spawns in here. See below.
0x00FF0000 Unknown 4
0xFF000000 EVNT Index The index in EVNT of the event to automatically start when the player spawns here. Set to 0xFF for no event.
Spawn Type

Incomplete list of known spawn types:

Value Meaning
0x00 Normal
0x02 Spawn riding KoRL
0x05  ?
0x07 Flying out of a warp pot
0x09 Warping in with KoRL on a cyclone

Parameters (Z rotation)

Mask Field Name Description
0x00FF Spawn ID Unique identifier of the spawn within this map file.
0xFF00 Unknown 5


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 Type Name Description
0x00
float Z Depth Min
0x04
float Z Depth Max
0x08
byte Unknown1
0x09
byte Bitfield 1 See below
0x0A
short Bitfield 2 See below
0x0C
int Bitfield 3 See below
0x10
int Bitfield 4 See below

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.

Bitfield 4

Mask Field Name Description
0x0000FFFF Base Actor Draw Distance The distance away from the camera actors can get before they are no longer drawn. Some actors use this value multiplied to increase the distance for just themselves. This is not used when looking through the Telescope or Pictobox, and 'Z Depth Max' will be used instead in that case.
0x00FF0000 Unknown 1