WDT
WDT Files
WDT files specify exactly which map tiles are present in a world, if any, and can also reference a "global" WMO. They have a chunked file structure
WDT, as well as ADT, WMO, M2 and WDL files follow a chunked structure similar to IFF, consisting of chunks of the following format:
Offset Type Description 0x0 char[4] Chunk identifier - in reverse character order 0x4 uint32 Chunk size 0x8 [size] bytes Chunk data
The initial chunk in all of these files is an MVER chunk, specifying the version of the map files in a 32-bit integer. This version is always 0x12. (I am assuming, for version 1.2 of the file format?)
All files use Intel (little-endian) byte order.
MPHD chunk
Header chunk. Contains 8 32-bit integers. The first integer is 1 for maps without any terrain, 0 otherwise. The rest are always 0.
MAIN chunk
Map tile table. contains 64x64 = 4096 records of 8 bytes each. Each record can be considered a 64-bit integer: 1 if a tile is present, 0 otherwise.
MWMO, MODF chunks
For worlds with terrain, the MWMO chunk is empty and there is no MODF chunk. For a global-WMO-only world, these chunks specify an object in the same format as it is already done in ADT files. See the ADT format description for details.