Data structures =============== This section documents the mdl file format itself, structure by structure, as |proj_name| understands it. .. _support: What is supported ----------------- |proj_name| is evidence driven: a structure is documented here once it has been read out of real files and cross-checked against the Source SDK, and not before. Gaps are left as gaps rather than guessed at. *Documented* means the structure is defined here and checked against the SDK. *Loaded* means |proj_name| follows the offsets to it and hands it to you. =============================== ========== ========================================= Structure Documented Loaded =============================== ========== ========================================= :any:`studiohdr_t` yes ``mdl.header`` :any:`studiohdr2_t` yes ``mdl.header2`` :any:`mstudiobone_t` yes ``mdl.bones``, names and surfaceprops resolved :any:`mstudiobonecontroller_t` yes ``mdl.bonecontrollers`` :any:`mstudioaxisinterpbone_t` yes ``bone.procedural`` :any:`mstudioquatinterpbone_t` yes ``bone.procedural`` :any:`mstudioaimatbone_t` yes ``bone.procedural`` :any:`mstudiojigglebone_t` yes ``bone.procedural`` :any:`vertexFileHeader_t` yes ``mdl.vvd.header`` :any:`FileHeader_t` (vtx) yes ``mdl.vtx.header`` :any:`mstudiovertex_t` yes ``mdl.vvd.vertices`` :any:`mstudiotexture_t` yes ``mdl.textures``, names resolved cdtextures (search paths) yes ``mdl.cdtextures`` Skin replacement table yes ``mdl.skins`` :any:`mstudioanimdesc_t` yes ``mdl.animations`` :any:`mstudioseqdesc_t` yes ``mdl.sequences`` :any:`mstudioanim_t` yes ``animation.nodes``, extents measured :any:`mstudioikchain_t` yes ``mdl.ikchains``, with ``.links`` :any:`mstudioikrule_t` yes ``animation.ikrules`` :any:`mstudioevent_t` yes ``sequence.events`` :any:`mstudioflexdesc_t` yes ``mdl.flexdescs`` :any:`mstudioflexcontroller_t` yes ``mdl.flexcontrollers`` :any:`mstudioflexrule_t` yes ``mdl.flexrules``, with ``.ops`` :any:`mstudioflex_t` yes ``mesh.flexes``, with ``.vertanims`` :any:`mstudioeyeball_t` yes ``model.eyeballs`` :any:`mstudiolinearbone_t` yes ``mdl.linearbones`` :any:`mstudiobodyparts_t` yes ``mdl.bodyparts``, names resolved :any:`mstudiomodel_t` yes ``mdl.models``, or ``bodypart.models`` :any:`mstudiomesh_t` yes ``mdl.meshes``, or ``model.meshes`` :any:`mstudiohitboxset_t` yes ``mdl.hitboxsets``, with ``.hitboxes`` :any:`mstudiobbox_t` yes ``hitboxset.hitboxes`` :any:`mstudioattachment_t` yes ``mdl.attachments`` :any:`mstudioposeparamdesc_t` yes ``mdl.poseparameters`` :any:`mstudiomodelgroup_t` yes ``mdl.includemodels`` :any:`mstudiomouth_t` yes not yet :any:`mstudioanimblock_t` yes not yet Vertex and tangent pools yes ``mdl.vvd.vertices`` / ``.tangents`` Vvd fixup table yes ``mdl.vvd.fixups``, replayed by ``mesh_vertices()`` Vtx mesh tree yes ``mdl.vtx.bodyparts`` =============================== ========== ========================================= Versions -------- Team Fortress 2 ships mdl versions 44, 45, 46, 47 and 48 -- five variants of the same format, in the same game. Version 48 accounts for about 91% of them. :any:`studiohdr_t` itself is unchanged across that whole range; the version differences live in how the structures it points at are interpreted. .. toctree:: :maxdepth: 2 datastructures/common datastructures/studiohdr datastructures/bone datastructures/texture datastructures/mesh datastructures/misc datastructures/anim datastructures/seq datastructures/ik datastructures/flex datastructures/vvd datastructures/vtx