ADT chunk records¶
The typed wire structs of an ADT file — the per-chunk MCNK header
(SMChunk), the texture layer (SMLayer) and texture-flag / parameter /
material / colour-grading records, the terrain-normal and liquid-vertex records,
the flying bounds (MFBOPlanes) and the sound emitter. Each struct
backlinks the entity field that uses it; wire integer fields show their on-disk
width. The derived offset/size/count fields the serializer stamps are not
exposed.
The shared placement records ADT reuses (SMMapObjDef for MODF entries,
SMDoodadDef for MDDF entries) are documented with the
common structures.
ADT chunk binary structs (the MCNK cell header, texture layers, liquid records, flying bounds) and their flag enums.
MapChunkFlags
¶
Bases: IntFlag
Per-cell MCNK header flag bits (SMChunk.flags).
Attributes:
| Name | Description |
|---|---|
HasMcsh |
The cell has a baked shadow map (MCSH sub-chunk). |
Impassable |
Impassable terrain (no walking). |
LqRiver |
Legacy (MCLQ) river liquid present. |
LqOcean |
Legacy (MCLQ) ocean liquid present. |
LqMagma |
Legacy (MCLQ) magma liquid present. |
LqSlime |
Legacy (MCLQ) slime liquid present. |
HasMccv |
The cell has vertex colors (MCCV sub-chunk, WotLK+). |
unknown_0x80 |
Unknown (0x80). |
DoNotFixAlphaMap |
The MCAL/MCSH maps are stored in their full 64x64 form rather than the 63x63 "unfixed" form the client repairs on load. wowlib always stores the full 64x64 edit surface and sets this flag on write. |
HighResHoles |
The cell uses the 64-bit high-resolution hole mask (stored in the 8 bytes at header offset 0x14, ~5.3+) instead of the 16-bit holes_low_res field. |
SMChunk
¶
A terrain cell header (MCNK, 128 bytes): the flags, its (x, y) position in the 16x16 cell grid, the area id, the terrain hole mask and the origin. The sub-chunk offset/size/count fields are binary bookkeeping wowlib derives on write, so they are not exposed. See https://wowdev.wiki/ADT/v18#MCNK_chunk.
area_id
property
writable
¶
The cell's area id (a foreign key into AreaTable; in the alpha clients, packed zone/subzone u16s).
holes_low_res
property
writable
¶
The 16-bit low-resolution terrain hole mask (a 4x4 bitfield); used unless the high_res_holes flag selects holes_high_res.
unknown_but_used
property
writable
¶
Unknown but written (padding in the alpha clients).
predominant_texture
property
writable
¶
The "really low quality" predominant-texture map: an 8x8 grid of 2-bit layer indices (16 bytes), naming the detail doodads to show per sub-cell.
no_effect_doodad
property
writable
¶
An 8x8 bitfield (8 bytes): 1 disables detail doodads in that sub-cell (WoD may store it as an explicit MCDD chunk).
position
property
writable
¶
position: C3Vector
The cell origin in world space; MCVT heights are relative to it.
holes_high_res
property
¶
The 64-bit high-resolution hole mask (the 8 bytes at header offset 0x14), valid when the high_res_holes flag is set.
set_holes_high_res
¶
Set the 64-bit high-resolution hole mask (and the high_res_holes flag).
MapHeaderFlags
¶
MHDRData
¶
The tile header (MHDR, 64 bytes): flags plus offsets to the tile's other chunks. wowlib derives every offset from the written layout, so only the flags and the Cata+ inline MAMP alpha-downscale value are exposed. See https://wowdev.wiki/ADT/v18#MHDR_chunk.
mamp_value
property
writable
¶
The inline MAMP alpha-map downscale value (Cata+): the alpha texture size is 64 / (2^value); an explicit MAMP chunk overrides it.
MFBOPlanes
¶
The flying bounds (MFBO, BC+): a maximum and a minimum plane, each a 3x3 grid of int16 heights, limiting where a player may fly on this tile.
LayerFlags
¶
Bases: IntFlag
Per-cell texture-layer flag bits (SMLayer.flags). The low 6 bits hold the animation rotation (0x7) and speed (0x38); see SMLayer.animation_rotation()/animation_speed().
Attributes:
| Name | Description |
|---|---|
AnimationEnabled |
Texture-coordinate animation is on. |
Overbright |
Render much brighter (used for glowing lava). |
UseAlphaMap |
This layer blends through an MCAL alpha map (set on every layer after the first). |
AlphaMapCompressed |
The layer's MCAL alpha map is RLE-compressed on disk. wowlib decodes it either way; on write it re-compresses when this bit is set. |
UseCubeMapReflection |
Treat the ground layer as a skybox reflection (needs an MTXF entry). |
unknown_0x800 |
WoD?+ with 0x1000: apply the texture-effect texture scale. |
unknown_0x1000 |
WoD?+; see 0x800. |
SMLayer
¶
A terrain texture layer (MCLY, 16 bytes): which tileset texture, the blend/animation flags and the ground-effect link. Layers after the first blend through an alpha map (see MapChunk.alphaMaps). The MCAL offset is derived on write and not exposed.
texture_id
property
writable
¶
The texture: an index into the tile's texture list (MTEX names, or the MDID FileDataID table since 8.1).
flags
property
writable
¶
flags: LayerFlags
Flags; LayerFlags bits (the low 6 bits are animation rotation/speed).
effect_id
property
writable
¶
The ground-effect link (a GroundEffectTexture foreign key), or -1 for none (in the alpha clients, a u16 + padding).
animation_rotation
property
¶
The animation direction in 45-degree steps (flag bits 0x7).
SMTextureFlags
¶
Flags for a tileset texture (MTXF, WotLK+): one per MTEX entry. Bit 0 disables specular/height shading and uses a cube map; bits 4-7 hold the texture scale exponent (UVs are divided by 1 << that nibble, so the texture appears 2^n times larger).
flags
property
writable
¶
Flags: bit 0 = use cube map (no _s/_h shading); bits 4-7 = texture scale exponent (UVs are divided by 1 << n).
SMTextureParams
¶
Height-blend parameters for a tileset texture (MTXP, MoP+): the same flags as MTXF plus the _h texture's height scale and offset. Scale 0.0 / offset 1.0 means no _h texture is loaded.
SMTerrainMaterial
¶
Per-layer terrain material ids (MCMT, Cata+): four TerrainMaterial foreign keys, one per MCLY layer.
SMTextureColorGrading
¶
Color-grading info for a tileset texture (MTCG, Shadowlands+): a start distance pair and the color-grading LUT / ramp FileDataIDs applied to the diffuse texture at the same index.
MCNREntry
¶
A terrain vertex normal (MCNR entry, 3 signed bytes): the X, Z, Y components, 127 == 1.0. One per MCVT height vertex (9x9 + 8x8 = 145).
normal
property
writable
¶
The normal components, plain X, Y, Z order; 127 == 1.0, -127 == -1.0. (The often-quoted X, Z, Y layout is wrong: verified empirically against MCVT-derived gradients, wrender 2026-08.)
LiquidVertexFormat
¶
Bases: IntEnum
The MH2O per-instance vertex layout (LiquidVertexFormat). Which arrays a liquid instance stores — heights, depths, texture coordinates — and thus how wowlib decodes and re-lays its vertex data.
Attributes:
| Name | Description |
|---|---|
HeightDepth |
Case 0: a float height map and a byte depth map (the pre-WoD go-to). |
HeightUv |
Case 1: a float height map and a UV texture-coordinate map. |
DepthOnly |
Case 2: a byte depth map only; the surface is flat at 0.0 (ocean). |
HeightUvDepth |
Case 3: a float height map, a UV map and a byte depth map. |
UVMapEntry
¶
SMVert
¶
The magma/slime reading of a legacy liquid vertex (MCLQ): u16 texture coordinates s, t and the shared height. See SLVert.as_magma().
SLVert
¶
A legacy liquid vertex (MCLQ, 8 bytes). The first four bytes are flow / depth data for water and ocean or two u16 texture coordinates for magma / slime — the cell's liquid-type flags choose the reading (use as_magma()). The trailing float is the surface height in all readings.
depth
property
writable
¶
Water: depth. Ocean: depth. Magma/slime: low byte of s.
flow0
property
writable
¶
Water: flow0 percent. Ocean: foam. Magma/slime: high byte of s.
flow1
property
writable
¶
Water: flow1 percent. Ocean: wet. Magma/slime: low byte of t.
SWFlowv
¶
A legacy liquid flow vector (MCLQ, 40 bytes): a sphere of influence, a direction and velocity/amplitude/frequency.
CWSoundEmitter
¶
A terrain sound emitter (MCSE, 28 bytes): a SoundEntriesAdvanced foreign key and a position/size pair placing an ambient sound in the cell.
CWSoundEmitterVanilla
¶
CWSoundEmitterVanilla(sound_point_id: int = 0, sound_name_id: int = 0, position: C3Vector | None = ..., min_distance: float = 0.0, max_distance: float = 0.0, cutoff_distance: float = 0.0, start_time: int = 0, end_time: int = 0, mode: int = 0, loop_count_min: int = 0, loop_count_max: int = 0, group_silence_min: int = 0, group_silence_max: int = 0, play_instances_min: int = 0, play_instances_max: int = 0, inter_sound_gap_min: int = 0, inter_sound_gap_max: int = 0)
A pre-WotLK terrain sound emitter (MCSE, 52 bytes): a SoundEntries foreign key plus the inline distance/time/loop parameters that later moved into SoundEntriesAdvanced.
SMDoodadSetRange
¶
A doodad-set range (MWDR, Shadowlands+): an inclusive [begin, end] span into the MWDS index list, selecting which WMO doodad sets a placement loads.