Namespace WoWLib.Formats.ADT
Classes
- ADT
A terrain map tile, abstract over the client version — the .adt file (and, since Cataclysm, its _tex0/_obj0/_obj1/_lod split files) as one entity. Construct the concrete version with ADT.for_version(expansion), then read()/write(); the per-version ADT* classes are subclasses. See https://wowdev.wiki/ADT/v18.
- ADT.Era
The typed era factories: one method per expansion, each returning the concrete range class covering it — the compile-time twin of ForVersion.
- ADTBfaPlus
A terrain map tile for one client version: the 256 terrain chunks plus the tile-wide texture, model and placement tables, unified across the split ADT files the tile is stored in. Adding a texture, model or placement does not depend on which file it lands in — the writer routes it. An instance read from a client and left unmodified rewrites to a semantically equal tile (alpha maps and offset tables are re-derived, not byte-preserved). See https://wowdev.wiki/ADT/v18.
- ADTCataToLegion
A terrain map tile for one client version: the 256 terrain chunks plus the tile-wide texture, model and placement tables, unified across the split ADT files the tile is stored in. Adding a texture, model or placement does not depend on which file it lands in — the writer routes it. An instance read from a client and left unmodified rewrites to a semantically equal tile (alpha maps and offset tables are re-derived, not byte-preserved). See https://wowdev.wiki/ADT/v18.
- ADTTbc
A terrain map tile for one client version: the 256 terrain chunks plus the tile-wide texture, model and placement tables, unified across the split ADT files the tile is stored in. Adding a texture, model or placement does not depend on which file it lands in — the writer routes it. An instance read from a client and left unmodified rewrites to a semantically equal tile (alpha maps and offset tables are re-derived, not byte-preserved). See https://wowdev.wiki/ADT/v18.
- ADTVanilla
A terrain map tile for one client version: the 256 terrain chunks plus the tile-wide texture, model and placement tables, unified across the split ADT files the tile is stored in. Adding a texture, model or placement does not depend on which file it lands in — the writer routes it. An instance read from a client and left unmodified rewrites to a semantically equal tile (alpha maps and offset tables are re-derived, not byte-preserved). See https://wowdev.wiki/ADT/v18.
- ADTWotlk
A terrain map tile for one client version: the 256 terrain chunks plus the tile-wide texture, model and placement tables, unified across the split ADT files the tile is stored in. Adding a texture, model or placement does not depend on which file it lands in — the writer routes it. An instance read from a client and left unmodified rewrites to a semantically equal tile (alpha maps and offset tables are re-derived, not byte-preserved). See https://wowdev.wiki/ADT/v18.
- LiquidInstance
One liquid layer over a terrain cell (an MH2O instance), decoded. The heightmap/depthmap/uvmap arrays are present according to vertex_format and each hold (width + 1) x (height + 1) entries; exists_bitmap (when not empty) is a width x height bit grid selecting which tiles render. Heights outside [min_height, max_height] and the binary offsets are derived, not stored.
- MapChunk
A terrain chunk (MCNK), abstract over the client version. Usually obtained from ADT.chunks rather than constructed; the per-version MapChunk* classes are subclasses. Construct a concrete version with MapChunk.for_version(expansion). See https://wowdev.wiki/ADT/v18#MCNK_chunk.
- MapChunk.Era
The typed era factories: one method per expansion, each returning the concrete range class covering it — the compile-time twin of ForVersion.
- MapChunkCataPlus
One terrain chunk (MCNK) of a map tile, fully decoded: the chunk header, the 9x9+8x8 height and normal grids, the texture layers with their decoded 64x64 alpha maps, the shadow map, doodad/object references, sound emitters and (version dependent) vertex colors, baked lighting and legacy liquid. A tile has 256 of these. wowlib decodes alpha/shadow maps to a plain 64x64 edit surface and re-encodes on write; the round-trip is semantic, not byte-identical. See https://wowdev.wiki/ADT/v18#MCNK_chunk.
- MapChunkLiquid
The liquid of one terrain cell (an MH2O chunk entry): the 8x8 fishable and deep attribute bit masks and the stacked liquid layers (instances). A cell with no liquid has no instances.
- MapChunkVanillaToTbc
One terrain chunk (MCNK) of a map tile, fully decoded: the chunk header, the 9x9+8x8 height and normal grids, the texture layers with their decoded 64x64 alpha maps, the shadow map, doodad/object references, sound emitters and (version dependent) vertex colors, baked lighting and legacy liquid. A tile has 256 of these. wowlib decodes alpha/shadow maps to a plain 64x64 edit surface and re-encodes on write; the round-trip is semantic, not byte-identical. See https://wowdev.wiki/ADT/v18#MCNK_chunk.
- MapChunkWotlk
One terrain chunk (MCNK) of a map tile, fully decoded: the chunk header, the 9x9+8x8 height and normal grids, the texture layers with their decoded 64x64 alpha maps, the shadow map, doodad/object references, sound emitters and (version dependent) vertex colors, baked lighting and legacy liquid. A tile has 256 of these. wowlib decodes alpha/shadow maps to a plain 64x64 edit surface and re-encodes on write; the round-trip is semantic, not byte-identical. See https://wowdev.wiki/ADT/v18#MCNK_chunk.
- MclqData
A terrain chunk's legacy liquid (MCLQ, up to WotLK, deprecated by MH2O): a 9x9 grid of liquid vertices (SLVert; read as magma/slime via as_magma()), an 8x8 grid of tile flag bytes and the active flow vectors. The height range and the flow-vector count are stored; the trailing pair of flow vectors is always written.
- Mh2OData
The tile's liquid (MH2O, WotLK+): one MapChunkLiquid per terrain cell, in the 16x16 row-major cell order. Decoded from the chunk's offset structure and re-laid on write (the binary offsets are derived). Index it by cell = y * 16 + x.
Enums
- AlphaFormat
The on-disk MCAL alpha-map bit depth for a tile, decided by the map's WDT MPHD flags (adt_has_big_alpha 0x4 / adt_has_height_texturing 0x80), not the client era. wowlib always decodes alpha maps to a 64x64 8-bit edit surface; this records how they were laid out on disk so a write can reproduce the same encoding. RLE compression is an independent per-layer choice (the MCLY alpha_map_compressed flag), orthogonal to the depth.
- FileKind
The physical ADT file a chunk belongs to. Pre-Cataclysm tiles are a single
monolithic.adt; Cataclysm split the tile into aroot.adt and thetex0/obj0/obj1/lodsplit files. wowlib presents one unified ADT regardless; this only surfaces in the low-level split-file API.