Skip to content

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 [SMChunk]MCNK

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.

HasMcsh class-attribute instance-attribute

HasMcsh = 1

Impassable class-attribute instance-attribute

Impassable = 2

LqRiver class-attribute instance-attribute

LqRiver = 4

LqOcean class-attribute instance-attribute

LqOcean = 8

LqMagma class-attribute instance-attribute

LqMagma = 16

LqSlime class-attribute instance-attribute

LqSlime = 32

HasMccv class-attribute instance-attribute

HasMccv = 64

unknown_0x80 class-attribute instance-attribute

unknown_0x80 = 128

DoNotFixAlphaMap class-attribute instance-attribute

DoNotFixAlphaMap = 32768

HighResHoles class-attribute instance-attribute

HighResHoles = 65536

SMChunk [header]MCNK

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.

flags property writable

Flags; MapChunkFlags bits.

index_x property writable

index_x: int

The cell's column index in the 16x16 grid (0-15).

index_y property writable

index_y: int

The cell's row index in the 16x16 grid (0-15).

area_id property writable

area_id: int

The cell's area id (a foreign key into AreaTable; in the alpha clients, packed zone/subzone u16s).

holes_low_res property writable

holes_low_res: int

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_used: int

Unknown but written (padding in the alpha clients).

predominant_texture property writable

predominant_texture: list[int]

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

no_effect_doodad: list[int]

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

holes_high_res: int

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_holes_high_res(holes: int) -> None

Set the 64-bit high-resolution hole mask (and the high_res_holes flag).

MapHeaderFlags [MHDRData]MHDR

Bases: IntFlag

Tile header flag bits (MHDRData.flags).

Attributes:

Name Description
HasMfbo

The tile has a flying bounds chunk (MFBO).

Northrend

Set on some Northrend tiles; meaning unknown.

HasMfbo class-attribute instance-attribute

HasMfbo = 1

Northrend class-attribute instance-attribute

Northrend = 2

MHDRData [header]MHDR

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.

flags property writable

Flags; MapHeaderFlags bits.

mamp_value property writable

mamp_value: int

The inline MAMP alpha-map downscale value (Cata+): the alpha texture size is 64 / (2^value); an explicit MAMP chunk overrides it.

MFBOPlanes [flying_bounds]MFBO

MFBOPlanes()
MFBOPlanes(maximum: list[int] | None = ..., minimum: list[int] | None = ...)

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.

maximum property writable

maximum: list[Annotated[int, int16]]

The maximum plane: 3x3 int16 heights (row-major).

minimum property writable

minimum: list[Annotated[int, int16]]

The minimum plane: 3x3 int16 heights (row-major).

LayerFlags [SMLayer]MCLY

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.

AnimationEnabled class-attribute instance-attribute

AnimationEnabled = 64

Overbright class-attribute instance-attribute

Overbright = 128

UseAlphaMap class-attribute instance-attribute

UseAlphaMap = 256

AlphaMapCompressed class-attribute instance-attribute

AlphaMapCompressed = 512

UseCubeMapReflection class-attribute instance-attribute

UseCubeMapReflection = 1024

unknown_0x800 class-attribute instance-attribute

unknown_0x800 = 2048

unknown_0x1000 class-attribute instance-attribute

unknown_0x1000 = 4096

SMLayer [layers]MCLY

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

texture_id: int

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

effect_id: int

The ground-effect link (a GroundEffectTexture foreign key), or -1 for none (in the alpha clients, a u16 + padding).

animation_rotation property

animation_rotation: int

The animation direction in 45-degree steps (flag bits 0x7).

animation_speed property

animation_speed: int

The animation speed (flag bits 0x38).

SMTextureFlags [texture_flags]MTXF

SMTextureFlags()
SMTextureFlags(flags: int = 0)

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: Annotated[int, uint32]

Flags: bit 0 = use cube map (no _s/_h shading); bits 4-7 = texture scale exponent (UVs are divided by 1 << n).

SMTextureParams [texture_params]MTXP

SMTextureParams()
SMTextureParams(flags: int = 0, height_scale: float = 0.0, height_offset: float = 1.0, padding: int = 0)

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.

flags property writable

flags: Annotated[int, uint32]

Flags, as in MTXF.

height_scale property writable

height_scale: float

Height scale: _h values map to [0, height_scale) as the blend height (default 0.0).

height_offset property writable

height_offset: float

Height offset added to the scaled _h value (default 1.0).

padding property writable

padding: Annotated[int, uint32]

Padding.

SMTerrainMaterial [material_ids]MCMT

SMTerrainMaterial()
SMTerrainMaterial(material_id: list[int] | None = ...)

Per-layer terrain material ids (MCMT, Cata+): four TerrainMaterial foreign keys, one per MCLY layer.

material_id property writable

material_id: list[int]

The four per-layer material ids.

SMTextureColorGrading

SMTextureColorGrading()
SMTextureColorGrading(start_distance: int = 0, _04: int = 0, color_grading_fdid: int = 0, color_grading_ramp_fdid: int = 0)

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.

start_distance property writable

start_distance: int

Start distance (the record is used when this or _04 is non-zero).

color_grading_fdid property writable

color_grading_fdid: int

The color-grading LUT FileDataID.

color_grading_ramp_fdid property writable

color_grading_ramp_fdid: int

The color-grading ramp FileDataID.

MCNREntry [normals]MCNR

MCNREntry()
MCNREntry(normal: list[int] | None = ...)

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

normal: list[Annotated[int, int8]]

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 MH2O

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.

HeightDepth class-attribute instance-attribute

HeightDepth = 0

HeightUv class-attribute instance-attribute

HeightUv = 1

DepthOnly class-attribute instance-attribute

DepthOnly = 2

HeightUvDepth class-attribute instance-attribute

HeightUvDepth = 3

UVMapEntry

UVMapEntry()
UVMapEntry(x: int = 0, y: int = 0)

An MH2O liquid UV coordinate (case 1/3): x and y, each divided by 8 for shaders.

x property writable

x: Annotated[int, uint16]

The u coordinate (divided by 8 in shaders).

y property writable

y: Annotated[int, uint16]

The v coordinate.

SMVert

SMVert()
SMVert(s: int = 0, t: int = 0, height: float = 0.0)

The magma/slime reading of a legacy liquid vertex (MCLQ): u16 texture coordinates s, t and the shared height. See SLVert.as_magma().

s property writable

s: Annotated[int, uint16]

Texture coordinate s.

t property writable

t: Annotated[int, uint16]

Texture coordinate t.

height property writable

height: float

Liquid surface height (shared with the water reading).

SLVert

SLVert()
SLVert(depth: int = 0, flow0: int = 0, flow1: int = 0, filler: int = 0, height: float = 0.0)

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

depth: Annotated[int, uint8]

Water: depth. Ocean: depth. Magma/slime: low byte of s.

flow0 property writable

flow0: Annotated[int, uint8]

Water: flow0 percent. Ocean: foam. Magma/slime: high byte of s.

flow1 property writable

flow1: Annotated[int, uint8]

Water: flow1 percent. Ocean: wet. Magma/slime: low byte of t.

filler property writable

filler: Annotated[int, uint8]

Filler. Magma/slime: high byte of t.

height property writable

height: float

Liquid surface height at this vertex.

as_magma

as_magma() -> SMVert

Reinterpret this vertex under the magma/slime reading (u16 s, t). A pure byte reinterpretation; use it only for magma/slime cells.

set_magma

set_magma(magma: SMVert) -> None

Overwrite this vertex's bytes from a magma/slime reading.

SWFlowv

SWFlowv()
SWFlowv(sphere: CAaSphere | None = ..., direction: C3Vector | None = ..., velocity: float = 0.0, amplitude: float = 0.0, frequency: float = 0.0)

A legacy liquid flow vector (MCLQ, 40 bytes): a sphere of influence, a direction and velocity/amplitude/frequency.

sphere property writable

sphere: CAaSphere

The sphere of influence.

direction property writable

direction: C3Vector

The flow direction.

velocity property writable

velocity: float

The flow velocity.

amplitude property writable

amplitude: float

The flow amplitude.

frequency property writable

frequency: float

The flow frequency.

CWSoundEmitter [sound_emitters]MCSE

CWSoundEmitter()
CWSoundEmitter(entry_id: int = 0, position: C3Vector | None = ..., size: C3Vector | None = ...)

A terrain sound emitter (MCSE, 28 bytes): a SoundEntriesAdvanced foreign key and a position/size pair placing an ambient sound in the cell.

entry_id property writable

entry_id: int

The sound entry (a SoundEntriesAdvanced foreign key).

position property writable

position: C3Vector

The emitter position.

size property writable

size: C3Vector

The emitter size / extents.

CWSoundEmitterVanilla

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.

sound_point_id property writable

sound_point_id: int

Sequential emitter id, unique per map.

sound_name_id property writable

sound_name_id: int

The sound (a SoundEntries foreign key).

position property writable

position: C3Vector

The emitter position, in world coordinates.

min_distance property writable

min_distance: float

Full-volume distance.

max_distance property writable

max_distance: float

Audible-range distance.

cutoff_distance property writable

cutoff_distance: float

Cutoff distance.

start_time property writable

start_time: int

Daily start time, minutes.

end_time property writable

end_time: int

Daily end time, minutes.

mode property writable

mode: int

Emitter mode.

loop_count_min property writable

loop_count_min: int

Minimum loop count.

loop_count_max property writable

loop_count_max: int

Maximum loop count.

group_silence_min property writable

group_silence_min: int

Minimum group silence, milliseconds.

group_silence_max property writable

group_silence_max: int

Maximum group silence, milliseconds.

play_instances_min property writable

play_instances_min: int

Minimum concurrent play instances.

play_instances_max property writable

play_instances_max: int

Maximum concurrent play instances.

inter_sound_gap_min property writable

inter_sound_gap_min: int

Minimum gap between sounds, milliseconds.

inter_sound_gap_max property writable

inter_sound_gap_max: int

Maximum gap between sounds, milliseconds.

SMDoodadSetRange

SMDoodadSetRange()
SMDoodadSetRange(begin: int = 0, end: int = 0)

A doodad-set range (MWDR, Shadowlands+): an inclusive [begin, end] span into the MWDS index list, selecting which WMO doodad sets a placement loads.

begin property writable

begin: Annotated[int, uint32]

The first MWDS index (inclusive).

end property writable

end: Annotated[int, uint32]

The last MWDS index (inclusive).