WDT chunks¶
The typed wire structs of the WDT files — the MPHD map header, the MAIN tile
table and MAID FileDataID records of the main file, and the satellite files'
occlusion indices, lights, fogs and particulate volumes — plus the flag enums
their fields carry. A struct that changed across client versions documents
once: one merged member walk under its generic ⟨version⟩ name, each
member badged with the expansion range it belongs to. Wire integer fields
show their on-disk width.
The shared placement records the WDT reuses (SMMapObjDef for the global
WMO) are documented with the common structures.
Main file¶
MapHeaderFlags
¶
Bases: IntFlag
Map header flag bits (SMMapHeader.flags).
Attributes:
| Name | Description |
|---|---|
UsesGlobalMapObj |
A WMO-only map: one global map object (MWMO/MODF), no terrain tiles. |
AdtHasMccv |
ADTs carry MCCV vertex colors (WotLK+); with this set every ADT of the map must have MCCV. |
AdtHasBigAlpha |
Terrain shader 2 (_env): 4096-byte uncompressed MCAL alpha maps instead of 2048. |
AdtHasDoodadrefsSortedBySizeCat |
ADT MCRF/MCRD doodad references are sorted by size category. |
AdtHasMclv |
ADTs carry the second MCLV color layer (Cata+; deprecated and forbidden in 8.x). |
AdtHasUpsideDownGround |
Flip the ground upside down to create a ceiling (Cata+). |
unk_0x40 |
Unknown (MoP+); seen on Firelands2.wdt before Legion. |
AdtHasHeightTexturing |
Terrain shader 6: alpha maps are influenced by the _h textures and MTXP (MoP+); also 4096-byte uncompressed MCAL entries. |
LoadLodAdt |
Load _lod.adt (Legion+); implicitly sets 0x8000. |
HasMaid |
The WDT carries MAID: ADTs load by FileDataID instead of path (8.1.0.28294+). |
unk_0x400 |
Unknown. |
unk_0x800 |
Unknown. |
unk_0x1000 |
Unknown. |
unk_0x2000 |
Unknown. |
unk_0x4000 |
Unknown. |
unk_0x8000 |
Affects _lod.adt rendering; implicitly set for the continent maps (Legion+). Without it (or 0x100) distant map textures and LOD do not render. |
AdtHasDoodadrefsSortedBySizeCat
class-attribute
instance-attribute
¶
WDTHeader⟨version⟩¶
An MPHD map header, abstract over the client version. Construct a concrete version with WDTHeader.for_version(expansion).
something
property
writable
¶
A legacy value the WotLK-era client reads but does not use meaningfully; zero in shipped files.
fogs_fdid
property
writable
¶
FileDataID of the _fogs.wdt volumetric-fog satellite, or 0.
mpv_fdid
property
writable
¶
FileDataID of the _mpv.wdt particulate-volume satellite, or 0.
wdl_fdid
property
writable
¶
FileDataID of the map's .wdl low-resolution heightmap, or 0.
AreaInfoFlags
¶
SMAreaInfo
¶
SMAreaInfo(flags: AreaInfoFlags | None = ..., async_id: int = 0)
One MAIN tile table entry (SMAreaInfo). The table holds 64 x 64 of them in row-major order (y outer, x inner).
MapFileDataIDs
¶
One MAID per-tile FileDataID record (8.1.0.28294+): every file belonging to one map tile. The table holds 64 x 64 of them in row-major order (y outer, x inner); absent files are 0.
Occlusion (_occ.wdt)¶
OcclusionIndex
¶
One MAOI record: which tile the next occlusion heightmap belongs to and where its 545 int16 values sit inside the MAOH payload.
Lights (_lgt.wdt)¶
MapPointLightLegacy
¶
One WoD point light (MPLT); Legion clients stop reading these in favor of MPL2.
unknown
property
writable
¶
Intensity and related parameters; exact meaning undocumented.
MapPointLight
¶
MapPointLight3
¶
MapPointLight3(id: int = 0, color: CImVector | None = ..., position: C3Vector | None = ..., attenuation_start: float = 0.0, attenuation_end: float = 0.0, intensity: float = 0.0, rotation: C3Vector | None = ..., tile_x: int = 0, tile_y: int = 0, mlta_index: int = -1, texture_index: int = -1, flags: int = 0, scale_half: int = 14336)
One Shadowlands point light (MPL3; replaces MPL2 in 9.0+ files).
rotation
property
writable
¶
rotation: C3Vector
Rotation; only used to orient light-cookie projection.
texture_index
property
writable
¶
Index into MTEX for the light-cookie texture, or -1.
flags
property
writable
¶
Flags; 0x1 casts raytraced shadows (D3D12, shadow RT level 2+).
scale_half
property
writable
¶
Scale as a raw IEEE half-float (0.5 is the default; 10.0 hides player shadows).
MapSpotLight
¶
MapSpotLight(id: int = 0, color: CImVector | None = ..., position: C3Vector | None = ..., attenuation_start: float = 0.0, attenuation_end: float = 0.0, intensity: float = 0.0, rotation: C3Vector | None = ..., spotlight_radius: float = 0.0, inner_angle: float = 0.0, outer_angle: float = 0.0, tile_x: int = 0, tile_y: int = 0, mlta_index: int = -1, texture_index: int = -1)
One Legion spot light (MSLT).
attenuation_start
property
writable
¶
Where the light's spread starts; must be <= attenuation_end.
LightAnimation
¶
One light texture animation (MLTA), referenced by mlta_index.
Volumetric fogs (_fogs.wdt)¶
VolumetricFog
¶
VolumetricFog(color: C3Vector | None = ..., intensity: list[float] | None = ..., unk18: float = 0.0, position: C3Vector | None = ..., unk28: float = 0.0, rotation: C4Vector | None = ..., radius: list[float] | None = ..., animation_periods: list[int] | None = ..., flags: int = 0, model_fdid: int = 0, fog_level: int = 0, id: int = 0)
One volumetric fog (VFOG, 8.0+).
animation_periods
property
writable
¶
Animation periods, used to derive the animation coefficients.
model_fdid
property
writable
¶
FileDataID of the volume model (one M2Batch only); 0 falls back to spells/errorcube.m2.
fog_level
property
writable
¶
Fog level, 0 to 2 (inclusive against the client's volumeFogLevel setting).
VolumetricFogExtra
¶
One VFEX extension record (11.0+, format version 2): optional extra data for a VFOG entry, matched by fog id.
unk1
property
writable
¶
Unknown floats; the first three carry values, the rest are 1.
Particulate volumes (_mpv.wdt)¶
ParticulatePoint
¶
ParticulatePoint(unk0: C2Vector | None = ..., unk8: float = 0.0, unk_c: float = 0.0)