Stat Scaler
Returns a multiplier calculated from one or more Stats.
Used by Modifier and ConditionalModifier processors.
A Modifier or Conditional Modifier Stat turns on Use Scaler in its signature, then picks a Single Stat Scaler (one Stat + a scaler) or, with Use Multi Stat Scaler, a Multi one. The Modifier's value is multiplied by the scaler's result before it is applied.
Example
+20 % damage, scaled by how full the rage bar is. A Modifier Stat RageDamageBonus with value 0.2 (Rate), Use Scaler on, Stat Scaler = the Source's Rage through a Map Value scaler (0–100 → 0–1):
Rage | Scaler | Bonus applied |
|---|---|---|
0 | 0 | +0 % |
50 | 0.5 | +10 % |
100 | 1 | +20 % |
Custom scalers
Derive from StatScalerModel for one Stat or MultiStatScalerModel for several Stats, then override the typed method for the value you return: GetFloatScaler, GetIntScaler, GetVector2Scaler or GetVector3Scaler.
| Base class | Example signature |
|---|---|
StatScalerModel | float GetFloatScaler(IStatBase stat, IActorProvider actorProvider, bool canLog) |
MultiStatScalerModel | float GetFloatScaler(List<IStatBase> stats, bool canLog) |
Forward canLog to nested adapters and lookups so they follow the caller's log gate.