Sequence File (xml)

Description

A Sequence File contains a sequence of requests for animation, mimicking how the game requests animation from the system. For example it can contain a sequence of weapon fragmentIDs (select/reloading/fire/deselect) to test a weapon setup. They are created either in the mannequin editor or by recording actual gameplay.

Sequence files are stored in the folder pointed to by the mn_sequence_path cvar. By default this is Animations/Mannequin/FragmentSequences/.

Their filename ends in .xml.

Creating Sequence Files

Sequence files are created either:

Editing Sequence Files

Sequence files are edited in the Mannequin Previewer.

File Format

This is an example sequence file:

<History StartTime="0" EndTime="102.72806">
 <Item Time="32.951611" ScopeMask="Torso1P" FragmentID="idle" OptionIdx="1296707006" TagState="ammo_clipRemaining"/>
 <Item Time="33.082249" ScopeMask="" FragmentID="MotionIdle" OptionIdx="3032444839" Trump="1"/>
 <Item Time="33.209457" TagState="SDKRifle+rifle+rapid+SP+FP+iron+backward+aiming+localClient"/>
 <Item Time="33.872021" TagState="SDKRifle+rifle+rapid+SP+FP+iron+left+aiming+localClient"/>
 <Item Time="34.42939" ParamName="Curving" Type="Location">
  <Value x="0" y="0" z="0" qx="5" qy="5" qz="0" qw="1"/>
 </Item>
</History>

The History element is the root element, and contains the range of time this sequence represents as StartTime and EndTime.

It contains a list of Item elements that record mannequin changes at certain Times:

  • Pushing a Fragment:
    • FragmentID attribute: The FragmentID requested from mannequin.
    • ScopeMask attribute: The scopemask requested from mannequin. This typically can be left empty. Scopes are assigned to the fragmentID by the definitions in the Controller Definition File (xxxControllerDefs.xml).
    • OptionIdx attribute: The option index requested from mannequin. Typically a random number during gameplay, but you can pick a specific option index if you wish.
    • TagState attribute: (optional) The FragmentID-specific Tags (fragtags) used during the request.
    • Trump attribute: (optional) Set to 1 to enable Mannequin Trumping.
  • Global TagState changes:
    • TagState attribute: The new global tagstate.
  • Parameter changes:
    • ParamName attribute: Contains the name of the Mannequin Parameter.
    • Type attribute: Deprecated, not used.
    • Value element: The 'x', 'y', 'z', 'qx', 'qy', 'qz', 'qw' attributes store the value of the Mannequin Parameter. There are enough attributes to encode an offset and a quaternion, so it can be used to describe a location (eg. typical usage of the "TargetPos" parameter). Not all values are necessarily used (eg. Motion parameters only use the 'x' attribute).

Code

In code these sequences are represented by a list of SMannHistoryItem structures in the game and a list of CFragmentHistory::SHistoryItem structures in the editor.