Skip to content

WMO root chunks

The typed wire structs of a WMO root file — materials, doodad sets and definitions, lights, fog, portals and the header — plus the flag enums their fields carry. A struct that changed across client versions 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.

SMODoodadSet [doodadSets]MODS

SMODoodadSet()

One MODS doodad set: a named range of doodad placements. Set 0 ("Set_$DefaultGlobal") is additive and always shown; other sets are exclusive alternatives.

start_index property writable

start_index: int

First doodad instance in MODD.

count property writable

count: Annotated[int, uint32]

Number of doodad instances in the set.

name property

name: str

The informational set name.

DoodadFlags [SMODoodadDef]MODD

Bases: IntFlag

Doodad placement flag bits, packed into the high byte of SMODoodadDef.name_and_flags.

Attributes:

Name Description
NameMask

The low 24 bits: the MODN offset / MODI index mask.

AcceptProjTex

Accept projected textures.

InteriorLighting

Use interior lighting.

NameMask class-attribute instance-attribute

NameMask = 16777215

AcceptProjTex class-attribute instance-attribute

AcceptProjTex = 16777216

InteriorLighting class-attribute instance-attribute

InteriorLighting = 33554432

SMODoodadDef [doodadDefs]MODD

SMODoodadDef()
SMODoodadDef(name_and_flags: int = 0, position: C3Vector | None = ..., orientation: C4Quaternion | None = ..., scale: float = 1.0, color: CImVector | None = ...)

One MODD doodad placement: an M2 instance inside the WMO, quaternion-oriented in model space.

name_and_flags property writable

name_and_flags: int

Packed 24-bit MODN offset / MODI index plus DoodadFlags bits in the high byte.

position property writable

position: C3Vector

Position in WMO model space (Z-up).

orientation property writable

orientation: C4Quaternion

Orientation quaternion.

scale property writable

scale: float

Uniform scale factor.

color property writable

color: CImVector

Color override (BGRA); alpha below 0xFF is a MOLT index.

name_index property

name_index: int

The 24-bit MODN byte offset (or MODI index) of the model name.

SMOFog [fogs]MFOG

SMOFog()
SMOFog(flags: int = 0, position: C3Vector | None = ..., smaller_radius: float = 0.0, larger_radius: float = 0.0, fog: Fog | None = ..., under_water_fog: Fog | None = ...)

One MFOG entry: a fog volume with regular and under-water settings.

flags property writable

flags: Annotated[int, uint32]

0x1: infinite radius (interior/exterior blend fog).

position property writable

position: C3Vector

Fog volume center.

smaller_radius property writable

smaller_radius: float

Inner radius (full fog).

larger_radius property writable

larger_radius: float

Outer radius (fog starts).

fog property writable

fog: Fog

The regular fog band.

under_water_fog property writable

under_water_fog: Fog

The under-water fog band.

Fog

Fog()
Fog(end: float = 0.0, start_scalar: float = 0.0, color: CImVector | None = ...)

One fog band: end distance, start scalar and color.

end property writable
end: float

Distance at which visibility ceases.

start_scalar property writable
start_scalar: float

Start = end * start_scalar (0..1).

color property writable
color: CImVector

Fog color.

FogExtra [fogExtras]MFED

FogExtra()

One MFED entry (9.0+): fog extra data; same count as MFOG.

doodad_set_id property writable

doodad_set_id: int

The doodad set this fog applies to.

AmbientVolume [globalAmbientVolumes]MAVG[ambientVolumes]MAVD

AmbientVolume()

One ambient volume (MAVD, 8.3+) - a spherical region overriding the root ambient color - or a global ambient entry (MAVG), which shares the layout with position/start/end zeroed.

position property writable

position: C3Vector

Volume center (zero in MAVG).

start property writable

start: float

Inner radius (zero in MAVG).

end property writable

end: float

Outer radius (zero in MAVG).

color1 property writable

color1: CImVector

Primary ambient color; overrides the MOHD ambient.

color2 property writable

color2: CImVector

Secondary ambient color.

color3 property writable

color3: CImVector

Tertiary ambient color.

flags property writable

flags: Annotated[int, uint32]

0x1: blend color_1 and color_3.

doodad_set_id property writable

doodad_set_id: int

The doodad set this volume applies to.

AmbientBoxVolume [ambientBoxVolumes]MBVD

AmbientBoxVolume()

One MBVD entry (8.3+): a box-shaped ambient volume bounded by six planes. Only read when MAVG or MAVD is present.

planes property writable

planes: list[C4Plane]

The six bounding planes (position and start combined).

end property writable

end: float

Outer distance.

color1 property writable

color1: CImVector

Primary ambient color.

color2 property writable

color2: CImVector

Secondary ambient color.

color3 property writable

color3: CImVector

Tertiary ambient color.

flags property writable

flags: Annotated[int, uint32]

0x1: blend color_2 and color_3.

doodad_set_id property writable

doodad_set_id: int

The doodad set this volume applies to.

HeaderFlags [SMOHeader]MOHD

Bases: IntFlag

Root header flag bits (SMOHeader.flags).

Attributes:

Name Description
DoNotAttenuateVertices

Do not attenuate vertices based on portal distance.

UseUnifiedRenderPath

Attenuate on portal exit (unified render path).

UseLiquidTypeDbcId

MLIQ ids are LiquidType foreign keys, not the legacy set.

DoNotFixVertexColorAlpha

Skip the vertex-color alpha fixup (FixColorVertexAlpha).

Lod

The WMO has LOD group files (Legion+).

DefaultMaxLod

num_lod is defaulted, implying 3 LOD levels (BfA+).

DoNotAttenuateVertices class-attribute instance-attribute

DoNotAttenuateVertices = 1

UseUnifiedRenderPath class-attribute instance-attribute

UseUnifiedRenderPath = 2

UseLiquidTypeDbcId class-attribute instance-attribute

UseLiquidTypeDbcId = 4

DoNotFixVertexColorAlpha class-attribute instance-attribute

DoNotFixVertexColorAlpha = 8

Lod class-attribute instance-attribute

Lod = 16

DefaultMaxLod class-attribute instance-attribute

DefaultMaxLod = 32

SMOHeader [header]MOHD

SMOHeader()

The MOHD root header: entity counts, ambient color, bounds and root-wide flags.

n_textures property writable

n_textures: int

Number of textures. NOT derived: hundreds of client files store more than the MOTX entry count (exporter-era duplicates), and 8.3+ FileDataID-era files keep a legacy value with no MOTX at all; preserved as stored.

n_lights property writable

n_lights: int

Number of lights (MOLT). NOT derived: a handful of 8.x files store a different count (extra non-MOLT lights); preserved as stored.

n_doodad_names property writable

n_doodad_names: int

Number of doodad filenames. Matches the MODN entry count pre-8.3, but FileDataID-era files keep a legacy value unrelated to MODI's length; preserved as stored.

n_doodad_defs property writable

n_doodad_defs: int

Number of doodad placements (MODD). NOT derived: many client files store an inflated legacy count; preserved as stored.

ambient_color property writable

ambient_color: CArgb

Base ambient color.

wmo_id property writable

wmo_id: int

Foreign key into WMOAreaTable (m_WMOID).

bounding_box property writable

bounding_box: CAaBox

Bounding box of the whole object in model space.

flags property writable

flags: HeaderFlags

Root-wide flags; HeaderFlags bits.

num_lod property writable

num_lod: int

Number of LOD levels including the base (Legion+; zero before).

LightType [SMOLight]MOLT

Bases: IntEnum

The kind of a WMO light (SMOLight.type).

Attributes:

Name Description
Omni

A point light.

Spot

A spot light.

Direct

A directional light.

Ambient

An ambient light.

Omni class-attribute instance-attribute

Omni = 0

Spot class-attribute instance-attribute

Spot = 1

Direct class-attribute instance-attribute

Direct = 2

Ambient class-attribute instance-attribute

Ambient = 3

SMOLight [lights]MOLT

SMOLight()

One MOLT light. Not rendered by classic-era clients, but baked into vertex colors by the exporter.

type property writable

type: Annotated[int, uint8]

The light kind; a LightType value.

use_atten property writable

use_atten: int

Whether attenuation applies.

color property writable

color: CImVector

Light color.

position property writable

position: C3Vector

Position in model space.

intensity property writable

intensity: float

Intensity.

rotation property writable

rotation: C4Quaternion

Orientation; spot/direct lights only.

atten_start property writable

atten_start: float

Attenuation start distance.

atten_end property writable

atten_end: float

Attenuation end distance.

LightExtension [lightExtensions]MOLV

LightExtension()

One MOLV entry (9.1+): a directional-gradient extension to a MOLT light. Multiple entries may extend the same light.

gradients property writable

gradients: list[Gradient]

The six gradient samples.

light_index property writable

light_index: int

The MOLT light this entry extends.

Gradient

Gradient()
Gradient(direction: C3Vector | None = ..., value: float = 0.0)

One directional gradient sample: a direction (usually axis-aligned) and its value.

direction property writable
direction: C3Vector

Gradient direction; usually either xy or z, remainder 0.

value property writable
value: float

Gradient value.

NewLight [newLights]MNLD

NewLight()

One MNLD entry (9.0+): a Shadowlands dynamic light - point or spot - used for everything from torch fires to window-light projection.

type property writable

type: Annotated[int, int32]

0 = point light (sphere), 1 = spot light (cone).

light_index property writable

light_index: int

Index of this light in the MNLD array.

flags property writable

flags: Annotated[int, int32]

0x1: blend outer and inner color; 0x2: casts shadows.

doodad_set property writable

doodad_set: int

The doodad set this light belongs to.

inner_color property writable

inner_color: CImVector

Inner color.

position property writable

position: C3Vector

Position in the WMO.

rotation property writable

rotation: C3Vector

Euler rotation in radians; rotates the light (spot) or its cookie (point).

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

Light intensity.

outer_color property writable

outer_color: CImVector

Outer color; used with flag 0x1.

blend_start property writable

blend_start: float

Gradient start distance for inner/outer blending (flag 0x1).

blend_end property writable

blend_end: float

Gradient end distance for inner/outer blending (flag 0x1).

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.

unknown1 property writable

unknown1: C3Vector

Unknown; only zeros observed.

light_cookie_fdid: int

FileDataID of the light cookie texture (a cube map for point lights).

falloff property writable

falloff: float

Falloff exponent for spot lights.

inner_angle property writable

inner_angle: float

Start of the spot drop-off gradient, in radians.

outer_angle property writable

outer_angle: float

End of the spot drop-off gradient, in radians.

scale_half property writable

scale_half: int

Scale, as raw IEEE half-float bits; used with flag 0x2.

intensity_multiplier_half property writable

intensity_multiplier_half: int

Intensity multiplier, as raw IEEE half-float bits; 0 is corrected to 1 by the client.

MaterialFlags [SMOMaterial]MOMT

Bases: IntFlag

Material flag bits (SMOMaterial.flags).

Attributes:

Name Description
Unlit

Disable lighting.

Unfogged

Disable fog.

TwoSided

Disable backface culling.

ExtLight

Use exterior lighting on interior surfaces.

Sidn

Self-illuminated at day and night (window glow).

Window

A window (lighting special case).

ClampS

Clamp texture addressing on S.

ClampT

Clamp texture addressing on T.

Unlit class-attribute instance-attribute

Unlit = 1

Unfogged class-attribute instance-attribute

Unfogged = 2

TwoSided class-attribute instance-attribute

TwoSided = 4

ExtLight class-attribute instance-attribute

ExtLight = 8

Sidn class-attribute instance-attribute

Sidn = 16

Window class-attribute instance-attribute

Window = 32

ClampS class-attribute instance-attribute

ClampS = 64

ClampT class-attribute instance-attribute

ClampT = 128

SMOMaterial [materials]MOMT

SMOMaterial()
SMOMaterial(flags: MaterialFlags | None = ..., shader: int = 0, blend_mode: int = 0, texture1: int = 0, sidn_color: CImVector | None = ..., frame_sidn_color: CImVector | None = ..., texture2: int = 0, diff_color: CImVector | None = ..., ground_type: int = 0, texture3: int = 0, color2: int = 0, flags2: int = 0, run_time_data: list[int] | None = ...)

One MOMT material, 64 bytes. The layout is stable across v17; what changed in 8.1 is the meaning of the texture fields - MOTX byte offsets before (and in the fallback mode signalled by MOTX's presence), FileDataIDs after.

flags property writable

Render flags; MaterialFlags bits.

shader property writable

shader: Annotated[int, uint32]

Index into the client's WMO shader table.

blend_mode property writable

blend_mode: int

Blending mode (EGxBlend).

texture1 property writable

texture1: Annotated[int, uint32]

First texture: MOTX offset or FileDataID.

sidn_color property writable

sidn_color: CImVector

Self-illuminated (night glow) color.

frame_sidn_color property writable

frame_sidn_color: CImVector

Runtime sidn slot; zero on disk.

texture2 property writable

texture2: Annotated[int, uint32]

Second texture: MOTX offset or FileDataID.

diff_color property writable

diff_color: CImVector

Diffuse color.

ground_type property writable

ground_type: int

Foreign key into TerrainType.

texture3 property writable

texture3: Annotated[int, uint32]

Third texture: MOTX offset or FileDataID.

color2 property writable

color2: Annotated[int, uint32]

Extra color slot (a texture FileDataID for shader 23).

flags2 property writable

flags2: Annotated[int, uint32]

Extra flags slot (a texture FileDataID for shader 23).

run_time_data property writable

run_time_data: list[int]

Nulled on load; shader-23 texture FileDataIDs.

UVAnimation [uvAnimations]MOUV

UVAnimation()
UVAnimation(translation_speed: list[C2Vector] | None = ...)

One MOUV entry (7.3+): texture-coordinate translation speeds for two of the material's texture layers. Same count as the materials; all-zero entries mean no animation.

translation_speed property writable

translation_speed: list[C2Vector]

Translation speed per animated texture layer.

SMOGroupInfo [groupInfos]MOGI

SMOGroupInfo()
SMOGroupInfo(flags: GroupFlags | None = ..., bounding_box: CAaBox | None = ..., name_offset: int = -1)

One MOGI entry: per-group flags, bounds and name, mirrored from the group file's own header.

flags property writable

flags: GroupFlags

Group flags; the same GroupFlags bits as MOGP.

bounding_box property writable

bounding_box: CAaBox

Group bounding box.

name_offset property writable

name_offset: int

Byte offset of the group name in MOGN, -1 for no name.

GroupInfo2 [groupInfos2]MGI2

GroupInfo2()
GroupInfo2(flags2: GroupFlags2 | None = ..., lod_index: int = 0)

One MGI2 entry (9.0+): group info v2. Same count as MOGI; when present it overrides the older LOD-selection logic.

flags2 property writable

flags2: GroupFlags2

A copy of the group file's flags2; GroupFlags2 bits.

lod_index property writable

lod_index: int

Which LOD level this group belongs to.

SMOPortal [portals]MOPT

SMOPortal()
SMOPortal(start_vertex: int = 0, count: int = 0, plane: C4Plane | None = ...)

One MOPT portal: a polygon plane separating two groups.

start_vertex property writable

start_vertex: int

First vertex in MOPV.

count property writable

count: Annotated[int, uint16]

Vertex count.

plane property writable

plane: C4Plane

The portal plane.

SMOPortalRef [portalRefs]MOPR

SMOPortalRef()
SMOPortalRef(portal_index: int = 0, group_index: int = 0, side: int = 0, filler: int = 0)

One MOPR entry: a group's reference to a portal and the group on the other side.

portal_index property writable

portal_index: int

Index into MOPT.

group_index property writable

group_index: int

The group on the other side of the portal.

side property writable

side: int

Which side of the portal plane this reference looks from.

filler property writable

filler: Annotated[int, uint16]

Alignment filler; zero in client files.

PortalExtra [portalExtras]MOPE

PortalExtra()
PortalExtra(portal_index: int = 0, unknown1: int = 0, unknown2: int = 0, unknown3: int = 0)

One MOPE entry (11.1+): portal extra data; largely undeciphered.

portal_index property writable

portal_index: int

Index into MOPT; seems to match MOPR values.

unknown1 property writable

unknown1: Annotated[int, uint32]

Unknown; preserved for round-trip.

unknown2 property writable

unknown2: Annotated[int, uint32]

Unknown; preserved for round-trip.

unknown3 property writable

unknown3: Annotated[int, uint32]

Unknown; preserved for round-trip.

SMOVisibleBlock [visibleBlocks]MOVB

SMOVisibleBlock()
SMOVisibleBlock(first_vertex: int = 0, count: int = 0)

One MOVB visible block: a vertex range in MOVV.

first_vertex property writable

first_vertex: int

First vertex in MOVV.

count property writable

count: Annotated[int, uint16]

Vertex count.