WDL/v18: Difference between revisions
(13 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
WDL files contain a low-resolution heightmap for a world. This is probably what the WoW client uses to draw the solid-colored mountain ranges in the background ('in front of' the sky, but 'behind' the fog and the rest of the scenery). It can also be conveniently used to construct a minimap - however, since no water level information is present, the best guess is 0 (sea level) - this results in some lower-than-sea-level areas being blue on the WoWmapview minimap. Oh well. :) | WDL files contain a low-resolution heightmap for a world. This is probably what the WoW client uses to draw the solid-colored mountain ranges in the background ('in front of' the sky, but 'behind' the fog and the rest of the scenery). It can also be conveniently used to construct a minimap - however, since no water level information is present, the best guess is 0 (sea level) - this results in some lower-than-sea-level areas being blue on the WoWmapview minimap. Oh well. :) | ||
* | *[[Chunk]]ed structure. | ||
*[[ | {{SectionBox/Version|expansionlevel=3|build=3.3.5.12340}} | ||
The WotLK parser is very picky about the files it reads. It assumes that if there is a [[#MWMO]] chunk as the first chunk, the [[#MWID]] and [[#MODF]] chunks follow in that order. Otherwise, or after the three, it *will* be [[#MAOF]], and after that it only uses the offsets in that chunk to parse [[#MARE]]s. | |||
== | == Object related chunks == | ||
{{Template:SectionBox/VersionRange|max_expansionlevel=6}} | |||
MWMO, MWID and MODF chunks seem to have been added to every WDL and contain information about low resolution [[WMO]] used to create a silhouette. | |||
=== MWMO === | === MWMO === | ||
Line 20: | Line 22: | ||
*'''Placement information for the [[WMO]].''' Appears to be the same 64 byte structure used in the [[WDT]] and [[ADT]] MODF chunks. | *'''Placement information for the [[WMO]].''' Appears to be the same 64 byte structure used in the [[WDT]] and [[ADT]] MODF chunks. | ||
{{Template:SectionBox/VersionRange|min_expansionlevel=7}} | |||
In Legion it seems MWMO, MWID and MODF were removed from this file. And MLDD, MLDX, MLMD, MLMX were added instead. They seem to have same structure as in [[ADT|_obj1.adt]] files | |||
=== MLDD === | |||
*'''Placement information for the [[M2]]. Reference: [[ADT#MLDD_.28Legion.2B.29|MLDD]] | |||
=== MLDX === | |||
*'''Defines bounding box and radius for visibility detection for M2 from MLDD. Reference: [[ADT#MLDX_.28Legion.2B.29|MLDX]] | |||
=== MLMD === | |||
*'''Placement information for the [[WMO]]. Reference: [[ADT#MLMD_.28Legion.2B.29|MLMD]] | |||
=== MLMX === | |||
*'''Defines bounding box and radius for visibility detection for WMO from MLMD. Reference: [[ADT#MLMX_.28Legion.2B.29|MLMX]] | |||
''NOTE: as there is no chunks with file names for WMO, both MLDD and MLMD use '''[[CASC#World_of_Warcraft_2|FileDataId]]''' from CASC storage for referencing the file with model | |||
== MAOF chunk == | == MAOF chunk == | ||
Line 32: | Line 57: | ||
==MapAreaLow array== | ==MapAreaLow array== | ||
WoD (cata?): if neither MAHO nor MARE present: CMapAreaLow::CreateOceanInstance() | |||
=== MARE chunks === | === MARE chunks === | ||
*'''Map Area''' | *'''Map Area''' | ||
Line 37: | Line 63: | ||
Heightmap for one map tile. Contains 17*17 + 16*16 = 545 signed 16-bit integers. So a 17 by 17 grid of height values is given, with additional height values in between grid points. Here, the "outer" 17x17 points are listed (in the usual row major order), followed by 16x16 "inner" points. The height values are on the same scale as those used in the regular height maps. | Heightmap for one map tile. Contains 17*17 + 16*16 = 545 signed 16-bit integers. So a 17 by 17 grid of height values is given, with additional height values in between grid points. Here, the "outer" 17x17 points are listed (in the usual row major order), followed by 16x16 "inner" points. The height values are on the same scale as those used in the regular height maps. | ||
===MAOC chunk=== | ===MAOC chunk (<Legion)=== | ||
This chunk appears to define vertices for an occlusion mesh. The values are passed in to <tt>CMapAreaLow::CreateOcclusion</tt>. | |||
{{Template:SectionBox/VersionRange|max_expansionlevel=6}} | |||
// optional | // optional | ||
struct MAOC | struct MAOC | ||
Line 43: | Line 72: | ||
short[]; | short[]; | ||
} | } | ||
===MAOE chunk (Legion+)=== | |||
{{Template:SectionBox/VersionRange|min_expansionlevel=7}} | |||
// optional, but shall be before MAHO else ignored | |||
// This defines ocean (float?) texture (m_ocean or AreaOceanAlphaTexture) | |||
struct | |||
{ | |||
// ??? fixed size 0x20, some mask? | |||
}; | |||
=== MAHO chunks === | === MAHO chunks === | ||
After each MARE chunk there follows a MAHO (MapAreaHOles) chunk. | After each MARE chunk there follows a MAHO (MapAreaHOles) chunk. | ||
This chunk is an array of 16 uint16_t values. Each one is a bitmask, representing a boolean value that determines whether or not | |||
there is a hole at that position - if the bit is not set, there is a hole at that position. | |||
If the MAHO chunk is missing, the client will treat that map area as having a MAHO chunk with all values set to 0. | |||
In Blizzard's files, the chunk is always included no matter what the values are. This behavior is most likely a form of backwards | |||
compatibility to allow the client to load WDL files from before Wrath of the Lich King. | |||
[[Category:Format]] | [[Category:Format]] |
Revision as of 23:57, 3 September 2018
WDL files contain a low-resolution heightmap for a world. This is probably what the WoW client uses to draw the solid-colored mountain ranges in the background ('in front of' the sky, but 'behind' the fog and the rest of the scenery). It can also be conveniently used to construct a minimap - however, since no water level information is present, the best guess is 0 (sea level) - this results in some lower-than-sea-level areas being blue on the WoWmapview minimap. Oh well. :)
- Chunked structure.
The WotLK parser is very picky about the files it reads. It assumes that if there is a #MWMO chunk as the first chunk, the #MWID and #MODF chunks follow in that order. Otherwise, or after the three, it *will* be #MAOF, and after that it only uses the offsets in that chunk to parse #MAREs.
MWMO, MWID and MODF chunks seem to have been added to every WDL and contain information about low resolution WMO used to create a silhouette.
MWMO
- Filenames for WMO that appear in the low resolution map. Zero terminated strings.
MWID
- List of indexes into the MWMO chunk.
MODF
- Placement information for the WMO. Appears to be the same 64 byte structure used in the WDT and ADT MODF chunks.
In Legion it seems MWMO, MWID and MODF were removed from this file. And MLDD, MLDX, MLMD, MLMX were added instead. They seem to have same structure as in _obj1.adt files
MLDD
MLDX
- Defines bounding box and radius for visibility detection for M2 from MLDD. Reference: MLDX
MLMD
MLMX
- Defines bounding box and radius for visibility detection for WMO from MLMD. Reference: MLMX
NOTE: as there is no chunks with file names for WMO, both MLDD and MLMD use FileDataId from CASC storage for referencing the file with model
MAOF chunk
- Map Area Offset.
Contains 64*64 = 4096 unsigned 32-bit integers, these are absolute offsets in the file to each map tile's MapAreaLow-array-entry. For unused tiles the value is 0.
/*000h*/ UINT32 areaLowOffsets[4096]; or /*000h*/ UINT32 areaLowOffsets[64][64];
MapAreaLow array
WoD (cata?): if neither MAHO nor MARE present: CMapAreaLow::CreateOceanInstance()
MARE chunks
- Map Area
Heightmap for one map tile. Contains 17*17 + 16*16 = 545 signed 16-bit integers. So a 17 by 17 grid of height values is given, with additional height values in between grid points. Here, the "outer" 17x17 points are listed (in the usual row major order), followed by 16x16 "inner" points. The height values are on the same scale as those used in the regular height maps.
MAOC chunk (<Legion)
This chunk appears to define vertices for an occlusion mesh. The values are passed in to CMapAreaLow::CreateOcclusion.
// optional struct MAOC { short[]; }
MAOE chunk (Legion+)
// optional, but shall be before MAHO else ignored // This defines ocean (float?) texture (m_ocean or AreaOceanAlphaTexture) struct { // ??? fixed size 0x20, some mask? };
MAHO chunks
After each MARE chunk there follows a MAHO (MapAreaHOles) chunk.
This chunk is an array of 16 uint16_t values. Each one is a bitmask, representing a boolean value that determines whether or not there is a hole at that position - if the bit is not set, there is a hole at that position.
If the MAHO chunk is missing, the client will treat that map area as having a MAHO chunk with all values set to 0. In Blizzard's files, the chunk is always included no matter what the values are. This behavior is most likely a form of backwards compatibility to allow the client to load WDL files from before Wrath of the Lich King.