Skip to main content
Flow Core Documentation
Menu

Flow Stats

Building a Status Effect

Create a stacking Regeneration effect that restores a Health Resource over time.

Audience
Gameplay designers and developers
Time
20 minutes
Requires
A FlowStats Profile containing a Health Resource
Modules
Flow Stats
On this page

Goal

Create a reusable Regeneration Status Effect. Three aggregate stacks will restore two Health per stack after each one-second interval, for a total of six Health per tick.

Prerequisites

  • A FlowStats component with an assigned Profile.
  • A Health Resource with Minimum 0, Maximum 100, and Default Initial Normalized 0.5.
  • Familiarity with the Profile and Resource workflow from Build Your First Flow Stats Profile.

If you are continuing with the Standalone Stats Profile from that tutorial, change its Health Profile Value from 0.6 to 0.5 before entering Play Mode. This walkthrough deliberately starts at 50 / 100 so the first six-point tick remains visible.

What You Will Build

Health: 50 / 100
Regeneration: 3 aggregate stacks
Periodic contribution: +2 Health per stack every 1 second
Observed tick: +6 Health, clamped at 100

Three Regeneration stacks restore Health from 50 to 56 after one tick.

Steps

1. Create Regeneration

Create Flow Core > Stats > Status Effect and name it Regeneration.

In its Main settings, use:

FieldValue
Duration ModeInfinite
Time ModeScaled
Mode, under StackingAggregate
Maximum Stacks3
ReapplyAdd Stack
Tick PhaseAfter Interval

After Interval waits for one complete interval before the first periodic contribution.

Regeneration uses infinite duration, aggregate stacking, and an after-interval tick.

2. Add the periodic Resource contribution

Open Effect Contributions and add one periodic Resource operation:

FieldValue
Target ResourceHealth
OperationAdd
Value2
Interval Seconds1
Contribution ModePer Stack

Per Stack multiplies the operation by the aggregate stack count. Three stacks therefore add 2 × 3 = 6 Health whenever the interval is due.

Leave Modifiers and Continuous Operations empty for this focused tutorial.

A periodic Resource contribution adds two Health per stack every second.

3. Permit and apply the Effect

Open the assigned Profile and expand Effects.

  1. Leave Effect Filter Mode on None for this focused tutorial. This permits every compatible Status Effect, so no filter entry is required.
  2. Add Regeneration to Initial Effects with Stack Count 3.
  3. Validate the Profile.
  4. Enter Play Mode and inspect Live Runtime on the FlowStats component.

For a later runtime-driven version, remove the Initial Effect and apply Regeneration with Stats Apply Status Effect. If the Profile uses Whitelist, Regeneration must be in Allowed Effects. If it uses Blacklist, Regeneration must not be in Blocked Effects.

Verify the Result

Change Contribution Mode to Once and repeat the test. Each due operation should add two Health regardless of stack count. This confirms that stack ownership and contribution scaling are separate choices.

Common Mistakes

SymptomCheck
The Effect is blockedCheck Effect Filter Mode. Whitelist needs an Allowed Effects entry; Blacklist must not contain Regeneration.
Health increases by only twoConfirm three stacks are active and Contribution Mode is Per Stack.
Health changes immediatelyUse Tick Phase After Interval, not On Apply.
Health does not start at 50Confirm the cached range is 0–100 and Default Initial Normalized is 0.5.
Profile validation failsCheck missing assets, duplicate Stable IDs, invalid bounds, and contribution targets.
Editing the Effect changes no live valuesExit and re-enter Play Mode, or explicitly rebuild the runtime snapshot.

What You Built

You created an infinite, aggregate Status Effect with three stacks and a native periodic Resource contribution. The Profile permits it through its Effect Filter and applies it as starting runtime data.

Next Steps

Remove Regeneration from Initial Effects and apply it from gameplay with Stats Apply Status Effect. Then surface Health and active Effects in a gameplay UI.