M2 records¶
The decoded data records an M2 body is made of — animation sequences and
tracks (both timeline eras), bones, colors, textures and their transforms,
attachments, events, lights, cameras, ribbon and particle emitters, the
skin-profile tables and the .skel chunk payloads. Records are concrete
per-version classes (M2CompBoneWotlk, M2SequenceCata, …): construct the
one matching your model's version directly.
To keep the reference readable, each record family documents once, the way
wowdev.wiki lists a versioned struct: one merged member walk under the generic
⟨version⟩ name. A member carries an expansion-range badge when it does
not exist across the family's whole range; a member whose layout changed
appears once per era, each entry badged with the clients it covers — a
badge-less member is identical in every version. Wire integer fields show
their on-disk width (Annotated[int, uint16]), generated from the C++
sources.
The animation-track types — M2Track, FBlock, M2SplineKey and
M2PartTrack — are templates over a value type, so they document once as
Base⟨value⟩, their value member shown generically. A record that uses one
refers to it as M2Track[C4Quaternion], both parts linking through to their
own documentation.
Body records¶
The records the MD20 body's vectors are made of, from
wowlib.formats.m2.root.record: tracks and timestamps, sequences, bones,
materials, scene objects (attachments, events, lights, cameras) and the
emitters.
M2EventTrack⟨version⟩¶
A timestamp-only event track (every key fires). Abstract over the client version; construct a concrete version with M2EventTrack.ForVersion / for_version.
interpolation_type
property
writable
¶
Interpolation: 0 none, 1 linear (keys fire, no value to interpolate).
global_sequence
property
writable
¶
The global sequence driving this track; -1: none.
interpolation_ranges
property
writable
¶
interpolation_ranges: list[M2Range]
Per-sequence [first, last] key-index ranges into the global timeline.
timestamps
property
writable
¶
The global timeline's trigger timestamps.
timestamps
property
writable
¶
Trigger timestamps, one array per sequence (an external sequence keeps its arrays in the .anim file).
M2Range
¶
M2Loop
¶
A global-loop entry: the timestamp a global sequence wraps at.
timestamp
property
writable
¶
The timestamp the global sequence wraps at.
M2CompQuat
¶
A quaternion compressed to i16 x, y, z, w (TBC+ bone rotations); decompress as (v < 0 ? v + 32768 : v - 32767) / 32767.
M2Box
¶
M2CompBone⟨version⟩¶
One skeleton bone. Abstract over the client version; construct a concrete version with M2CompBone.ForVersion / for_version.
translation
property
writable
¶
Translation keyframes, relative to the parent bone.
translation
property
writable
¶
Translation keyframes, relative to the parent bone.
rotation
property
writable
¶
rotation: M2Track[M2CompQuat]
Rotation keyframes as compressed quaternions.
rotation
property
writable
¶
rotation: M2Track[M2CompQuat]
Rotation keyframes as compressed quaternions.
BoneFlags
¶
Bases: IntFlag
M2CompBone flags: parent-transform exemptions, billboarding and physics participation.
Attributes:
| Name | Description |
|---|---|
IgnoreParentTranslate |
Do not inherit parent translation. |
IgnoreParentScale |
Do not inherit parent scale. |
IgnoreParentRotation |
Do not inherit parent rotation. |
SphericalBillboard |
Always face the viewer. |
CylindricalBillboardLockX |
Billboard around the X axis. |
CylindricalBillboardLockY |
Billboard around the Y axis. |
CylindricalBillboardLockZ |
Billboard around the Z axis. |
Transformed |
Has an animated transform. |
KinematicBone |
MoP+: physics may drive this bone. |
HelmetAnimScaled |
Scale by the helmet-anim-scaling record. |
SequenceId |
BfA+: parent_bone/submesh_id form a sequence id. |
M2Ribbon⟨version⟩¶
One ribbon emitter. Abstract over the client version; construct a concrete version with M2Ribbon.ForVersion / for_version.
height_below
property
writable
¶
height_below: M2Track[float]
Ribbon width below the bone origin; do not set equal to height_above.
height_below
property
writable
¶
height_below: M2Track[float]
Ribbon width below the bone origin; do not set equal to height_above.
ribbon_color_index
property
writable
¶
ParticleColor.dbc replacement-color index (WotLK+).
texture_transform_lookup_index
property
writable
¶
Index into the texture-transform combos, applied only under global flag 0x20000 (WotLK+).
M2Particle⟨version⟩¶
One particle emitter. Abstract over the client version; construct a concrete version with M2Particle.ForVersion / for_version.
geometry_model_filename
property
writable
¶
Spawns model particles when set.
recursion_model_filename
property
writable
¶
Child emitters come from this model.
particle_color_index
property
writable
¶
ParticleColor.dbc row selector (0/11/12/13).
particle_type
property
writable
¶
Render type; in practice implied by flags and model.
speed_variation
property
writable
¶
speed_variation: M2Track[float]
Random emission-speed variation (0..1).
speed_variation
property
writable
¶
speed_variation: M2Track[float]
Random emission-speed variation (0..1).
vertical_range
property
writable
¶
vertical_range: M2Track[float]
Max polar angle (0..pi): of the initial velocity for plane, of the position for sphere emitters.
vertical_range
property
writable
¶
vertical_range: M2Track[float]
Max polar angle (0..pi): of the initial velocity for plane, of the position for sphere emitters.
horizontal_range
property
writable
¶
horizontal_range: M2Track[float]
Max azimuth angle (0..2*pi): of the initial velocity for plane, of the position for sphere emitters.
horizontal_range
property
writable
¶
horizontal_range: M2Track[float]
Max azimuth angle (0..2*pi): of the initial velocity for plane, of the position for sphere emitters.
gravity
property
writable
¶
gravity: M2Track[float]
Gravity; a compressed direction vector under the CompressedGravity flag.
gravity
property
writable
¶
gravity: M2Track[float]
Gravity; a compressed direction vector under the CompressedGravity flag.
lifespan_variation
property
writable
¶
- lifespan_variation * random(-1, 1).
emission_rate_variation
property
writable
¶
- emission_rate_variation * random(-1, 1), rerolled per update.
emission_area_width
property
writable
¶
emission_area_width: M2Track[float]
Plane: emission area width; sphere: max radius.
emission_area_width
property
writable
¶
emission_area_width: M2Track[float]
Plane: emission area width; sphere: max radius.
emission_area_length
property
writable
¶
emission_area_length: M2Track[float]
Plane: emission area length; sphere: min radius.
emission_area_length
property
writable
¶
emission_area_length: M2Track[float]
Plane: emission area length; sphere: min radius.
z_source
property
writable
¶
z_source: M2Track[float]
If > 0, initial velocity points from (0, 0, z_source) to the spawn point.
z_source
property
writable
¶
z_source: M2Track[float]
If > 0, initial velocity points from (0, 0, z_source) to the spawn point.
lifespan_uv_anim
property
writable
¶
Head flipbook cells, first half of life (start/middle/end).
decay_uv_anim
property
writable
¶
Head flipbook cells, second half of life (start/middle/end).
alpha_track
property
writable
¶
Opacity ramp: 0 transparent .. 0x7FFF opaque.
tail_uv_anim
property
writable
¶
Tail flipbook cells, first half of life (start/end).
tail_decay_uv_anim
property
writable
¶
Tail flipbook cells, second half of life (start/end).
twinkle_percent
property
writable
¶
Fraction of the time visible (1.0 = always).
inherit_velocity_scale
property
writable
¶
Scales velocity inherited from the parent particle.
spin_speed_variation
property
writable
¶
Random variation of spin_speed.
follow_speed1
property
writable
¶
Emitter-follow ramp: at this emitter speed particles follow by follow_scale1.
follow_scale1
property
writable
¶
Fraction of emitter motion applied at follow_speed1.
follow_scale2
property
writable
¶
Fraction of emitter motion applied at follow_speed2.
multi_tex_scroll_range
property
writable
¶
multi_tex_scroll_range: list[M2Vec2FP69]
Per extra layer.
M2Vec2FP69
¶
M2Color⟨version⟩¶
One color + alpha animation pair. Abstract over the client version; construct a concrete version with M2Color.ForVersion / for_version.
M2TextureWeight⟨version⟩¶
One texture weight (transparency) track. Abstract over the client version; construct a concrete version with M2TextureWeight.ForVersion / for_version.
weight
property
writable
¶
0 transparent .. 0x7FFF opaque; multiplies the color block's alpha.
weight
property
writable
¶
0 transparent .. 0x7FFF opaque; multiplies the color block's alpha.
M2TextureFlipbook⟨version⟩¶
One texture flipbook animation. Abstract over the client version; construct a concrete version with M2TextureFlipbook.ForVersion / for_version.
M2TextureTransform⟨version⟩¶
One texture UV transform animation. Abstract over the client version; construct a concrete version with M2TextureTransform.ForVersion / for_version.
rotation
property
writable
¶
rotation: M2Track[C4Quaternion]
UV rotation keyframes, pivoting at the texture center.
rotation
property
writable
¶
rotation: M2Track[C4Quaternion]
UV rotation keyframes, pivoting at the texture center.
M2Vertex
¶
An M2 vertex: position, 4-bone weights/indices, normal and two texture coordinate sets.
bone_weights
property
writable
¶
Influence weights of the four bones; they sum to 255.
MaterialFlags
¶
Bases: IntFlag
M2Material render flags.
Attributes:
| Name | Description |
|---|---|
Unlit |
No lighting. |
Unfogged |
No fog. |
TwoSided |
No backface culling. |
DepthTest |
Depth test enabled. |
DepthWrite |
Depth write enabled. |
NoCustomAlpha |
MoP+: force fully opaque/transparent for custom elements. |
M2Material
¶
M2Material(flags: MaterialFlags | None = ..., blending_mode: int = 0)
An M2 material: render flags (see MaterialFlags) and the blending mode (see M2/Rendering M2BLEND).
M2Texture
¶
A texture definition: type 0 references the filename (TXID FileDataIDs replace it in 8.0+); non-zero types are runtime component slots (skin, hair, monster skins, ...).
M2Attachment⟨version⟩¶
One attachment point. Abstract over the client version; construct a concrete version with M2Attachment.ForVersion / for_version.
id
property
writable
¶
Attachment slot (see wowdev's attachment id table).
unknown
property
writable
¶
Unknown; almost always 0 (vanilla's BogBeast.m2 carries values here).
animate_attached
property
writable
¶
animate_attached: M2Track[int]
Bool track: animate the attached model.
animate_attached
property
writable
¶
animate_attached: M2Track[int]
Bool track: animate the attached model.
M2Event⟨version⟩¶
One timed event. Abstract over the client version; construct a concrete version with M2Event.ForVersion / for_version.
identifier
property
writable
¶
Usually a '$xxx' four-char tag stored raw.
enabled
property
writable
¶
enabled: M2EventTrack⟨version⟩
Timestamp-only track: each key fires the event.
enabled
property
writable
¶
enabled: M2EventTrack⟨version⟩
Timestamp-only track: each key fires the event.
M2Light⟨version⟩¶
One placed light. Abstract over the client version; construct a concrete version with M2Light.ForVersion / for_version.
ambient_intensity
property
writable
¶
ambient_intensity: M2Track[float]
Multiplies the ambient color; defaults to 1.0.
ambient_intensity
property
writable
¶
ambient_intensity: M2Track[float]
Multiplies the ambient color; defaults to 1.0.
diffuse_intensity
property
writable
¶
diffuse_intensity: M2Track[float]
Multiplies the diffuse color; defaults to 1.0.
diffuse_intensity
property
writable
¶
diffuse_intensity: M2Track[float]
Multiplies the diffuse color; defaults to 1.0.
attenuation_start
property
writable
¶
attenuation_start: M2Track[float]
Distance where attenuation begins.
attenuation_start
property
writable
¶
attenuation_start: M2Track[float]
Distance where attenuation begins.
attenuation_end
property
writable
¶
attenuation_end: M2Track[float]
Distance where the light fades out entirely.
attenuation_end
property
writable
¶
attenuation_end: M2Track[float]
Distance where the light fades out entirely.
M2Camera⟨version⟩¶
One model camera. Abstract over the client version; construct a concrete version with M2Camera.ForVersion / for_version.
positions
property
writable
¶
positions: M2Track[M2SplineKey[C3Vector]]
Spline track moving the camera, one spline per segment.
positions
property
writable
¶
positions: M2Track[M2SplineKey[C3Vector]]
Spline track moving the camera, one spline per segment.
position_base
property
writable
¶
position_base: C3Vector
Pivot point the position splines are relative to.
target_position
property
writable
¶
target_position: M2Track[M2SplineKey[C3Vector]]
Spline track moving the look-at target, one spline per segment.
target_position
property
writable
¶
target_position: M2Track[M2SplineKey[C3Vector]]
Spline track moving the look-at target, one spline per segment.
target_position_base
property
writable
¶
target_position_base: C3Vector
Pivot point the target splines are relative to.
M2Sequence⟨version⟩¶
One animation sequence entry. Abstract over the client version; construct a concrete version with M2Sequence.ForVersion / for_version.
frequency
property
writable
¶
Playback probability weight (sums to 0x7FFF per id).
SequenceFlags
¶
Bases: IntFlag
M2Sequence flags — the 0x20/0x40/0x130 combination decides where the sequence's track data lives (.m2 vs .anim file).
Attributes:
| Name | Description |
|---|---|
SetsRuntimeBlend |
Sets 0x80 when loaded (M2Init). |
TiltIn |
Model tilts over X/Y by the end of the animation. |
TiltOut |
Model starts tilted and returns upright. |
TiltFixed |
Model stays tilted for the whole animation. |
LoadedLowPriority |
Set at runtime for loaded low-priority sequences. |
DataInM2 |
Primary bone sequence: track data is in the .m2 itself, not an .anim file. |
Alias |
The sequence is an alias: follow alias_next until an entry without this flag owns the data. |
Blended |
Blend (lerp) into/out of this sequence. |
StoredInModel |
Sequence stored in the model (0x100). |
SplitBlendTimes |
blend_time is the in/out pair, not one u32. |
Legion0x800 |
Seen in Legion 24500 models. |
M2SequenceFallback
¶
A pre-WotLK playable-animation fallback: the substitute animation id plus how to play it (0 normal, 1 backwards, 2 frame-by-frame, 3 freeze).
M2Track⟨value⟩¶
An animation track, WotLK+ layout: one timestamp/value array per sequence; an external sequence keeps its arrays in the .anim file.
A template over the value type; the value member(s) below hold ⟨value⟩. Referenced as e.g. M2Track[C4Quaternion].
interpolation_type
property
writable
¶
Interpolation: 0 none, 1 linear, 2 bezier, 3 hermite (spline types only valid for spline-key tracks).
global_sequence
property
writable
¶
The global sequence driving this track; -1: none.
interpolation_ranges
property
writable
¶
interpolation_ranges: list[M2Range]
Per-sequence [first, last] key-index ranges into the global timeline.
timestamps
property
writable
¶
The global timeline's keyframe timestamps.
timestamps
property
writable
¶
Keyframe timestamps, one array per sequence (an external sequence keeps its arrays in the .anim file).
values
property
writable
¶
Keyframe values, per sequence, parallel to timestamps.
M2SplineKey⟨value⟩¶
A spline keyframe: the value plus incoming/outgoing tangents (bezier/hermite camera tracks).
A template over the value type; the value member(s) below hold ⟨value⟩. Referenced as e.g. M2SplineKey[C4Quaternion].
FBlock⟨value⟩¶
The header-less 'fake' animation block: sequence-independent u16 timestamps plus keys (WotLK+ particle ramps).
A template over the value type; the value member(s) below hold ⟨value⟩. Referenced as e.g. FBlock[C4Quaternion].
timestamps
property
writable
¶
Sequence-independent keyframe timestamps.
M2PartTrack⟨value⟩¶
A partial track: normalized fixed16 times plus values (Legion+ EXP2 alpha cutoffs).
A template over the value type; the value member(s) below hold ⟨value⟩. Referenced as e.g. M2PartTrack[C4Quaternion].
Chunked-shell records¶
The Legion+ companion-chunk payload records, from
wowlib.formats.m2.chunked.record: the AFID entries, the extended particle
parameters (EXPT/EXP2), the per-light DETL overrides and the
parent-model override payloads.
AnimFileEntry
¶
An AFID entry: the .anim FileDataID for one (animation, variation) pair; 0 means none.
M2ExtendedParticleSimple
¶
An EXPT record: z-source, color and alpha multipliers for one particle emitter.
z_source
property
writable
¶
If > 0, initial velocity points from (0, 0, z_source) to the spawn point.
M2ExtendedParticle
¶
M2ExtendedParticle(z_source: float = 0.0, color_mult: float = 1.0, alpha_mult: float = 1.0, alpha_cutoff: M2PartTrack[fixed16] | None = ...)
An EXP2 record: the EXPT parameters plus the per-lifetime alpha-cutoff ramp.
z_source
property
writable
¶
If > 0, initial velocity points from (0, 0, z_source) to the spawn point.
alpha_cutoff
property
writable
¶
alpha_cutoff: M2PartTrack[fixed16]
Alpha-test threshold sampled by the particle's lifetime.
M2LightDetail
¶
A DETL record (9.0+): per-light flags, shadow-RT scale and diffuse multiplier (raw half-floats).
diffuse_color_mult_half
property
writable
¶
Multiplier for the light's diffuse color (raw half-float).
Exp2Data
¶
The EXP2 chunk payload: extended particle records, one per particle emitter.
content
property
¶
content: list[M2ExtendedParticle]
Extended particle parameters, one per particle emitter.
read
¶
Deserialize file bytes into this entity, replacing its contents. Offsets resolve against the given buffer; sequence-gated data is read inline.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
bytes
|
the file (or containing-chunk payload) bytes |
required |
write
¶
Serialize this entity in wowlib's canonical layout (an offset format has no byte-perfect round-trip guarantee; a written entity re-reads equal instead).
Returns:
| Type | Description |
|---|---|
bytes
|
the file bytes |
validate
¶
Check the logical integrity contracts this file must satisfy to LOAD in the client — companion-array counts, lookup ranges — which write() deliberately never enforces. Call it before writing when you want to know the result will load. A file read from a client and left unmodified reports no errors; warnings mark states real client files ship.
Returns:
| Type | Description |
|---|---|
ValidationReport
|
every violated contract, in member order |
ensure_valid
¶
Validate and raise on the first error instead of returning a report — the assert-style face of validate().
Returns:
| Type | Description |
|---|---|
None
|
nothing; raises when validate() finds any error |
PabcData
¶
The PABC chunk payload: the parent-model sequence-id blacklist ('BlacklistAnimData').
replacement_parent_sequence_lookups
property
¶
Replacement parent-sequence lookups: a plain list of present AnimationData ids.
read
¶
Deserialize file bytes into this entity, replacing its contents. Offsets resolve against the given buffer; sequence-gated data is read inline.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
bytes
|
the file (or containing-chunk payload) bytes |
required |
write
¶
Serialize this entity in wowlib's canonical layout (an offset format has no byte-perfect round-trip guarantee; a written entity re-reads equal instead).
Returns:
| Type | Description |
|---|---|
bytes
|
the file bytes |
validate
¶
Check the logical integrity contracts this file must satisfy to LOAD in the client — companion-array counts, lookup ranges — which write() deliberately never enforces. Call it before writing when you want to know the result will load. A file read from a client and left unmodified reports no errors; warnings mark states real client files ship.
Returns:
| Type | Description |
|---|---|
ValidationReport
|
every violated contract, in member order |
ensure_valid
¶
Validate and raise on the first error instead of returning a report — the assert-style face of validate().
Returns:
| Type | Description |
|---|---|
None
|
nothing; raises when validate() finds any error |
PsbcData
¶
The PSBC chunk payload: parent sequence bounds.
parent_sequence_bounds
property
¶
parent_sequence_bounds: list[M2Bounds]
Parent sequence bounds, one per parent sequence.
read
¶
Deserialize file bytes into this entity, replacing its contents. Offsets resolve against the given buffer; sequence-gated data is read inline.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
bytes
|
the file (or containing-chunk payload) bytes |
required |
write
¶
Serialize this entity in wowlib's canonical layout (an offset format has no byte-perfect round-trip guarantee; a written entity re-reads equal instead).
Returns:
| Type | Description |
|---|---|
bytes
|
the file bytes |
validate
¶
Check the logical integrity contracts this file must satisfy to LOAD in the client — companion-array counts, lookup ranges — which write() deliberately never enforces. Call it before writing when you want to know the result will load. A file read from a client and left unmodified reports no errors; warnings mark states real client files ship.
Returns:
| Type | Description |
|---|---|
ValidationReport
|
every violated contract, in member order |
ensure_valid
¶
Validate and raise on the first error instead of returning a report — the assert-style face of validate().
Returns:
| Type | Description |
|---|---|
None
|
nothing; raises when validate() finds any error |
Pgd1Data
¶
The PGD1 chunk payload: per-particle-emitter geoset assignments.
geosets
property
¶
The geoset each particle emitter obeys (M2SkinSection geoset rules).
read
¶
Deserialize file bytes into this entity, replacing its contents. Offsets resolve against the given buffer; sequence-gated data is read inline.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
bytes
|
the file (or containing-chunk payload) bytes |
required |
write
¶
Serialize this entity in wowlib's canonical layout (an offset format has no byte-perfect round-trip guarantee; a written entity re-reads equal instead).
Returns:
| Type | Description |
|---|---|
bytes
|
the file bytes |
validate
¶
Check the logical integrity contracts this file must satisfy to LOAD in the client — companion-array counts, lookup ranges — which write() deliberately never enforces. Call it before writing when you want to know the result will load. A file read from a client and left unmodified reports no errors; warnings mark states real client files ship.
Returns:
| Type | Description |
|---|---|
ValidationReport
|
every violated contract, in member order |
ensure_valid
¶
Validate and raise on the first error instead of returning a report — the assert-style face of validate().
Returns:
| Type | Description |
|---|---|
None
|
nothing; raises when validate() finds any error |
Skin records¶
The .skin LOD-view tables, from wowlib.formats.m2.skin (the Skin
entity itself is documented with the other entities): the
skin profile, its submesh sections and the render/shadow batches.
M2SkinSection⟨version⟩¶
One renderable geometry section (submesh). Abstract over the client version; construct a concrete version with M2SkinSection.ForVersion / for_version.
level
property
writable
¶
Extends the 16-bit index_start by (level << 16) — index lists outgrow 64k first; vertex_start stays plain (verified on level=1 client files).
center_bone_index
property
writable
¶
The bone nearest the submesh center; wowdev leaves it otherwise undescribed.
sort_center_position
property
writable
¶
sort_center_position: C3Vector
Center of the submesh bounding box.
M2SkinProfile⟨version⟩¶
One skin profile (a whole LOD's sections and batches). Abstract over the client version; construct a concrete version with M2SkinProfile.ForVersion / for_version.
indices
property
writable
¶
Triangle list into the local vertices.
submeshes
property
writable
¶
submeshes: list[M2SkinSection⟨version⟩]
The submeshes (skin sections).
submeshes
property
writable
¶
submeshes: list[M2SkinSection⟨version⟩]
The submeshes (skin sections).
M2Batch
¶
M2Batch(flags: int = 0, priority_plane: int = 0, shader_id: int = 0, skin_section_index: int = 0, geoset_index: int = 0, color_index: int = 0, material_index: int = 0, material_layer: int = 0, texture_count: int = 0, texture_combo_index: int = 0, texture_coord_combo_index: int = 0, texture_weight_combo_index: int = 0, texture_transform_combo_index: int = 0)
An M2 skin render batch (texture unit): submesh + material + the lookup bases the shaders consume.
flags
property
writable
¶
0x10 static texture, 0x40 transparency quirk, ...
texture_coord_combo_index
property
writable
¶
Into the texture-mapping lookup.
texture_weight_combo_index
property
writable
¶
Into the transparency lookup.
texture_transform_combo_index
property
writable
¶
Into the UV-animation lookup.
M2ShadowBatch
¶
Skeleton chunk payloads¶
The .skel SK*1 chunk payload records, from wowlib.formats.m2 (the
Skeleton entity is documented with the other entities): the
identity header, the sequence/bone/attachment blocks and the parent link.
SkelParentData
¶
SkelHeader⟨version⟩
¶
The SKL1 payload: the skeleton's identity.
padding
property
writable
¶
Unknown trailing bytes; always zero so far.
read
¶
Deserialize file bytes into this entity, replacing its contents. Offsets resolve against the given buffer; sequence-gated data is read inline.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
bytes
|
the file (or containing-chunk payload) bytes |
required |
write
¶
Serialize this entity in wowlib's canonical layout (an offset format has no byte-perfect round-trip guarantee; a written entity re-reads equal instead).
Returns:
| Type | Description |
|---|---|
bytes
|
the file bytes |
validate
¶
Check the logical integrity contracts this file must satisfy to LOAD in the client — companion-array counts, lookup ranges — which write() deliberately never enforces. Call it before writing when you want to know the result will load. A file read from a client and left unmodified reports no errors; warnings mark states real client files ship.
Returns:
| Type | Description |
|---|---|
ValidationReport
|
every violated contract, in member order |
ensure_valid
¶
Validate and raise on the first error instead of returning a report — the assert-style face of validate().
Returns:
| Type | Description |
|---|---|
None
|
nothing; raises when validate() finds any error |
One layout across its whole range (Legion+).
SkelSequences⟨version⟩
¶
The SKS1 payload: the sequence set that moved out of the model.
sequence_lookups
property
¶
Animation-id hash table (see M2Root.sequence_lookups).
padding
property
writable
¶
Unknown trailing bytes; always zero so far.
read
¶
Deserialize file bytes into this entity, replacing its contents. Offsets resolve against the given buffer; sequence-gated data is read inline.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
bytes
|
the file (or containing-chunk payload) bytes |
required |
write
¶
Serialize this entity in wowlib's canonical layout (an offset format has no byte-perfect round-trip guarantee; a written entity re-reads equal instead).
Returns:
| Type | Description |
|---|---|
bytes
|
the file bytes |
validate
¶
Check the logical integrity contracts this file must satisfy to LOAD in the client — companion-array counts, lookup ranges — which write() deliberately never enforces. Call it before writing when you want to know the result will load. A file read from a client and left unmodified reports no errors; warnings mark states real client files ship.
Returns:
| Type | Description |
|---|---|
ValidationReport
|
every violated contract, in member order |
ensure_valid
¶
Validate and raise on the first error instead of returning a report — the assert-style face of validate().
Returns:
| Type | Description |
|---|---|
None
|
nothing; raises when validate() finds any error |
One layout across its whole range (Legion+).
SkelBones⟨version⟩
¶
The SKB1 payload: the bones that moved out of the model (external sequences' track data lives in the .anim AFSB chunks).
key_bone_lookup
property
¶
Key-bone lookup: key bone slot -> bone index, -1 if none.
read
¶
Deserialize file bytes into this entity, replacing its contents. Offsets resolve against the given buffer; sequence-gated data is read inline.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
bytes
|
the file (or containing-chunk payload) bytes |
required |
write
¶
Serialize this entity in wowlib's canonical layout (an offset format has no byte-perfect round-trip guarantee; a written entity re-reads equal instead).
Returns:
| Type | Description |
|---|---|
bytes
|
the file bytes |
validate
¶
Check the logical integrity contracts this file must satisfy to LOAD in the client — companion-array counts, lookup ranges — which write() deliberately never enforces. Call it before writing when you want to know the result will load. A file read from a client and left unmodified reports no errors; warnings mark states real client files ship.
Returns:
| Type | Description |
|---|---|
ValidationReport
|
every violated contract, in member order |
ensure_valid
¶
Validate and raise on the first error instead of returning a report — the assert-style face of validate().
Returns:
| Type | Description |
|---|---|
None
|
nothing; raises when validate() finds any error |
One layout across its whole range (Legion+).
SkelAttachments⟨version⟩
¶
The SKA1 payload: the attachments that moved out of the model (external sequences' track data lives in the .anim AFSA chunks).
attachment_lookup_table
property
¶
Attachment lookup: attachment id -> index.
read
¶
Deserialize file bytes into this entity, replacing its contents. Offsets resolve against the given buffer; sequence-gated data is read inline.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
bytes
|
the file (or containing-chunk payload) bytes |
required |
write
¶
Serialize this entity in wowlib's canonical layout (an offset format has no byte-perfect round-trip guarantee; a written entity re-reads equal instead).
Returns:
| Type | Description |
|---|---|
bytes
|
the file bytes |
validate
¶
Check the logical integrity contracts this file must satisfy to LOAD in the client — companion-array counts, lookup ranges — which write() deliberately never enforces. Call it before writing when you want to know the result will load. A file read from a client and left unmodified reports no errors; warnings mark states real client files ship.
Returns:
| Type | Description |
|---|---|
ValidationReport
|
every violated contract, in member order |
ensure_valid
¶
Validate and raise on the first error instead of returning a report — the assert-style face of validate().
Returns:
| Type | Description |
|---|---|
None
|
nothing; raises when validate() finds any error |
One layout across its whole range (Legion+).