Flow Stats
Create a Calculated Stat
Build Attack Power from Strength and Weapon Power with a Reverse Polish Notation formula.
- Audience
- Gameplay designers and developers
- Time
- 15 minutes
- Requires
- A Flow Stats Profile assigned to a FlowStats component
- Modules
- Flow Stats
On this page
Goal
Create an Attack Power Stat whose Formula contribution is Strength × 2 + Weapon Power, then prove that it recalculates when Strength changes.
Prerequisites
- Complete Build Your First Flow Stats Profile.
- Keep one
FlowStatscomponent assigned to that Profile. - Have a graph route available if you want to change Strength during Play Mode.
What You Will Build
Strength Base = 10
Weapon Power Base = 5
Attack Power Base = 0
Attack Power Formula Contribution = Strength × 2 + Weapon Power
Starting Attack Power Raw = 0 + (10 × 2 + 5) = 25
Steps
1. Create the source Stats
Create three Flow Core > Stats > Stat assets:
| Stat | Default Base Value |
|---|---|
| Strength | 10 |
| Weapon Power | 5 |
| Attack Power | 0 |
Add all three to the assigned Profile and validate it.
2. Author the Attack Power formula
Open Attack Power and add these Reverse Polish Notation tokens in order:
- Value bound to the Strength Stat.
- Constant
2. - Operator
Multiply. - Value bound to the Weapon Power Stat.
- Operator
Add.
RPN places each operator after its operands, so the stack evaluates Strength 2 Multiply first and then adds Weapon Power.
3. Inspect the starting result
Enter Play Mode and inspect Attack Power in Live Runtime. With no modifiers, the values should be:
Formula Contribution = 25
Raw = Base 0 + Formula Contribution 25 = 25
Effective = 25
Formula contribution is additive to Base. If you set Attack Power Base to 3, the same formula produces Raw 28, not 25.
4. Change Strength at runtime
In a Flow Graph, add Stats Change Stat Base and target the same FlowStats owner. Select Strength and use Delta 1, then run that route once.
Strength becomes 11. Attack Power recalculates to 0 + (11 × 2 + 5) = 27.
The formula runtime itself remains standalone. A FlowCoreProcess is needed here only because this verification uses a graph Instruction to trigger the change.
Verify the Result
Common Mistakes
| Symptom | Check |
|---|---|
| The formula is invalid | Confirm the five tokens use the exact RPN order and leave one result on the stack. |
| Attack Power stays at zero | Add all referenced Stats to the same Profile and reinitialize the runtime. |
| The result is higher than expected | Remember that Formula contribution is added to Attack Power Base before modifiers. |
| Strength changes but Attack Power does not | Confirm the formula references the same Strength definition and the Instruction targets the intended owner. |
| Asset edits do not update Play Mode | Exit and re-enter Play Mode, or explicitly rebuild the runtime snapshot. |
What You Built
You created a dependency-aware Stat whose Formula contribution is evaluated from two other Stats. A supported runtime change to Strength now recalculates Attack Power automatically.
Next Steps
Add a reusable Regeneration Status Effect, then display calculated and mutable values through Flow Stats UI components.

