Skip to content

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_type: int

Interpolation: 0 none, 1 linear (keys fire, no value to interpolate).

global_sequence property writable

global_sequence: int

The global sequence driving this track; -1: none.

interpolation_ranges property writable VanillaTBC

interpolation_ranges: list[M2Range]

Per-sequence [first, last] key-index ranges into the global timeline.

timestamps property writable VanillaTBC

timestamps: list[Annotated[int, uint32]]

The global timeline's trigger timestamps.

timestamps property writable WotLK

timestamps: list[list[Annotated[int, uint32]]]

Trigger timestamps, one array per sequence (an external sequence keeps its arrays in the .anim file).

M2Range

M2Range()
M2Range(minimum: int = 0, maximum: int = 0)

An inclusive u32 range: pre-WotLK track interpolation ranges, sequence replay bounds.

minimum property writable

minimum: Annotated[int, uint32]

The inclusive lower bound.

maximum property writable

maximum: Annotated[int, uint32]

The inclusive upper bound.

M2Bounds

M2Bounds()
M2Bounds(extent: CAaBox | None = ..., radius: float = 0.0)

A bounding volume: axis-aligned extent plus sphere radius.

extent property writable

extent: CAaBox

The axis-aligned extent.

radius property writable

radius: float

The bounding-sphere radius.

M2Loop

M2Loop()
M2Loop(timestamp: int = 0)

A global-loop entry: the timestamp a global sequence wraps at.

timestamp property writable

timestamp: Annotated[int, uint32]

The timestamp the global sequence wraps at.

M2CompQuat

M2CompQuat()
M2CompQuat(x: int = 32767, y: int = 32767, z: int = 32767, w: int = -1)

A quaternion compressed to i16 x, y, z, w (TBC+ bone rotations); decompress as (v < 0 ? v + 32768 : v - 32767) / 32767.

x property writable

x: Annotated[int, int16]

The compressed x component.

y property writable

y: Annotated[int, int16]

The compressed y component.

z property writable

z: Annotated[int, int16]

The compressed z component.

w property writable

w: Annotated[int, int16]

The compressed w component (identity stores 65535).

M2Box

M2Box()
M2Box(minimum: C3Vector | None = ..., maximum: C3Vector | None = ...)

A model-space box: minimum and maximum corner vectors.

minimum property writable

minimum: C3Vector

The minimum corner.

maximum property writable

maximum: C3Vector

The maximum corner.

M2CompBone⟨version⟩

One skeleton bone. Abstract over the client version; construct a concrete version with M2CompBone.ForVersion / for_version.

key_bone_id property writable

key_bone_id: int

Key-bone-lookup back reference, -1 if none.

flags property writable

flags: BoneFlags

See BoneFlags.

parent_bone property writable

parent_bone: int

Parent bone index, -1 for roots.

submesh_id property writable

submesh_id: int

Mesh part id.

bone_name_crc property writable TBC

bone_name_crc: int

CRC of the authoring bone name (debug only).

translation property writable VanillaTBC

translation: M2Track[C3Vector]

Translation keyframes, relative to the parent bone.

translation property writable WotLK

translation: M2Track[C3Vector]

Translation keyframes, relative to the parent bone.

rotation property writable Vanilla

rotation: M2Track[C4Quaternion]

Rotation keyframes as raw quaternions.

rotation property writable TBC

rotation: M2Track[M2CompQuat]

Rotation keyframes as compressed quaternions.

rotation property writable WotLK

rotation: M2Track[M2CompQuat]

Rotation keyframes as compressed quaternions.

scale property writable VanillaTBC

scale: M2Track[C3Vector]

Scale keyframes.

scale property writable WotLK

scale: M2Track[C3Vector]

Scale keyframes.

pivot property writable

pivot: C3Vector

The bone's pivot point.

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.

IgnoreParentTranslate class-attribute instance-attribute

IgnoreParentTranslate = 1

IgnoreParentScale class-attribute instance-attribute

IgnoreParentScale = 2

IgnoreParentRotation class-attribute instance-attribute

IgnoreParentRotation = 4

SphericalBillboard class-attribute instance-attribute

SphericalBillboard = 8

CylindricalBillboardLockX class-attribute instance-attribute

CylindricalBillboardLockX = 16

CylindricalBillboardLockY class-attribute instance-attribute

CylindricalBillboardLockY = 32

CylindricalBillboardLockZ class-attribute instance-attribute

CylindricalBillboardLockZ = 64

Transformed class-attribute instance-attribute

Transformed = 512

KinematicBone class-attribute instance-attribute

KinematicBone = 1024

HelmetAnimScaled class-attribute instance-attribute

HelmetAnimScaled = 4096

SequenceId class-attribute instance-attribute

SequenceId = 8192

M2Ribbon⟨version⟩

One ribbon emitter. Abstract over the client version; construct a concrete version with M2Ribbon.ForVersion / for_version.

ribbon_id property writable

ribbon_id: int

Always -1 in known files.

bone_index property writable

bone_index: int

The bone the ribbon trails from.

position property writable

position: C3Vector

Relative to that bone.

texture_indices property writable

texture_indices: list[int]

Into the model's textures.

material_indices property writable

material_indices: list[int]

Into the model's materials.

color property writable VanillaTBC

color: M2Track[C3Vector]

RGB multiplier for the material.

color property writable WotLK

color: M2Track[C3Vector]

RGB multiplier for the material.

alpha property writable VanillaTBC

alpha: M2Track[fixed16]

0 transparent .. 0x7FFF opaque.

alpha property writable WotLK

alpha: M2Track[fixed16]

0 transparent .. 0x7FFF opaque.

height_above property writable VanillaTBC

height_above: M2Track[float]

Ribbon width above the bone origin.

height_above property writable WotLK

height_above: M2Track[float]

Ribbon width above the bone origin.

height_below property writable VanillaTBC

height_below: M2Track[float]

Ribbon width below the bone origin; do not set equal to height_above.

height_below property writable WotLK

height_below: M2Track[float]

Ribbon width below the bone origin; do not set equal to height_above.

edges_per_second property writable

edges_per_second: float

Quad emission rate.

edge_lifetime property writable

edge_lifetime: float

Seconds a quad stays around.

gravity property writable

gravity: float

Sinks/rises the ribbon over time.

texture_rows property writable

texture_rows: int

Flipbook tiling.

texture_cols property writable

texture_cols: int

Flipbook tiling.

tex_slot property writable VanillaTBC

tex_slot: M2Track[int]

Animated flipbook cell index.

tex_slot property writable WotLK

tex_slot: M2Track[int]

Animated flipbook cell index.

visibility property writable VanillaTBC

visibility: M2Track[int]

Bool track: ribbon visible.

visibility property writable WotLK

visibility: M2Track[int]

Bool track: ribbon visible.

priority_plane property writable

priority_plane: int

Render priority plane (WotLK+).

ribbon_color_index property writable

ribbon_color_index: int

ParticleColor.dbc replacement-color index (WotLK+).

texture_transform_lookup_index property writable

texture_transform_lookup_index: int

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.

particle_id property writable

particle_id: int

Always -1 in known files.

flags property writable

flags: Annotated[int, uint32]

See wowdev's particle flag table.

position property writable

position: C3Vector

Relative to the bone.

bone_id property writable

bone_id: int

The bone the emitter attaches to.

texture_id property writable

texture_id: int

3x5-bit texture ids under the MultiTexture flag.

geometry_model_filename property writable

geometry_model_filename: str

Spawns model particles when set.

recursion_model_filename property writable

recursion_model_filename: str

Child emitters come from this model.

blending_type property writable

blending_type: int

Blend mode; see wowdev's blending-type table.

emitter_type property writable

emitter_type: int

1 plane, 2 sphere, 3 spline, 4 bone.

particle_color_index property writable TBC

particle_color_index: int

ParticleColor.dbc row selector (0/11/12/13).

particle_type property writable VanillaWotLK

particle_type: int

Render type; in practice implied by flags and model.

head_or_tail property writable VanillaWotLK

head_or_tail: int

0 head, 1 tail, 2 both.

multi_tex_scale property writable Cata

multi_tex_scale: list[int]

2.5 fixed-point per extra layer.

priority_plane property writable

priority_plane: int

Render priority plane.

rows property writable

rows: Annotated[int, uint16]

Flipbook tiling.

columns property writable

columns: Annotated[int, uint16]

Flipbook tiling.

emission_speed property writable VanillaTBC

emission_speed: M2Track[float]

Base emission velocity.

emission_speed property writable WotLK

emission_speed: M2Track[float]

Base emission velocity.

speed_variation property writable VanillaTBC

speed_variation: M2Track[float]

Random emission-speed variation (0..1).

speed_variation property writable WotLK

speed_variation: M2Track[float]

Random emission-speed variation (0..1).

vertical_range property writable VanillaTBC

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 WotLK

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 VanillaTBC

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 WotLK

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 VanillaTBC

gravity: M2Track[float]

Gravity; a compressed direction vector under the CompressedGravity flag.

gravity property writable WotLK

gravity: M2Track[float]

Gravity; a compressed direction vector under the CompressedGravity flag.

lifespan property writable VanillaTBC

lifespan: M2Track[float]

Seconds each particle stays alive.

lifespan property writable WotLK

lifespan: M2Track[float]

Seconds each particle stays alive.

lifespan_variation property writable WotLK

lifespan_variation: float
  • lifespan_variation * random(-1, 1).

emission_rate property writable VanillaTBC

emission_rate: M2Track[float]

Particles emitted per second.

emission_rate property writable WotLK

emission_rate: M2Track[float]

Particles emitted per second.

emission_rate_variation property writable WotLK

emission_rate_variation: float
  • emission_rate_variation * random(-1, 1), rerolled per update.

emission_area_width property writable VanillaTBC

emission_area_width: M2Track[float]

Plane: emission area width; sphere: max radius.

emission_area_width property writable WotLK

emission_area_width: M2Track[float]

Plane: emission area width; sphere: max radius.

emission_area_length property writable VanillaTBC

emission_area_length: M2Track[float]

Plane: emission area length; sphere: min radius.

emission_area_length property writable WotLK

emission_area_length: M2Track[float]

Plane: emission area length; sphere: min radius.

z_source property writable VanillaTBC

z_source: M2Track[float]

If > 0, initial velocity points from (0, 0, z_source) to the spawn point.

z_source property writable WotLK

z_source: M2Track[float]

If > 0, initial velocity points from (0, 0, z_source) to the spawn point.

mid_point property writable VanillaTBC

mid_point: float

Parametric middle of the lifespan.

color_values property writable VanillaTBC

color_values: list[CImVector]

Start/middle/end BGRA multiply.

scale_values property writable VanillaTBC

scale_values: list[float]

Start/middle/end scale.

lifespan_uv_anim property writable VanillaTBC

lifespan_uv_anim: list[int]

Head flipbook cells, first half of life (start/middle/end).

decay_uv_anim property writable VanillaTBC

decay_uv_anim: list[int]

Head flipbook cells, second half of life (start/middle/end).

color_track property writable WotLK

color_track: FBlock[C3Vector]

Usually 3 keys: start/middle/end.

alpha_track property writable WotLK

alpha_track: FBlock[fixed16]

Opacity ramp: 0 transparent .. 0x7FFF opaque.

scale_track property writable WotLK

scale_track: FBlock[C2Vector]

Particle size ramp.

scale_vary property writable WotLK

scale_vary: C2Vector

Random per-particle scale variation.

head_uv_anim property writable WotLK

head_uv_anim: FBlock[int]

Head flipbook cell ramp.

tail_uv_anim property writable VanillaTBC

tail_uv_anim: list[int]

Tail flipbook cells, first half of life (start/end).

tail_uv_anim property writable WotLK

tail_uv_anim: FBlock[int]

Tail flipbook cell ramp.

tail_decay_uv_anim property writable VanillaTBC

tail_decay_uv_anim: list[int]

Tail flipbook cells, second half of life (start/end).

tail_length property writable

tail_length: float

Multiplier to the computed tail length.

twinkle_speed property writable

twinkle_speed: float

Blinking speed.

twinkle_percent property writable

twinkle_percent: float

Fraction of the time visible (1.0 = always).

twinkle_scale property writable

twinkle_scale: CRange

Min/max random scale variation.

inherit_velocity_scale property writable

inherit_velocity_scale: float

Scales velocity inherited from the parent particle.

drag property writable

drag: float

Speed is multiplied by exp(-drag * t).

spin property writable VanillaTBC

spin: float

1.0 = one full turn over the lifetime.

base_spin property writable WotLK

base_spin: float

Initial quad rotation.

base_spin_variation property writable WotLK

base_spin_variation: float

Random variation of base_spin.

spin_speed property writable WotLK

spin_speed: float

Quad rotation per second.

spin_speed_variation property writable WotLK

spin_speed_variation: float

Random variation of spin_speed.

tumble property writable

tumble: M2Box

Angular velocity bounds (model particles).

wind_vector property writable

wind_vector: C3Vector

Static wind, unless DynamicWind flag.

wind_time property writable

wind_time: float

Undocumented; paired with the static wind vector.

follow_speed1 property writable

follow_speed1: float

Emitter-follow ramp: at this emitter speed particles follow by follow_scale1.

follow_scale1 property writable

follow_scale1: float

Fraction of emitter motion applied at follow_speed1.

follow_speed2 property writable

follow_speed2: float

Second point of the emitter-follow ramp.

follow_scale2 property writable

follow_scale2: float

Fraction of emitter motion applied at follow_speed2.

spline_points property writable

spline_points: list[C3Vector]

Spline emitter path.

enabled_in property writable VanillaTBC

enabled_in: M2Track[int]

Bool track: emitter active.

enabled_in property writable WotLK

enabled_in: M2Track[int]

Bool track: emitter active.

multi_tex_scroll_mid property writable Cata

multi_tex_scroll_mid: list[M2Vec2FP69]

Per extra layer.

multi_tex_scroll_range property writable Cata

multi_tex_scroll_range: list[M2Vec2FP69]

Per extra layer.

M2Vec2FP69

M2Vec2FP69()
M2Vec2FP69(x: int = 0, y: int = 0)

A 2D vector of 6.9 fixed-point values (raw u16 storage).

x property writable

x: Annotated[int, uint16]

Raw 6.9 fixed-point x component.

y property writable

y: Annotated[int, uint16]

Raw 6.9 fixed-point y component.

M2Color⟨version⟩

One color + alpha animation pair. Abstract over the client version; construct a concrete version with M2Color.ForVersion / for_version.

color property writable VanillaTBC

color: M2Track[C3Vector]

RGB vertex color.

color property writable WotLK

color: M2Track[C3Vector]

RGB vertex color.

alpha property writable VanillaTBC

alpha: M2Track[fixed16]

0 transparent .. 0x7FFF opaque.

alpha property writable WotLK

alpha: M2Track[fixed16]

0 transparent .. 0x7FFF opaque.

M2TextureWeight⟨version⟩

One texture weight (transparency) track. Abstract over the client version; construct a concrete version with M2TextureWeight.ForVersion / for_version.

weight property writable VanillaTBC

weight: M2Track[fixed16]

0 transparent .. 0x7FFF opaque; multiplies the color block's alpha.

weight property writable WotLK

weight: M2Track[fixed16]

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.

frames property writable VanillaTBC

frames: M2Track[int]

Frame index keyframes.

frames property writable WotLK

frames: M2Track[int]

Frame index keyframes.

M2TextureTransform⟨version⟩

One texture UV transform animation. Abstract over the client version; construct a concrete version with M2TextureTransform.ForVersion / for_version.

translation property writable VanillaTBC

translation: M2Track[C3Vector]

UV translation keyframes.

translation property writable WotLK

translation: M2Track[C3Vector]

UV translation keyframes.

rotation property writable VanillaTBC

rotation: M2Track[C4Quaternion]

UV rotation keyframes, pivoting at the texture center.

rotation property writable WotLK

rotation: M2Track[C4Quaternion]

UV rotation keyframes, pivoting at the texture center.

scaling property writable VanillaTBC

scaling: M2Track[C3Vector]

UV scaling keyframes.

scaling property writable WotLK

scaling: M2Track[C3Vector]

UV scaling keyframes.

M2Vertex

M2Vertex()
M2Vertex(pos: C3Vector | None = ..., bone_weights: list[int] | None = ..., bone_indices: list[int] | None = ..., normal: C3Vector | None = ..., tex_coords: list[C2Vector] | None = ...)

An M2 vertex: position, 4-bone weights/indices, normal and two texture coordinate sets.

pos property writable

pos: C3Vector

Position in model space.

bone_weights property writable

bone_weights: list[int]

Influence weights of the four bones; they sum to 255.

bone_indices property writable

bone_indices: list[int]

The four influencing bone indices.

normal property writable

normal: C3Vector

Normal in model space.

tex_coords property writable

tex_coords: list[C2Vector]

Two UV sets; the shader picks which are used.

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.

Unlit class-attribute instance-attribute

Unlit = 1

Unfogged class-attribute instance-attribute

Unfogged = 2

TwoSided class-attribute instance-attribute

TwoSided = 4

DepthTest class-attribute instance-attribute

DepthTest = 8

DepthWrite class-attribute instance-attribute

DepthWrite = 16

NoCustomAlpha class-attribute instance-attribute

NoCustomAlpha = 2048

M2Material

M2Material()
M2Material(flags: MaterialFlags | None = ..., blending_mode: int = 0)

An M2 material: render flags (see MaterialFlags) and the blending mode (see M2/Rendering M2BLEND).

flags property writable

See MaterialFlags.

blending_mode property writable

blending_mode: int

M2BLEND blending mode (see M2/Rendering).

M2Texture

M2Texture()
M2Texture(type: int, flags: int, filename: str)

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

type property writable

type: Annotated[int, uint32]

0 = filename-referenced, else a component slot.

flags property writable

flags: Annotated[int, uint32]

0x1 wrap X, 0x2 wrap Y.

filename property writable

filename: str

For type 0; the serializer writes the NUL inside the count.

M2Attachment⟨version⟩

One attachment point. Abstract over the client version; construct a concrete version with M2Attachment.ForVersion / for_version.

id property writable

id: Annotated[int, uint32]

Attachment slot (see wowdev's attachment id table).

bone property writable

bone: Annotated[int, uint16]

The bone the point follows.

unknown property writable

unknown: Annotated[int, uint16]

Unknown; almost always 0 (vanilla's BogBeast.m2 carries values here).

position property writable

position: C3Vector

Relative to the bone, typically its pivot.

animate_attached property writable VanillaTBC

animate_attached: M2Track[int]

Bool track: animate the attached model.

animate_attached property writable WotLK

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

identifier: Annotated[int, uint32]

Usually a '$xxx' four-char tag stored raw.

data property writable

data: Annotated[int, uint32]

Payload passed on fire (sound entry id, ...).

bone property writable

bone: Annotated[int, uint32]

The bone the event hangs off.

position property writable

position: C3Vector

Relative to the bone.

enabled property writable VanillaTBC

Timestamp-only track: each key fires the event.

enabled property writable WotLK

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.

type property writable

type: Annotated[int, uint16]

0 directional, 1 point.

bone property writable

bone: Annotated[int, int16]

Bone to attach to, -1 for none.

position property writable

position: C3Vector

Relative to the bone, if any.

ambient_color property writable VanillaTBC

ambient_color: M2Track[C3Vector]

RGB ambient color (no alpha).

ambient_color property writable WotLK

ambient_color: M2Track[C3Vector]

RGB ambient color (no alpha).

ambient_intensity property writable VanillaTBC

ambient_intensity: M2Track[float]

Multiplies the ambient color; defaults to 1.0.

ambient_intensity property writable WotLK

ambient_intensity: M2Track[float]

Multiplies the ambient color; defaults to 1.0.

diffuse_color property writable VanillaTBC

diffuse_color: M2Track[C3Vector]

RGB diffuse color (no alpha).

diffuse_color property writable WotLK

diffuse_color: M2Track[C3Vector]

RGB diffuse color (no alpha).

diffuse_intensity property writable VanillaTBC

diffuse_intensity: M2Track[float]

Multiplies the diffuse color; defaults to 1.0.

diffuse_intensity property writable WotLK

diffuse_intensity: M2Track[float]

Multiplies the diffuse color; defaults to 1.0.

attenuation_start property writable VanillaTBC

attenuation_start: M2Track[float]

Distance where attenuation begins.

attenuation_start property writable WotLK

attenuation_start: M2Track[float]

Distance where attenuation begins.

attenuation_end property writable VanillaTBC

attenuation_end: M2Track[float]

Distance where the light fades out entirely.

attenuation_end property writable WotLK

attenuation_end: M2Track[float]

Distance where the light fades out entirely.

visibility property writable VanillaTBC

visibility: M2Track[int]

Bool track: the light is enabled.

visibility property writable WotLK

visibility: M2Track[int]

Bool track: the light is enabled.

M2Camera⟨version⟩

One model camera. Abstract over the client version; construct a concrete version with M2Camera.ForVersion / for_version.

type property writable

type: Annotated[int, uint32]

0 portrait, 1 character info, -1 flyby.

far_clip property writable

far_clip: float

Far clip distance.

near_clip property writable

near_clip: float

Near clip distance.

positions property writable VanillaTBC

Spline track moving the camera, one spline per segment.

positions property writable WotLK

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 VanillaTBC

target_position: M2Track[M2SplineKey[C3Vector]]

Spline track moving the look-at target, one spline per segment.

target_position property writable WotLK

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.

roll property writable VanillaTBC

roll: M2Track[M2SplineKey[float]]

0 .. 2*pi.

roll property writable WotLK

roll: M2Track[M2SplineKey[float]]

0 .. 2*pi.

fov property writable VanillaWotLK

fov: float

Diagonal field of view, radians.

fov property writable Cata

fov: M2Track[M2SplineKey[float]]

Diagonal field of view, radians.

M2Sequence⟨version⟩

One animation sequence entry. Abstract over the client version; construct a concrete version with M2Sequence.ForVersion / for_version.

id property writable

id: Annotated[int, uint16]

Animation id in AnimationData.dbc.

variation_index property writable

variation_index: int

Which variation of the animation this is.

start_timestamp property writable VanillaTBC

start_timestamp: int

Slice start on the global timeline.

end_timestamp property writable VanillaTBC

end_timestamp: int

Slice end on the global timeline.

duration property writable WotLK

duration: Annotated[int, uint32]

Sequence length, milliseconds.

movespeed property writable

movespeed: float

Character move speed during the sequence.

flags property writable

See SequenceFlags.

frequency property writable

frequency: Annotated[int, int16]

Playback probability weight (sums to 0x7FFF per id).

padding property writable

padding: Annotated[int, uint16]

Unused alignment padding.

replay property writable

replay: M2Range

Random repetition bounds; both 0 = no repeat.

blend_time property writable VanillaMoP

blend_time: int

Transition blend duration, milliseconds.

blend_time_in property writable WoD

blend_time_in: int

Blend-in duration, milliseconds.

blend_time_out property writable WoD

blend_time_out: int

Blend-out duration, milliseconds.

bounds property writable

bounds: M2Bounds

Bounds while the sequence plays.

variation_next property writable

variation_next: int

Next variation index, -1 if none.

alias_next property writable

alias_next: int

Alias target (flags & 0x40 chains).

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.

SetsRuntimeBlend class-attribute instance-attribute

SetsRuntimeBlend = 1

TiltIn class-attribute instance-attribute

TiltIn = 2

TiltOut class-attribute instance-attribute

TiltOut = 4

TiltFixed class-attribute instance-attribute

TiltFixed = 8

LoadedLowPriority class-attribute instance-attribute

LoadedLowPriority = 16

DataInM2 class-attribute instance-attribute

DataInM2 = 32

Alias class-attribute instance-attribute

Alias = 64

Blended class-attribute instance-attribute

Blended = 128

StoredInModel class-attribute instance-attribute

StoredInModel = 256

SplitBlendTimes class-attribute instance-attribute

SplitBlendTimes = 512

Legion0x800 class-attribute instance-attribute

Legion0x800 = 2048

M2SequenceFallback

M2SequenceFallback()
M2SequenceFallback(fallback_animation_id: int = 0, flags: int = 0)

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

fallback_animation_id property writable

fallback_animation_id: int

Substitute animation id in AnimationData.dbc.

flags property writable

flags: Annotated[int, int16]

Playback mode: 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 Vanilla

interpolation_type: int

Interpolation: 0 none, 1 linear, 2 bezier, 3 hermite (spline types only valid for spline-key tracks).

global_sequence property writable Vanilla

global_sequence: int

The global sequence driving this track; -1: none.

interpolation_ranges property writable VanillaTBC

interpolation_ranges: list[M2Range]

Per-sequence [first, last] key-index ranges into the global timeline.

timestamps property writable VanillaTBC

timestamps: list[Annotated[int, uint32]]

The global timeline's keyframe timestamps.

timestamps property writable WotLK

timestamps: list[list[Annotated[int, uint32]]]

Keyframe timestamps, one array per sequence (an external sequence keeps its arrays in the .anim file).

values property writable VanillaTBC

values: list[⟨value⟩]

The keyframe values, one per timestamp.

values property writable WotLK

values: list[list[⟨value⟩]]

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

value property writable

value: ⟨value⟩

The keyframe value.

in_tan property writable

in_tan: ⟨value⟩

The incoming tangent.

out_tan property writable

out_tan: ⟨value⟩

The outgoing tangent.

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

timestamps: list[Annotated[int, uint16]]

Sequence-independent keyframe timestamps.

keys property writable

keys: list[⟨value⟩]

The keys, one per timestamp.

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

times property writable

times: list[fixed16]

Normalized fixed16 key times.

values property writable

values: list[⟨value⟩]

The values, one per time.

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

AnimFileEntry()
AnimFileEntry(anim_id: int = 0, sub_anim_id: int = 0, file_id: int = 0)

An AFID entry: the .anim FileDataID for one (animation, variation) pair; 0 means none.

anim_id property writable

anim_id: int

AnimationData.dbc id of the sequence.

sub_anim_id property writable

sub_anim_id: int

The sequence variation index.

file_id property writable

file_id: int

FileDataID of the .anim file; 0 means none.

M2ExtendedParticleSimple

M2ExtendedParticleSimple()
M2ExtendedParticleSimple(z_source: float = 0.0, color_mult: float = 1.0, alpha_mult: float = 1.0)

An EXPT record: z-source, color and alpha multipliers for one particle emitter.

z_source property writable

z_source: float

If > 0, initial velocity points from (0, 0, z_source) to the spawn point.

color_mult property writable

color_mult: float

Multiplied into the particle's diffuse color.

alpha_mult property writable

alpha_mult: float

Multiplied into the particle's opacity.

M2ExtendedParticle

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

z_source: float

If > 0, initial velocity points from (0, 0, z_source) to the spawn point.

color_mult property writable

color_mult: float

Multiplied into the particle's diffuse color.

alpha_mult property writable

alpha_mult: float

Multiplied into the particle's opacity.

alpha_cutoff property writable

alpha_cutoff: M2PartTrack[fixed16]

Alpha-test threshold sampled by the particle's lifetime.

M2LightDetail

M2LightDetail()
M2LightDetail(flags: int = 0, scale_half: int = 0, diffuse_color_mult_half: int = 0, unknown0: int = 0, unknown1: int = 0)

A DETL record (9.0+): per-light flags, shadow-RT scale and diffuse multiplier (raw half-floats).

flags property writable

flags: Annotated[int, uint16]

Unknown per-light flags.

scale_half property writable

scale_half: int

Scale for the shadow RT matrix (raw half-float).

diffuse_color_mult_half property writable

diffuse_color_mult_half: int

Multiplier for the light's diffuse color (raw half-float).

unknown0 property writable

unknown0: Annotated[int, uint16]

Unknown.

unknown1 property writable

unknown1: Annotated[int, uint32]

Unknown.

Exp2Data

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

read(data: bytes) -> None

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

write() -> bytes

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

validate() -> ValidationReport

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

ensure_valid() -> None

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

PabcData()

The PABC chunk payload: the parent-model sequence-id blacklist ('BlacklistAnimData').

replacement_parent_sequence_lookups property

replacement_parent_sequence_lookups: list[int]

Replacement parent-sequence lookups: a plain list of present AnimationData ids.

read

read(data: bytes) -> None

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

write() -> bytes

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

validate() -> ValidationReport

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

ensure_valid() -> None

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

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

read(data: bytes) -> None

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

write() -> bytes

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

validate() -> ValidationReport

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

ensure_valid() -> None

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

Pgd1Data()

The PGD1 chunk payload: per-particle-emitter geoset assignments.

geosets property

geosets: list[Annotated[int, uint16]]

The geoset each particle emitter obeys (M2SkinSection geoset rules).

read

read(data: bytes) -> None

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

write() -> bytes

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

validate() -> ValidationReport

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

ensure_valid() -> None

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.

skin_section_id property writable

skin_section_id: int

Mesh part (geoset) id.

level property writable

level: Annotated[int, uint16]

Extends the 16-bit index_start by (level << 16) — index lists outgrow 64k first; vertex_start stays plain (verified on level=1 client files).

vertex_start property writable

vertex_start: int

First local vertex.

vertex_count property writable

vertex_count: int

Local vertex count.

index_start property writable

index_start: int

First triangle index.

index_count property writable

index_count: int

Triangle index count.

bone_count property writable

bone_count: int

Bone-lookup entries used.

bone_combo_index property writable

bone_combo_index: int

First bone-lookup entry.

bone_influences property writable

bone_influences: int

Highest bones-per-vertex in the submesh.

center_bone_index property writable

center_bone_index: int

The bone nearest the submesh center; wowdev leaves it otherwise undescribed.

center_position property writable

center_position: C3Vector

Average vertex position.

sort_center_position property writable TBC

sort_center_position: C3Vector

Center of the submesh bounding box.

sort_radius property writable TBC

sort_radius: float

Distance of the farthest vertex from it.

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.

vertices property writable

vertices: list[Annotated[int, uint16]]

Local -> global vertex lookup.

indices property writable

indices: list[Annotated[int, uint16]]

Triangle list into the local vertices.

bones property writable

bones: list[list[Annotated[int, uint8]]]

Per-vertex 4-bone indices.

submeshes property writable Vanilla

submeshes: list[M2SkinSection⟨version⟩]

The submeshes (skin sections).

submeshes property writable TBC

submeshes: list[M2SkinSection⟨version⟩]

The submeshes (skin sections).

batches property writable

batches: list[M2Batch]

The render batches (texture units).

bone_count_max property writable

bone_count_max: int

Max bones per draw call (21/53/64/256).

shadow_batches property writable

shadow_batches: list[M2ShadowBatch]

Shadow batches (Cata+).

M2Batch

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

flags: Annotated[int, uint8]

0x10 static texture, 0x40 transparency quirk, ...

priority_plane property writable

priority_plane: int

Draw-order priority plane.

shader_id property writable

shader_id: int

Pre-Cata: 0 on disk, computed at runtime.

skin_section_index property writable

skin_section_index: int

The submesh this batch renders.

geoset_index property writable

geoset_index: int

BfA+: renamed flags2 (0x2 projected, 0x8 EDGF).

color_index property writable

color_index: int

Into the model colors, -1 if none.

material_index property writable

material_index: int

Into the model materials.

material_layer property writable

material_layer: int

Capped at 7.

texture_count property writable

texture_count: int

1..4 consecutive lookup entries.

texture_combo_index property writable

texture_combo_index: int

Into the texture lookup.

texture_coord_combo_index property writable

texture_coord_combo_index: int

Into the texture-mapping lookup.

texture_weight_combo_index property writable

texture_weight_combo_index: int

Into the transparency lookup.

texture_transform_combo_index property writable

texture_transform_combo_index: int

Into the UV-animation lookup.

M2ShadowBatch

M2ShadowBatch()
M2ShadowBatch(flags: int = 0, flags2: int = 0, unknown1: int = 0, submesh_id: int = 0, texture_id: int = 0, color_id: int = 0, transparency_id: int = 0)

An M2 skin shadow batch (Cata+); the client can also generate these from the render batches.

flags property writable

flags: Annotated[int, uint8]

If auto-generated: the source render batch's flags.

flags2 property writable

flags2: Annotated[int, uint8]

If auto-generated: bits derived from the material's flags and blend mode.

unknown1 property writable

unknown1: Annotated[int, uint16]

Unknown.

submesh_id property writable

submesh_id: int

The submesh shadowed.

texture_id property writable

texture_id: int

Already looked up.

color_id property writable

color_id: int

Into the model colors.

transparency_id property writable

transparency_id: int

Already looked up.

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

SkelParentData()
SkelParentData(padding0: list[int] | None = ..., parent_skel_file_id: int = 0, padding1: list[int] | None = ...)

The SKPD parent-skeleton link: the parent .skel FileDataID whose AFID/BFID satellite files this skeleton shares.

padding0 property writable

padding0: list[Annotated[int, uint8]]

Unknown leading bytes; always zero so far.

parent_skel_file_id property writable

parent_skel_file_id: int

The parent .skel FileDataID.

padding1 property writable

padding1: list[Annotated[int, uint8]]

Unknown trailing bytes; always zero so far.

SkelHeader⟨version⟩

SkelHeader⟨version⟩()

The SKL1 payload: the skeleton's identity.

flags property writable

flags: Annotated[int, uint32]

Flags; 0x100 in every file observed so far.

name property writable

name: str

The skeleton's name.

padding property writable

padding: list[Annotated[int, uint8]]

Unknown trailing bytes; always zero so far.

read

read(data: bytes) -> None

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

write() -> bytes

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

validate() -> ValidationReport

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

ensure_valid() -> None

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⟩

SkelSequences⟨version⟩()

The SKS1 payload: the sequence set that moved out of the model.

global_loops property

global_loops: list[M2Loop]

Global-sequence loop lengths.

sequences property

sequences: list[M2Sequence⟨version⟩]

The animation sequences.

sequence_lookups property

sequence_lookups: list[int]

Animation-id hash table (see M2Root.sequence_lookups).

padding property writable

padding: list[Annotated[int, uint8]]

Unknown trailing bytes; always zero so far.

read

read(data: bytes) -> None

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

write() -> bytes

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

validate() -> ValidationReport

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

ensure_valid() -> None

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⟩

SkelBones⟨version⟩()

The SKB1 payload: the bones that moved out of the model (external sequences' track data lives in the .anim AFSB chunks).

bones property

The bones.

key_bone_lookup property

key_bone_lookup: list[int]

Key-bone lookup: key bone slot -> bone index, -1 if none.

read

read(data: bytes) -> None

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

write() -> bytes

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

validate() -> ValidationReport

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

ensure_valid() -> None

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⟩

SkelAttachments⟨version⟩()

The SKA1 payload: the attachments that moved out of the model (external sequences' track data lives in the .anim AFSA chunks).

attachments property

attachments: list[M2Attachment⟨version⟩]

The attachment points.

attachment_lookup_table property

attachment_lookup_table: list[int]

Attachment lookup: attachment id -> index.

read

read(data: bytes) -> None

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

write() -> bytes

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

validate() -> ValidationReport

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

ensure_valid() -> None

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