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
¶
One MODS doodad set: a named range of doodad placements. Set 0 ("Set_$DefaultGlobal") is additive and always shown; other sets are exclusive alternatives.
DoodadFlags
¶
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. |
SMODoodadDef
¶
SMODoodadDef(name_and_flags: int = 0, position: C3Vector | None = ..., orientation: C4Quaternion | None = ..., scale: float = 1.0, color: CImVector | None = ...)
SMOFog
¶
FogExtra
¶
One MFED entry (9.0+): fog extra data; same count as MFOG.
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.
AmbientBoxVolume
¶
HeaderFlags
¶
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+). |
SMOHeader
¶
The MOHD root header: entity counts, ambient color, bounds and root-wide flags.
n_textures
property
writable
¶
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
¶
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
¶
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
¶
Number of doodad placements (MODD). NOT derived: many client files store an inflated legacy count; preserved as stored.
bounding_box
property
writable
¶
bounding_box: CAaBox
Bounding box of the whole object in model space.
num_lod
property
writable
¶
Number of LOD levels including the base (Legion+; zero before).
LightType
¶
SMOLight
¶
One MOLT light. Not rendered by classic-era clients, but baked into vertex colors by the exporter.
LightExtension
¶
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
¶
0 = point light (sphere), 1 = spot light (cone).
flags
property
writable
¶
0x1: blend outer and inner color; 0x2: casts shadows.
rotation
property
writable
¶
rotation: C3Vector
Euler rotation in radians; rotates the light (spot) or its cookie (point).
blend_start
property
writable
¶
Gradient start distance for inner/outer blending (flag 0x1).
blend_end
property
writable
¶
Gradient end distance for inner/outer blending (flag 0x1).
flicker_mode
property
writable
¶
0 = off, 1 = sine curve, 2 = noise curve, 3 = noise step.
light_cookie_fdid
property
writable
¶
FileDataID of the light cookie texture (a cube map for point lights).
scale_half
property
writable
¶
Scale, as raw IEEE half-float bits; used with flag 0x2.
intensity_multiplier_half
property
writable
¶
Intensity multiplier, as raw IEEE half-float bits; 0 is corrected to 1 by the client.
MaterialFlags
¶
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. |
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.
texture1
property
writable
¶
First texture: MOTX offset or FileDataID.
texture2
property
writable
¶
Second texture: MOTX offset or FileDataID.
texture3
property
writable
¶
Third texture: MOTX offset or FileDataID.
color2
property
writable
¶
Extra color slot (a texture FileDataID for shader 23).
flags2
property
writable
¶
Extra flags slot (a texture FileDataID for shader 23).
run_time_data
property
writable
¶
Nulled on load; shader-23 texture FileDataIDs.
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.
name_offset
property
writable
¶
Byte offset of the group name in MOGN, -1 for no name.
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.