A Controller Definition contains the setup of a mannequin character.
It refers to the Tag Definition File (xxxTags.xml) and FragmentID Definition File (xxxActions.xml) used by this character. It is typically referred to by the game entity, as the file is needed by the entity to create a Mannequin ActionController. See the overview picture in the Mannequin Files document.
It defines which scopes are assigned to each of the FragmentIDs, aka the scopemasks. See FragmentIDs and Scopemasks.
It defines which scopes and scope contexts the character has. See Mannequin Scopes* and Scope Contexts.
You create a controller definition manually. See the FileFormat section.
The scopemasks and related flags can be edited in the Mannequin FragmentID Editor.
All the rest has to be edited manually in the xml file. See the FileFormat section.
This is an example Controller Definition File:
<ControllerDef>
<Tags filename="Animations/Mannequin/ADB/sampleTags.xml"/>
<Fragments filename="Animations/Mannequin/ADB/sampleFragmentIds.xml"/>
<SubContexts/>
<FragmentDefs>
<move scopes="FullBody+Torso" flags="Persistent"/>
<burst_fire scopes="Torso+Weapon">
<Override tags="heavyMortar" fragTags="boosted" scopes="Torso"/>
</burst_fire>
</FragmentDefs>
<ScopeDefs>
<FullBody layer="0" numLayers="3" context="MainContext"/>
<Torso layer="3" numLayers="3" context="MainContext"/>
<Face layer="6" numLayers="0" context="MainContext" Tags="scope_face"/>
<Weapon layer="0" numLayers="2" context="WeaponContext"/>
</ScopeDefs>
</ControllerDef>
The Tags element contains a reference to the Tag Definition File (xxxTags.xml) used by this setup.
The Fragments element contains a reference to the FragmentID Definition File (xxxActions.xml) used by this setup.
The SubContexts element lists all the different Mannequin SubContexts available for this controller definition.
The FragmentDefs element has to contain exactly one entry for each fragmentID specified in the FragmentID Definition. Typically editing of these elements is done automatically by the editor.
For each of the fragmentIDs:
Flag | Description |
---|---|
Persistent | Forces the action that requested this fragmentID to keep playing, even when the fragment that is playing is not looping and has ended. |
AutoReinstall | Constantly checks whether there is a fragment available that matches the current Mannequin TagState. If so, the system will push the new, better matching fragment for you. Useful for basic 'idling' actions. Typically used together with the "Persistent" flag. |
The ScopeDefs elements defines the scopes as well as the scope contexts used by this setup. Each element inside the ScopeDefs element defines a scope. The element name is the scope name. Each scope has the following attributes:
Attribute | Description |
---|---|
layer | The index of the first layer in the animation system this scope is bound to. Careful: When picking a layer, make sure it doesn't clash with the layer being in use by the Pseudo Lip-Sync feature. Mannequin and Pseudo LipSync don't know about each other and therefore can't detect when one uses a layer that is already in use by the other! |
numLayers | The number of animation layers this scope is bound to. A scope is bound to the animation layers with indices "layer" up to "layer+numLayers-1". |
context | The name of the scope context used by this scope. |
tags | An optional tag, sometimes called the 'scope tag'. If set, it will be a tag that is required for fragments playing on this scope. In the above example, it is possible to have different fragments playing on the FullBody and Face scope. If you start an action on "FullBody+Face", the system will select two different fragments. |