FragmentIDs

Description

A FragmentID is the main label under which a fragment is stored.

The FragmentID represents an animation state like "Moving", "Idling", "Reloading", "Firing", etc. The game requests fragments by specifying this FragmentID. Contrary to what the name 'FragmentID' might suggest there are typically many fragments that fall under the same FragmentID. For example you can have many different "Moving" fragments: they represent either random variations or context-specific variations (moving while crouched, moving while standing, etc).

Typically a programmer defines a FragmentID for every basic animation state and then animators can create fragments for those FragmentIDs.

FragmentID or Transition?

A good rule of thumb to define what should be a FragmentID: Reduce the states to the minimum logically required to control the flow of the system. These are all the code needs to drive and can be taken as your key FragmentIDs.

For example this is how a Weapon Crafting feature could look like:

If we need animations between FragmentIDs these are best handled as Transitions. This reduces code and makes the system easier to modify purely through data:

A grey area is the customization step. The swapping of a part needs to sequence removing a specific old part and inserting the new (left of the picture).

Or we could just request an alternate customize stance (change a tag specifying the stance and request a new fragment) and then let the transition system handle removing the old and applying the new part. This would also let the animators drop in a single animation to do both steps if they wished.

Creating & Editing FragmentIDs

FragmentIDs are created, renamed and deleted in the Mannequin Fragment Browser.

You edit them in the Mannequin FragmentID Editor.

Storage

FragmentIDs are stored in a FragmentID Definition File (xxxActions.xml), which is referred to from the main character setup, the Controller Definition File (xxxControllerDefs.xml).