Skip to main content

Execute_AddStat

Description

Adds a value to the specified stat of an entity, applying the object quality performance multiplier and any ModifierComponent modifiers.

Parameters

ParameterDescription
BaseObjectThe entity whose stat is modified
S1Stat ID to modify (e.g., Hungry, Energy, Cleanliness)
S2Optional: "{Except}" skips execution entirely; or "min,max" restricts the change to when the current value is within that range
F1Amount to add (negative values are allowed)

Examples

DescriptionBaseObjectCommandS1S2F1
Add 10 to Self's Hungry statSelfAddStatHungry10
Subtract 5 from Target's Energy statTargetAddStatEnergy-5
Add 20 to Self's Cleanliness stat only if current value is 0 to 80SelfAddStatCleanliness0,8020
Skip execution (no-op)SelfAddStatHungry{Except}10