Skip to content

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 [SMOPoly]MOPY

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.

Transition class-attribute instance-attribute

Transition = 1

NoCamCollide class-attribute instance-attribute

NoCamCollide = 2

Detail class-attribute instance-attribute

Detail = 4

Collision class-attribute instance-attribute

Collision = 8

Hint class-attribute instance-attribute

Hint = 16

Render class-attribute instance-attribute

Render = 32

CullObjects class-attribute instance-attribute

CullObjects = 64

CollideHit class-attribute instance-attribute

CollideHit = 128

SMOPoly [polys]MOPY

SMOPoly()
SMOPoly(flags: PolyFlags | None = ..., material_id: int = 0)

Per-triangle material info (MOPY).

flags property writable

flags: PolyFlags

Triangle flags; PolyFlags bits.

material_id property writable

material_id: int

Index into MOMT; 0xFF for collision-only faces.

Poly2 [polys2]MNLR

Poly2()
Poly2(flags: int = 0, material_id: int = 0)

Per-triangle material info v2 (MPY2, 10.0+): the MOPY replacement with 16-bit fields for multiple-material support.

flags property writable

flags: Annotated[int, uint16]

Triangle flags; PolyFlags bits, plus 0x100 for MOQG ground-type queries.

material_id property writable

material_id: int

Index into MOMT.

WMOBatch⟨version⟩

A MOBA render batch, abstract over the client version. Construct a concrete version with WMOBatch.for_version(expansion).

box_min property writable VanillaWoD

box_min: list[int]

Culling box minimum corner (rounded vertex bounds).

box_max property writable VanillaWoD

box_max: list[int]

Culling box maximum corner.

material_id_large property writable Legion

material_id_large: int

16-bit material id; used when flags has 0x2.

start_index property writable

start_index: int

First face index in MOVI.

count property writable

count: Annotated[int, uint16]

Number of MOVI indices.

min_index property writable

min_index: int

First vertex used in MOVT.

max_index property writable

max_index: int

Last vertex used, inclusive.

flags property writable

flags: Annotated[int, uint8]

Batch flags; 0x2: use material_id_large.

material_id property writable

material_id: int

Index into MOMT (when it fits 8 bits).

RenderBatchOverride [batchOverrides]MORB

RenderBatchOverride()
RenderBatchOverride(start_index: int = 0, index_count: int = 0, padding: int = 0)

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.

start_index property writable

start_index: int

Replacement first-index into the MORI strips.

index_count property writable

index_count: int

Replacement index count.

padding property writable

padding: Annotated[int, uint16]

Alignment padding; zero in client files.

ShadowBatch [shadowBatches]MOBS

ShadowBatch()

One MOBS shadow batch (Cata+): the shadow-pass counterpart of a MOBA render batch.

material_id_large property writable

material_id_large: int

16-bit material id; used when flags has 0x2.

start property writable

start: Annotated[int, int32]

Start value; divided by 3 on use (a face index).

count property writable

count: Annotated[int, int16]

Count value; divided by 3 on use (a face count).

flags property writable

flags: Annotated[int, uint8]

Batch flags; 0x2: use material_id_large.

material_id property writable

material_id: int

Index into MOMT (when it fits 8 bits).

CAaBspNode [bspNodes]MOBN

CAaBspNode()
CAaBspNode(flags: int = 0, neg_child: int = -1, pos_child: int = -1, n_faces: int = 0, face_start: int = 0, plane_dist: float = 0.0)

One MOBN BSP node for collision: a split plane or a leaf referencing faces through MOBR.

flags property writable

flags: Annotated[int, uint16]

0-2: split axis, 0x4: leaf.

neg_child property writable

neg_child: int

Negative-side child node, -1 for none.

pos_child property writable

pos_child: int

Positive-side child node, -1 for none.

n_faces property writable

n_faces: int

Face count in MOBR (leaves).

face_start property writable

face_start: int

First face index in MOBR.

plane_dist property writable

plane_dist: float

Split plane distance from the model origin.

GroupFlags [WMOGroupHeader]MOGP

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.

HasBsp class-attribute instance-attribute

HasBsp = 1

HasLightMap class-attribute instance-attribute

HasLightMap = 2

HasVertexColors class-attribute instance-attribute

HasVertexColors = 4

Exterior class-attribute instance-attribute

Exterior = 8

ExteriorLit class-attribute instance-attribute

ExteriorLit = 64

Unreachable class-attribute instance-attribute

Unreachable = 128

ShowExteriorSky class-attribute instance-attribute

ShowExteriorSky = 256

HasLights class-attribute instance-attribute

HasLights = 512

Lod class-attribute instance-attribute

Lod = 1024

HasDoodads class-attribute instance-attribute

HasDoodads = 2048

HasLiquid class-attribute instance-attribute

HasLiquid = 4096

Interior class-attribute instance-attribute

Interior = 8192

QueryMountAllowed class-attribute instance-attribute

QueryMountAllowed = 32768

AlwaysDraw class-attribute instance-attribute

AlwaysDraw = 65536

HasTriangleStrips class-attribute instance-attribute

HasTriangleStrips = 131072

ShowSkybox class-attribute instance-attribute

ShowSkybox = 262144

Ocean class-attribute instance-attribute

Ocean = 524288

MountAllowed class-attribute instance-attribute

MountAllowed = 2097152

HasTwoMocv class-attribute instance-attribute

HasTwoMocv = 16777216

HasTwoMotv class-attribute instance-attribute

HasTwoMotv = 33554432

Antiportal class-attribute instance-attribute

Antiportal = 67108864

ExteriorCull class-attribute instance-attribute

ExteriorCull = 536870912

HasThreeMotv class-attribute instance-attribute

HasThreeMotv = 1073741824

GroupFlags2 [WMOGroupHeader]MOGP

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).

CanCutTerrain class-attribute instance-attribute

CanCutTerrain = 1

IsSplitGroupParent class-attribute instance-attribute

IsSplitGroupParent = 64

IsSplitGroupChild class-attribute instance-attribute

IsSplitGroupChild = 128

AttachmentMesh class-attribute instance-attribute

AttachmentMesh = 256

WMOGroupHeader⟨version⟩

A MOGP group header, abstract over the client version. Construct a concrete version with WMOGroupHeader.for_version(expansion).

group_name property writable

group_name: int

Byte offset of the group name in MOGN.

descriptive_group_name property writable

descriptive_group_name: int

Byte offset of the descriptive name in MOGN.

flags property writable

flags: GroupFlags

Group flags; GroupFlags bits.

bounding_box property writable

bounding_box: CAaBox

Group bounding box.

portal_start property writable

portal_start: int

First portal reference in MOPR.

portal_count property writable

portal_count: int

Portal reference count.

trans_batch_count property writable

trans_batch_count: int

Transition batch count (MOBA prefix).

int_batch_count property writable

int_batch_count: int

Interior batch count.

ext_batch_count property writable

ext_batch_count: int

Exterior batch count.

batch_type_d property writable

batch_type_d: int

The fourth batch-count slot; unused by clients.

fog_ids property writable

fog_ids: list[int]

Fog indices into MFOG.

group_liquid property writable

group_liquid: int

Group liquid type; interpretation depends on the root use_liquid_type_dbc_id flag.

unique_id property writable

unique_id: int

Foreign key into WMOAreaTable (m_WMOGroupID).

flags2 property writable

flags2: GroupFlags2

Extended flags (Cataclysm+); GroupFlags2 bits.

unused property writable VanillaBfA

unused: Annotated[int, uint32]

Unused up to 9.1.5 (becomes the split-group indices in 9.2+).

parent_or_first_child_split_group_index property writable SL

parent_or_first_child_split_group_index: int

Parent split group, or the first child (9.2+ split groups).

next_split_child_group_index property writable SL

next_split_child_group_index: int

Next sibling in the split-group chain.

PointLight [pointLights]MOLP

PointLight()
PointLight(unknown1: int = 0, color: CImVector | None = ..., position: C3Vector | None = ..., intensity: float = 0.0, atten_start: float = 0.0, atten_end: float = 0.0, unknown2: float = 0.0, unknown3: int = 0, unknown4: int = 0)

One MOLP point light (Legion+).

unknown1 property writable

unknown1: Annotated[int, uint32]

Unknown; preserved for round-trip.

color property writable

color: CImVector

Light color.

position property writable

position: C3Vector

Position of the light.

intensity property writable

intensity: float

Intensity.

atten_start property writable

atten_start: float

Attenuation start distance.

atten_end property writable

atten_end: float

Attenuation end distance.

unknown2 property writable

unknown2: float

Unknown; only zeros observed.

unknown3 property writable

unknown3: Annotated[int, uint32]

Unknown; preserved for round-trip.

unknown4 property writable

unknown4: Annotated[int, uint32]

Unknown; possibly a color.

LightSet [spotLightSets]MLSS[pointLightSets]MLSP[pointLightAnimSets]MLSK

LightSet()
LightSet(offset: int = 0, count: int = 0)

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).

offset property writable

offset: Annotated[int, uint32]

First light in the referenced chunk.

count property writable

count: Annotated[int, uint32]

Number of lights in the set.

PointLightAnim [pointLightAnims]MOP2

PointLightAnim()

One MOP2 entry (8.1+): an animated point light with flicker and light-cookie texture data.

light_index property writable

light_index: int

Index of the light this animation belongs to.

color property writable

color: CImVector

Light color.

position property writable

position: C3Vector

Position of the light.

atten_start property writable

atten_start: float

Attenuation start distance.

atten_end property writable

atten_end: float

Attenuation end distance.

intensity property writable

intensity: float

Intensity.

rotation property writable

rotation: C3Vector

Euler rotation in radians.

flicker_intensity property writable

flicker_intensity: float

Flickering intensity.

flicker_speed property writable

flicker_speed: float

Flickering speed.

flicker_mode property writable

flicker_mode: int

0 = off, 1 = sine curve, 2 = noise curve, 3 = noise step.

light_texture_fdid property writable

light_texture_fdid: int

FileDataID of the light cookie texture.

SMOMVert

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

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.

s property writable

s: Annotated[int, int16]

Texture coordinate s (the water flow1/flow2 bytes).

t property writable

t: Annotated[int, int16]

Texture coordinate t (the water flow1_pct/filler bytes).

height property writable

height: float

Liquid surface height, shared with the water reading.

SMOLVert

SMOLVert()
SMOLVert(flow1: int = 0, flow2: int = 0, flow1_pct: int = 0, filler: int = 0, height: float = 0.0)

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.

flow1 property writable

flow1: int

Water: flow velocity 1. Magma/slime: low byte of int16 s.

flow2 property writable

flow2: Annotated[int, uint8]

Water: flow velocity 2. Magma/slime: high byte of int16 s.

flow1_pct property writable

flow1_pct: int

Water: flow-1 percentage. Magma/slime: low byte of int16 t.

filler property writable

filler: Annotated[int, uint8]

Water: filler. Magma/slime: high byte of int16 t.

height property writable

height: float

Liquid surface height at this vertex.

as_magma

as_magma() -> SMOMVert

Reinterpret this vertex under the magma/slime reading (int16 s, t texcoords). A pure byte reinterpretation; use it only when the group's liquid type is magma or slime.

set_magma

set_magma(magma: SMOMVert) -> None

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

SMOLTile

SMOLTile()
SMOLTile(flags: int = 0)

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

flags: Annotated[int, uint8]

Packed liquid-type / fishable / shared flags.

MLIQData [liquid]MLIQ

MLIQData()
MLIQData(verts_dim: C2IVector, tiles_dim: C2IVector, base_coords: C3Vector, material_id: int, vertices: list[SMOLVert], tiles: list[SMOLTile])

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.

verts_dim property writable

verts_dim: C2IVector

Vertex grid dimensions (xverts, yverts).

tiles_dim property writable

tiles_dim: C2IVector

Tile grid dimensions (xtiles, ytiles); one less than the vertex dimensions in each axis.

base_coords property writable

base_coords: C3Vector

Grid origin in group space.

material_id property writable

material_id: int

Liquid material id: an MOMT index, or a LiquidType id when the root's use_liquid_type_dbc_id flag is set.

vertices property

vertices: list[SMOLVert]

verts_dim.x * verts_dim.y liquid vertices, row-major.

tiles property

tiles: list[SMOLTile]

tiles_dim.x * tiles_dim.y tile flag bytes, row-major.

empty property

empty: bool

Whether this group carries no liquid grid.