Skip to main content

State Based Effect

You can find a video tutorial for State Based Effects ▶ here.

A State Based Effect Stat automatically triggers an Effect when the configured Stat condition is satisfied.

It can be used to implement passive gameplay mechanics such as auras, low-health effects, status effects, or conditional abilities that activate in response to an Actor's current state.

State Based Effect Signature​

Fields​

FieldDescription
Skip Initial EvaluationBy default the condition is evaluated as soon as the Stat is linked, so an Actor that already satisfies the condition receives the Effect immediately. Enable this to skip that first evaluation and react only to later changes. See Initial Evaluation below.
Use Multi Stat CheckEvaluates the activation condition using multiple Stats instead of a single Stat.
Single Stat CheckDefines the condition evaluated against a single Stat.
Multi Stat CheckDefines the condition evaluated against multiple Stats.
ToggleableAllows the State Based Effect to be enabled or disabled based on the value of a Toggle Stat.
Toggle Stat KeyThe Stat Key of the Toggle Stat. The referenced Stat must be an Int Stat.
Toggle On Value TypeDetermines when the State Based Effect is active. See Toggle On Value Types below.
Effect TargetDetermines which Actor or Actors receive the triggered Effect. See Effect Targets for the available target types.
Target RelationSpecifies which Relation is used when Effect Target is set to Relation State.
Team FlagsDefines the target teams using bitwise Team Flags.
Custom TargeterDefines a custom target selection model.
Targeting FilterFilters Actors selected through multi-targeting methods such as Relation State or Team Flags.
Target Actor Stat KeyThe Stat Key of the Actor Stat used when Effect Target is set to Actor Stat.
Effect Source AsDetermines which Actor is assigned as the Source of the triggered Effect.
Custom Effect SourceDefines a custom Effect source provider.
Effect Source Actor Stat FromDetermines which Actor provides the Actor Stat when Effect Source As is set to Actor Stat.
Custom Actor For Actor StatDefines the custom Actor when Effect Source Actor Stat From is set to Custom.
Effect Source Actor Stat KeyThe Stat Key used to retrieve the Actor Stat.
Effect Apply TypeDetermines how the triggered Effect is applied. See Effect Apply Types below.
Environment IdThe Environment Id to which the triggered Effect is sent.
Additional EffectsMore Effects applied on the same condition, each with its own Effect Pack, Effect Target (and its fields), Effect Source As (and its fields) and Environment Id. They are applied after the Stat's own pack and, for Apply Once and Refresh On Update, removed with it when the condition is lost. Use one Stat with entries instead of several Stats that copy the same condition.

Initial Evaluation​

A State Based Effect describes a state, not an event: while this condition holds, this Effect is applied. So the condition is evaluated once when the Stat is linked. An Actor that spawns already below 50% Health gets its low-health buff immediately, without waiting for Health to change.

Sometimes that isn't what you want. If the condition is already true in the Actor's default state, the Effect would fire on spawn for everyone.

Example. Glacier Pulse freezes enemies, and the thaw slow is driven by a Frozen == 0 condition. Every enemy starts with Frozen = 0, so the initial evaluation would slow the whole encounter the moment it spawns. What you actually want is the transition — Frozen going from 1 back to 0.

Enable Skip Initial Evaluation for that case. The Stat then ignores the state it is linked in, and only reacts once a tracking Stat is updated.

Skip Initial EvaluationBehaviour
Disabled (default)Level-triggered — the Effect applies immediately if the condition is already satisfied
EnabledEdge-triggered — the Effect applies only when a later update makes the condition satisfied

Toggle On Value Types​

TypeDescription
On ZeroThe State Based Effect is active when the Toggle Stat's value is 0.
On PositiveThe State Based Effect is active when the Toggle Stat's value is greater than 0.

Effect Apply Types​

TypeDescription
Apply OnceApplies the Effect when the condition becomes true. When the condition becomes false, the applied Effect is removed.
Refresh On UpdateApplies the Effect when the condition becomes true. While the condition remains true, each update refreshes it: the previously applied Effect is removed and a new one is applied.
PersistentApplies the Effect every time the condition is updated while it remains true.