Description
Adds a value to the specified stat of an entity, applying the object quality performance multiplier and any ModifierComponent modifiers.
Parameters
| Parameter | Description |
|---|
| BaseObject | The entity whose stat is modified |
| S1 | Stat ID to modify (e.g., Hungry, Energy, Cleanliness) |
| S2 | Optional: "{Except}" skips execution entirely; or "min,max" restricts the change to when the current value is within that range |
| F1 | Amount to add (negative values are allowed) |
Examples
| Description | BaseObject | Command | S1 | S2 | F1 |
|---|
| Add 10 to Self's Hungry stat | Self | AddStat | Hungry | | 10 |
| Subtract 5 from Target's Energy stat | Target | AddStat | Energy | | -5 |
| Add 20 to Self's Cleanliness stat only if current value is 0 to 80 | Self | AddStat | Cleanliness | 0,80 | 20 |
| Skip execution (no-op) | Self | AddStat | Hungry | {Except} | 10 |