Notes and info on how things work and how to tweak things

/table

Adding new types of actions/attacks

To add a brand new type of action or attack, first a gameplay tag needs to be added for it in the relevant category. Of course it needs to be used somewhere, so player controls or the AI will need to be modified to use the new action.

Adding new animations

  1. Have some animation ready, on the sk mannequin UE5 skeleton, with root motion enabled (for now they’re all in the Combat->Animations folder)
  2. Create an anim montage from the animation asset
  3. Place anim notifies on the timeline:
    1. RotateCharacter_ANS is an anim notify state (not trigger) which makes the character rotate in its chosen direction over the time it takes… useful to make an animation turn to point the way the controller is going (or the way the AI wants to go) regardless
    2. ContinueAttack_AN: At this point combos are allowed to chain, if an input is queued the next attack starts playing exactly now.
    3. ResetCombat_AN: Similar to above, but allows other actions than just attack combo (ie. dodge). ContinueAttack can be skipped if redundant, reset combat is enough
    4. CollisionTrace_ANS: Enables weapon hit frames for the duration of the notify
    5. IFrames_ANS: Same for dodge

Untitled

Using the animations

The animation montages can be added to action assets, or to weapon attacks for actions that tie animations to the equipped weapon.

Actions

Actions are the base things characters can perform (via the BPC_ActionsPerformer component). This should probably be used for most types of interactions.

<aside> 💡 Attacks are a a subset of actions, where the attack is still an action, but some of its data is read from the weapon, to customise attack animation per weapon.

</aside>

The basic actions can be shared between different enemy types, since most of the changes between enemy types will likely come from combat animations in the weapon.

Creating new actions

  1. In the Combat/Data/Actions folder, create a new data asset of type D_ActionData, or duplicate one of the other ones
  2. Set properties. Animation is optional (actions without animations will end instantly). Sound cue will play when the action starts if there is one.
  3. Associated State: Important, sets the overall character state when this action runs. Pick one of the gameplay tags in Character.State. The character state is a high level general state which is used in various conditions in the game to check what the character can do.