WMO group chunks¶
The typed wire structs of a WMO group file — geometry, render batches, liquid
grids and per-group lighting — plus the flag enums their fields carry. A struct
that changed across client versions (the render batch WMOBatch, the group
header WMOGroupHeader) documents once: one merged member walk under its
generic ⟨version⟩ name, each member badged with the expansion range it belongs
to (a badge-less member is identical in every version). Wire integer fields show
their on-disk width.
PolyFlags
¶
Bases: IntFlag
Per-triangle flag bits (MOPY and MPY2).
Attributes:
| Name | Description |
|---|---|
Transition |
A transition face, blending exterior and interior lighting. |
NoCamCollide |
The camera does not collide with this face. |
Detail |
A detail face. |
Collision |
Collision-only (also turns off water ripples). |
Hint |
A hint face. |
Render |
A rendered face. |
CullObjects |
Enables game-object culling against this face. |
CollideHit |
Collides with projectiles/hit tests. |
Poly2
¶
Per-triangle material info v2 (MPY2, 10.0+): the MOPY replacement with 16-bit fields for multiple-material support.
WMOBatch⟨version⟩¶
A MOBA render batch, abstract over the client version. Construct a concrete version with WMOBatch.for_version(expansion).
material_id_large
property
writable
¶
16-bit material id; used when flags has 0x2.
RenderBatchOverride
¶
One MORB entry (Cata+): a triangle-strip override of the matching MOBA batch's start and count. Same count as MOBA; ignored unless the client renders strips.
ShadowBatch
¶
One MOBS shadow batch (Cata+): the shadow-pass counterpart of a MOBA render batch.
CAaBspNode
¶
One MOBN BSP node for collision: a split plane or a leaf referencing faces through MOBR.
GroupFlags
¶
Bases: IntFlag
Group flag bits (MOGP and MOGI flags).
Attributes:
| Name | Description |
|---|---|
HasBsp |
Has a collision BSP tree (MOBN/MOBR). |
HasLightMap |
Has a light map (v14 legacy; unused since vanilla). |
HasVertexColors |
Has vertex colors (MOCV). |
Exterior |
Outdoor group (SMOGroup::EXTERIOR). |
ExteriorLit |
Use exterior lighting; no local diffuse. |
Unreachable |
Unreachable (SMOGroup::UNREACHABLE). |
ShowExteriorSky |
Show the exterior sky inside this interior group. |
HasLights |
Has light references (MOLR). |
Lod |
Legion+: an LOD group. Pre-Cata: marked the unused MPB* chunks. |
HasDoodads |
Has doodad references (MODR). |
HasLiquid |
Has liquid (MLIQ), or an implicitly full volume. |
Interior |
Indoor group (SMOGroup::INTERIOR). |
QueryMountAllowed |
Pre-WotLK: whether mount queries are allowed. |
AlwaysDraw |
Always draw (clears exterior after group creation). |
HasTriangleStrips |
Has triangle-strip data (MORI/MORB). |
ShowSkybox |
Show the skybox; unset automatically when MOSB is absent. |
Ocean |
The liquid is ocean, not water (LiquidType handling). |
MountAllowed |
Mounting is allowed in this group. |
HasTwoMocv |
Has a second MOCV layer; only its alpha is used. |
HasTwoMotv |
Has two MOTV texcoord sets (SMOGroup::TVERTS2). |
Antiportal |
An antiportal occluder group (SMOGroup::ANTIPORTAL). |
ExteriorCull |
Exterior culling (SMOGroup::EXTERIOR_CULL, Legion+). |
HasThreeMotv |
Has three MOTV texcoord sets, e.g. for shader 18. |
GroupFlags2
¶
Bases: IntFlag
Extended group flag bits (MOGP.flags2 and MGI2).
Attributes:
| Name | Description |
|---|---|
CanCutTerrain |
Has terrain-cutting portal planes (MOPL, WoD+). |
IsSplitGroupParent |
Parent of a split group (9.2+). |
IsSplitGroupChild |
Child of a split group (9.2+). |
AttachmentMesh |
An attachment mesh (9.2 - 11.0). |
WMOGroupHeader⟨version⟩¶
A MOGP group header, abstract over the client version. Construct a concrete version with WMOGroupHeader.for_version(expansion).
descriptive_group_name
property
writable
¶
Byte offset of the descriptive name in MOGN.
group_liquid
property
writable
¶
Group liquid type; interpretation depends on the root use_liquid_type_dbc_id flag.
unused
property
writable
¶
Unused up to 9.1.5 (becomes the split-group indices in 9.2+).
parent_or_first_child_split_group_index
property
writable
¶
Parent split group, or the first child (9.2+ split groups).
next_split_child_group_index
property
writable
¶
Next sibling in the split-group chain.
LightSet
¶
One light-set range (8.1+): a (first, count) window into the group's spot lights (MLSS -> MOLS), point lights (MLSP -> MOLP) or point-light animations (MLSK -> MOP2).
PointLightAnim
¶
SMOMVert
¶
The magma/slime reading of an MLIQ vertex (8 bytes): two int16 texture coordinates sharing the layout with the water reading (SMOLVert). Obtain one with SMOLVert.as_magma(); which reading is correct is set by the group's liquid type, not stored per vertex.
SMOLVert
¶
One MLIQ liquid vertex (8 bytes). The byte layout is fixed but its interpretation depends on the group's liquid type: water/ocean read the named flow fields; magma/slime reinterpret the first four bytes as two int16 texture coordinates (s, t) — use as_magma()/set_magma() for that reading. Both are 8 bytes, so round-trip is layout-agnostic — pick the reading from the group's liquid type.
flow2
property
writable
¶
Water: flow velocity 2. Magma/slime: high byte of int16 s.
flow1_pct
property
writable
¶
Water: flow-1 percentage. Magma/slime: low byte of int16 t.
filler
property
writable
¶
Water: filler. Magma/slime: high byte of int16 t.
SMOLTile
¶
One MLIQ tile flag byte: bits 0-5 the legacy liquid type, bit 6 fishable, bit 7 shared with an adjacent group.
flags
property
writable
¶
Packed liquid-type / fishable / shared flags.
MLIQData
¶
Structured MLIQ liquid data: a vertex grid and a tile-flag grid with a base position and material id. The on-disk header is 30 bytes (the uint16 material id sits directly after a 12-byte vector, so the header is read field-by-field, not memcpy'd) followed by verts_dim.xverts_dim.y vertices and tiles_dim.xtiles_dim.y tile bytes.