CombatPoise and Stagger
Last modified: 17 September 2024Poise is represented by Gameplay Attributes:
Poise
,PoiseDamage
andPoiseRecovery
.Poise starts at
zero
and can be filled by attacks using theDamagePoise
Combat Effect.Once Poise reaches the maximum value, the character is Staggered.
Poise can be automatically recovered, also via the
ReplenishPoise
Combat Effect.Stagger is represented by the
Stagger
Combat Ability, activated via theStaggered
Combat Effect.All details about the Poise and Stagger are accessible to the UI via the
PoiseAndStagger
View Model.Poise and Stagger is an optional feature, you are not required to use it.
Everytime damage is inflicted, you can optionally apply Poise Damage to the target. Once this damage reaches the Poise threshold, the target is Staggered.
This feature is configured via Attributes, Gameplay Effects and the Stagger Ability.
Managing Poise
Poise is managed by the following Gameplay Attributes, introduced by the Combat Attribute Set.
Poise: The threshold of when a character will stagger.
Poise Damage: Current amount of damage inflicted to the Poise. Once it reaches the threshold, the character will stagger.
Poise Recovery: How much of the Poise Damage is recovered, after a period of time without taking more damage.
Poise Recovery Interval: Interval between an attack and recovery to resume.
tip
Usual Poise Values
It's common to set Poise and Poise Recovery to the same value, so the character can fully recover right away, but you can adjust these values to fit your design.
As for the Poise Damage, an initial value of zero would be common, unless you need a character to have a predefined tendency to be quickly staggered.
During gameplay, these values are affected via Gameplay Effects. The Combat System provides the following Gameplay Effects to manage Poise:
Gameplay Effect | Description |
---|---|
| Applies an amount of damage to the target's Poise. Commonly used in conjunction with Melee or Ranged damage effects. |
| Periodically recovers Poise, by the amount set in the Poise Recovery attribute. |
| Temporarily interrupts recovery. Usually applied in conjunction with Damage Poise. |
tip
Melee and Ranged Damage
The Gameplay Effects provided by the Combat System for Melee and Ranged are subclasses of the Damage Poise Gameplay Effect, so they are already configured to apply Poise Damage.
The Stagger State
Once a Combatant's Poise Damage reaches the threshold represented by the Poise attribute, they will enter the Stagger state.
During this state, a Combatant will not be able to perform any action, becoming highly vulnerable for its duration, which is defined by the StaggerDuration
Gameplay Attribute, introduced by the Combat Attribute Set.
The state is represented by the Staggered Gameplay Effect. The addition or removal of the related Gameplay Tags will activate and cancel the Stagger Ability, which will execute the following:
Interrupt any ongoing actions.
Block any new actions for the duration of the state.
Cancel Poise Recovery.
Looping Animation
For the Stagger State, it is recommended that you use an Animation Montage with a Looping section configured. This is useful since the duration of the Stagger State is dynamic.
The Animation Instance provided by the Combat System, NinjaCombatAnimInstance
already tracks this state, which is exposed by the bStaggered
property.
Gameplay Effects
The Combat System provides many Gameplay Effects used to implement Poise and Stagger.
Tracking Poise and Stagger
To create something like a Progress Bar, representing the current Poise Damage, the provided View Model can be used.
This View Model provides the following values that can be used for Property Binding in Widgets.
Poise: Current value for the Poise Gameplay Attribute.
Poise Damage: Current value for the Poise Damage Gameplay Attribute.
Poise Recovery: Current value for the Poise Recovery Gameplay Attribute.
Poise Recovery Interval: Current value for the Poise Recovery Interval Gameplay Attribute.
Poise Percent: The proportion of Poise Damage, based on Poise, in [0, 1] range.
Is Staggered: Informs if the character is currently staggered.
Stagger Duration: The duration for the Stagger state.