Change a character's animation style¶
Designer · 1 h · No code
Result: a character switches between the masculine and feminine body and movement set, or uses a third animation style you create, with its own idle, locomotion and idle break.
Before you start¶
How the style is chosen¶
One gameplay tag decides both the body and the movement clips:
- The pawn Blueprint's Cosmetic Part names a small actor,
Characters/Core/Cosmetics/B_XenoCore_Cosmetic_MasculineorB_XenoCore_Cosmetic_Feminine. It has no mesh; it only carries a tag,Cosmetic.AnimationStyle.Masculineor.Feminine. - On Begin Play the pawn adds that part. The pawn's Body Meshes rules read the tag and
pick the body: Masculine gives
SKM_Manny, Feminine givesSKM_Quinn. - When the weapon is drawn or sheathed, the weapon instance reads the same tag and picks an animation layer: a small anim Blueprint holding the idle and locomotion clips.
| Weapon state | Layer rules on Weapons/GreatSword/B_WeaponInstance_GreatSword |
|---|---|
| Sheathed (Uneuipped Anim Set, Lyra's spelling) | Feminine → ABP_XenoCore_UnarmedAnimLayers_Feminine; otherwise ABP_XenoCore_UnarmedAnimLayers |
| Drawn (Equipped Anim Set) | ABP_XenoCore_GreatSwordAnimLayers for everyone |
The layers live in Characters/Player/AnimLayers. The feminine layer is a child of the masculine
one that swaps two assets: the idle and the locomotion blend space. Nothing else differs.
Switch a character's style¶
- Open the character's pawn Blueprint, for example the Mannequin sample
Characters/Party/B_XenoCore_Party_Quinn, and click Class Defaults. - Under Default, set Cosmetic Part to
B_XenoCore_Cosmetic_MasculineorB_XenoCore_Cosmetic_Feminine. A VRoid member's Cosmetic Part is its own VRoid part (for Mira,Characters/VRoid/Mira/B_XenoCore_Cosmetic_VRoid_K): change the tag in that part's Static Gameplay Tags instead, and its pawn's Body Meshes pick the matching invisible body. - The body swaps with it. If you want a feminine movement set on the Manny body, you cannot do it with this field alone: see Make a new style below.
- Compile and Save.
The character takes the wrong body
Cosmetic Part points at an actor with no Cosmetic.AnimationStyle tag, so the body-mesh
rules match nothing and the pawn takes Body Meshes › Default Mesh (SKM_Manny on the
shipped party pawns) with the default layers. Use one of the two shipped parts, or clear the
field entirely (the pawn then keeps its own mesh). Saving the pawn Blueprint shows a warning
naming the part and its tags.
Change a style's idle break¶
A character standing still plays an occasional fidget. Its default is set on each layer.
Fails silently: the character's anim profile wins
If the character's anim profile lists Idle Breaks (sheathed) or Armed Idle Breaks (drawn), those clips play instead of the layer's Idle Break Anim, and editing the layer changes nothing. Every VRoid party member's profile ships with its own idle breaks. To change a VRoid member's fidgets, edit its profile: see Give a character its own combat animations. The layer's Idle Break Delay and Idle Break Jitter still set the timing.
- Open
ABP_XenoCore_UnarmedAnimLayers(or the feminine or greatsword layer) and click Class Defaults. - Under XenoCore › Idle Break:
- Idle Break Anim: the fidget clip. Empty means this style never fidgets.
- Idle Break Delay: seconds of standing still before a fidget,
8by default. - Idle Break Jitter: random extra seconds on top,
6by default, so party members do not fidget in unison.
- Compile and Save.
Make a new style¶
This example adds a Heavy style with its own idle and walk.
1. The tag¶
- Open Project Settings › Project › Gameplay Tags.
- Click Add New Gameplay Tag, enter
Cosmetic.AnimationStyle.Heavy, and pick a tag source (ini file) of your own, not one of XenoCore's.
2. The cosmetic part¶
- In
Characters/Core/Cosmetics, duplicateB_XenoCore_Cosmetic_MasculineintoMyGame/CharactersasB_Cosmetic_Heavy. - Open it, click Class Defaults, and in Static Gameplay Tags replace
Cosmetic.AnimationStyle.MasculinewithCosmetic.AnimationStyle.Heavy. It must carry only that one tag (it is under Actor). Compile and Save.
3. The layer¶
- In
Characters/Player/AnimLayers, findABP_XenoCore_UnarmedAnimLayers_Feminine. Duplicate it intoMyGame/CharactersasABP_HeavyAnimLayers. It is already a child ofABP_XenoCore_UnarmedAnimLayers, holding only asset overrides. - Open it. In the Asset Override Editor (it opens by itself for a child anim Blueprint; else
Window › Asset Override Editor), replace the idle sequence and the
locomotion blend space with your own. To make a blend space, duplicate
Characters/Player/BlendSpaces/BS_XenoCore_Unarmed_Locomotion_Feminineand swap its samples. - Set its Idle Break Anim as above. Compile and Save.
Duplicate the feminine layer, never re-create the masculine one
ABP_XenoCore_UnarmedAnimLayers is the fallback the character's main anim Blueprint links
when nothing else is linked. Replacing or renaming it breaks every character silently.
Set each override once
An asset override added twice on the same node keeps both entries, and which one wins cannot be seen in the asset. If you make a mistake, delete the layer and duplicate it again.
4. Teach the weapons and the body¶
- Open
Weapons/GreatSword/B_WeaponInstance_GreatSword(and any other weapon instance you use). - In Uneuipped Anim Set › Layer Rules, add an entry: Required Tags
Cosmetic.AnimationStyle.Heavy, LayerABP_HeavyAnimLayers. - In Equipped Anim Set, add a Heavy rule only if you made a drawn-weapon layer too. Otherwise the default greatsword layer is used.
- Open the pawn Blueprint you want to use the style. In the Components panel select its
character parts component, and under Body Meshes › Mesh Rules add an entry: Required Tags
Cosmetic.AnimationStyle.Heavy, Mesh the body you want. Compile. -
In the same Blueprint's Class Defaults, set Cosmetic Part to
B_Cosmetic_Heavy. Compile and Save. -
If a weapon's type (
Weapons/Types/DA_XenoCore_WeaponType_*) sets Armed Layers or Sheathed Layers, those win over the weapon instance's anim sets: add the Heavy rule there too. The shipped Greatsword type leaves both empty.
Fails silently: the style never appears
A weapon instance with no rule for your tag falls back to its default layer, with no warning. Every weapon instance the character can hold needs the rule.
The character takes the default body
A tag with no Body Meshes rule selects Default Mesh: SKM_Manny on the shipped party
and player bases, or the invisible Mannequin on a VRoid pawn. Every style tag a pawn can carry
needs its own Body Meshes rule on that pawn. Saving the pawn reports a Cosmetic Part
whose tags match no rule.
Keep a Default Mesh on your own pawns
With no Default Mesh, an unmatched tag selects no body at all. XenoCore's party and player
characters guard against it at Begin Play: they use the mesh they spawned with and log a
LogXenoCosmetics warning once per class. A pawn that is not a XenoCore combatant has no such
guard and turns invisible. Saving a pawn with no Default Mesh shows a warning.
Test it¶
- Press Play in
Maps/L_XenoCore_Gymwith the character active and leading. - Walk and stand still. The movement and idle are your style's; after about eight to fourteen seconds still, the fidget plays.
- Engage an enemy. The drawn-weapon layer takes over, and blends back when you sheathe.
If it doesn't work¶
| Symptom | Fix |
|---|---|
| The fidget you set never plays | The character's anim profile has its own Idle Breaks, which win. See the warning under Change a style's idle break. |
| The style's walk never appears | A weapon instance (or weapon type) has no layer rule for the tag. See step 4. |
| The character turns invisible or takes the wrong body | The tag has no Body Meshes rule on that pawn, or Default Mesh is empty. |
The layer swaps with a visible pop
The swap is blended by an inertialization request on the DefaultGroup slot group. A layer
you built by hand with its own slot nodes in another group blends wrong. Duplicate a shipped
layer instead of building one.
Going further¶
- Animation: the host anim Blueprint, linked layers and why locomotion stays snappy.
- Add a weapon: a weapon instance's anim sets.