Legacy Reference

Fragment Selection Process

The following process determines which fragment gets selected for use when a game request is made.

  • Determine FragmentID for fragment

  • Determine scope mask for FragmentID

  • Determine scopes assigned to FragmentID

  • Determine scope context assigned for each scope

  • Determine scope tags assigned for each scope

  • Find best matching fragments in the animation database .ADB file assigned to the scope context for each scope. A matching fragment must contain all the scope tags for a scope.

  • Ranking matching fragments using tag priorities. Fragments are displayed in the Fragments panel according to rank.

  • If there are multiple options with the same tags, the option index is used to select the fragment.

First, the Mannequin system determines which scopes are assigned to the requested fragmentID by looking up the scope mask for the fragmentID. Typically the fragmentID determines the scope mask by itself, but it is possible to specify 'overrides' and select different scope masks based on the global tagstate and requested frag tags. See the file format section in the article on the controller definition file for more on how this is set up. Also, if the calling action requests a specific SubContext, the scope mask and global tags coming from this SubContext's definition extends the ones from the original request. Finally, the scope mask can optionally be extended by the action's 'forced scope mask'.