shortsize:13;// total size of all animation data, not nextoffset because even the last one has it
shortflags:3;
// if flag 'STUDIO_ANIM_ANIMPOS' then these two
floatposscale;
mstudioanim_valueptr_tpPosV;
// else (static value, no actual animation)
//Vector48 pPos; // type does not exist in R5SDK
// if flag 'STUDIO_ANIM_ANIMROT' then
mstudioanim_valueptr_tpRotV;
// else (static value, no actual animation)
//Quaternion64 pRot; // type does not exist in R5SDK
// if flag 'STUDIO_ANIM_ANIMSCALE' then
mstudioanim_valueptr_tpScaleV;
// else (static value, no actual animation)
//Vector48 pScale; // type does not exist in R5SDK
};
// apex ikerrors do the same thing as apex framemovements
structmstudiocompressedikerror_t
{
floatscale[6];// these values are the same as what posscale (if it was used) and rotscale are.
intsectionframes;// frames per section, may not match animdesc
};
structmstudioikrule_t
{
intindex;
inttype;
intchain;
intbone;// gets it from ikchain now pretty sure
intslot;// iktarget slot. Usually same as chain.
floatheight;
floatradius;
floatfloor;
Vector3Dpos;
Quaternionq;
// apex does this oddly
mstudiocompressedikerror_tcompressedikerror;
intcompressedikerrorindex;
intiStart;
intikerrorindex;
floatstart;// beginning of influence
floatpeak;// start of full influence
floattail;// end of full influence
floatend;// end of all influence
floatcontact;// frame footstep makes ground concact
floatdrop;// how far down the foot should drop when reaching for IK
floattop;// top of the foot box
intszattachmentindex;// name of world attachment
floatendHeight;// new in v52
};
// basically compressedikerrors and frame movements will have an array of offsets that leads into the traditional 'short offset' array, allowing it to have per section (if the anim uses sections) data
structmstudioframemovement_t
{
floatscale[4];// first three values are the same as what posscale (if it was used) is, fourth is similar to unkvector1.
intsectionframes;// frames per section, may not match animdesc
// may have more than one, even when not section anim
};
structmstudioseqdesc_t
{
intbaseptr;
intszlabelindex;
intszactivitynameindex;
intflags;// looping/non-looping flags
intactivity;// initialized at loadtime to game DLL values
intactweight;
intnumevents;
inteventindex;
Vector3Dbbmin;// per sequence bounding box
Vector3Dbbmax;
intnumblends;
// Index into array of shorts which is groupsize[0] x groupsize[1] in length
intanimindexindex;
intmovementindex;// [blend] float array for blended movement
intgroupsize[2];
intparamindex[2];// X, Y, Z, XR, YR, ZR
floatparamstart[2];// local (0..1) starting value
floatparamend[2];// local (0..1) ending value
intparamparent;
floatfadeintime;// ideal cross fate in time (0.2 default)
floatfadeouttime;// ideal cross fade out time (0.2 default)
intlocalentrynode;// transition node at entry
intlocalexitnode;// transition node at exit
intnodeflags;// transition rules
floatentryphase;// used to match entry gait
floatexitphase;// used to match exit gait
floatlastframe;// frame that should generation EndOfSequence
intnextseq;// auto advancing sequences
intpose;// index of delta animation between end and nextseq
intnumikrules;
intnumautolayers;
intautolayerindex;
intweightlistindex;
intposekeyindex;
intnumiklocks;
intiklockindex;
// Key values
intkeyvalueindex;
intkeyvaluesize;
intcycleposeindex;// index of pose parameter to use as cycle index
intactivitymodifierindex;
intnumactivitymodifiers;
intikResetMask;// new in v52
intunk1;
// offset unkindex amount into an array of unkcount 'unkseqdata_t'
intunkindex;
intunkcount;
};
structmstudioautolayer_t
{
// this needs to have a guid descriptor in rpak
__int64guidSequence;// hashed aseq guid asset
shortiSequence;// only used within an rmdl I would imagine
shortiPose;
intflags;
floatstart;// beginning of influence
floatpeak;// start of full influence
floattail;// end of full influence
floatend;// end of all influence
};
#define NEW_EVENT_STYLE ( 1 << 10 )
structmstudioevent_t
{
floatcycle;
intevent;
inttype;// this will be 0 if old style
charoptions[256];
intszeventindex;
};
// will align to four, so takes up eight bytes
structmstudioactivitymodifier_t_v52
{
intsznameindex;
boolnegate;// negate all other activity modifiers when this one is active?
};
structunkseqdata_t
{
// generally 0-1
floatunkfloat;
intunk;
// quaternion mayhaps
floatunkfloat1;
floatunkfloat2;
floatunkfloat3;
floatunkfloat4;
};
structmstudiobodyparts_t
{
intsznameindex;
intnummodels;
intbase;
intmodelindex;// index into models array
};
structmstudiomodel_t
{
charname[64];
intunkindex2;// goes to bones sometimes, string index
inttype;
floatboundingradius;
intnummeshes;
intmeshindex;
// cache purposes
intnumvertices;// number of unique vertices/normals/texcoords
intvertexindex;// vertex Vector
inttangentsindex;// tangents Vector
intnumattachments;
intattachmentindex;
intdeprecated_numeyeballs;
intdeprecated_eyeballindex;
intpad[4];
intcolorindex;// vertex color
// offset by colorindex number of bytes into vvc vertex colors
intuv2index;// vertex second uv map
// offset by uv2index number of bytes into vvc secondary uv map
};
structmstudio_meshvertexloddata_t
{
intmodelvertexdataUnusedPad;// likely has none of the funny stuff because unused
intnumLODVertexes[MAX_NUM_LODS];// depreciated starting with rmdl v14(?)
};
structmstudiomesh_t
{
intmaterial;
intmodelindex;
intnumvertices;// number of unique vertices/normals/texcoords
intvertexoffset;// vertex mstudiovertex_t
// Access thin/fat mesh vertex data (only one will return a non-NULL result)
intdeprecated_numflexes;// vertex animation
intdeprecated_flexindex;
// special codes for material operations
intdeprecated_materialtype;
intdeprecated_materialparam;
// a unique ordinal for this mesh
intmeshid;
Vector3Dcenter;
mstudio_meshvertexloddata_tvertexloddata;
charunk[8];// these are suposed to be filled on load, however this isn't true??
};
structmstudioposeparamdesc_t
{
intsznameindex;
intflags;// ????
floatstart;// starting value
floatend;// ending value
floatloop;// looping range, 0 for no looping, 360 for rotations, etc.
};
structmstudioikchain_t
{
intsznameindex;
intlinktype;
intnumlinks;
intlinkindex;
floatunk;// no clue what this does tbh, tweaking it does nothing
// default value: 0.707f
};
structmstudioiklink_t
{
intbone;
Vector3DkneeDir;// no kneeDir in apex I think
};
structmstudiotexturedir_t
{
intsznameindex;// file name
};
structmstudiotexture_t
{
intsznameindex;
__int64guid;// guid of the material it references
};
structmstudiorruiheader_t
{
intunk;// unsure, it doesn't line up
intruimeshindex;// offset to the actual rui mesh
};
// vertex map for a face
structmstudioruivertmap_t
{
// order of vertices for triangles:
// 1st tri: 1-3-2
// 2nd tri: 4-2-3
// sometimes these are for a triangle instead of a quad, if that's the case then:
// tri: 1-4-2
// in this case the vert map will only cover 3 verts.
// in v53 the first two are an array like such:
// 1-3
// while the third is the fourth vert.
shortvertid[3];
};
structmstudioruivert_t
{
intparent;// relative to global mesh parent, assumed
Vector3Dvertexpos;// position of vertex relative to bone
};
structmstudioruimeshface_t
{
// this might be the same as the RPak UIMG UV struct.
// these values are for the two vertices that are not shared
// for the other do as such:
// vertex 2: take x from vextex 1 and y from vextex 4
// vertex 2: take x from vextex 4 and y from vextex 1
// normal smd uv, seems to calculate for other values
Vector2Dfaceuvmin;// vertex 1
Vector2Dfaceuvmax;// vertex 4
// these could likely be calculated by doing math with a height/width scale
// scale of the ui element
Vector2Dfacescalemin;// vertex 1
Vector2Dfacescalemax;// vertex 4
};
structmstudioruimesh_t
{
shortnumparents;// apparently you can have meshes parented to more than one bone(?)
shortnumvertices;// number of verts
shortnumfaces;// number of faces (quads)
shortunk;// num uvs? or this is num faces and current num faces is num uvs
intparentindex;// this gets padding out front of it to even off the struct
intvertexindex;// offset into smd style vertex data
// not actually fourth vert wtf??
intfourthvertmapindex;// they now fully map the vertices for each quad
intvertmapindex;// offsets into a vertex map for each quad
intfacedataindex;// offset into uv section
};
structmstudiosrcbonetransform_t
{
intsznameindex;
matrix3x4_tpretransform;
matrix3x4_tposttransform;
};
structmstudiolinearbone_t
{
// they cut pos and rot scale, understandable since posscale was never used it tf|2 and they do anims different in apex