List of Chunk Types
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, 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.
// 0x20/32dec bytes long /*0x00*/ string Name; // This determines what the actor is. // Parameters /*0x08*/ byte Parameter1; /*0x09*/ byte Parameter2; /*0x0A*/ byte Parameter3; /*0x0B*/ byte Parameter4; // Position /*0x0C*/ float XPosition; /*0x10*/ float YPosition; /*0x14*/ float ZPosition; /*0x18*/ short Unknown1; // We used to think this was X rotation, but it's not... /*0x1A*/ short YRotation; /*0x1C*/ short FlagID; // A flag to set, probably when the actor gets despawned. Only for enemies? /*0x1E*/ short Unknown2; // Most of the time this is 0xFFFF/65535dec, but sometimes enemies have a number here. The number tends to rise with each enemy in the list.
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;
As mentioned above, there is a list of valid camera types that can be found in the game's executable. They are listed below.
These may or may not be valid, as they seem to be intended for specific cases.
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.
DOOR and TGDR
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 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.