Alter
ValueAdapter_Alter modifies an incoming value using a configurable Modifier and Modify Type.
| Field | Description |
|---|---|
| Modifier | Defines the value used to modify the incoming value. |
| Modify Type | Determines how the Modifier is applied to the incoming value. See Modify Types below. |
Modify Types
| Type | Description |
|---|---|
| Flat | Adds the Modifier directly to the incoming value. Result = Value + Modifier |
| Rate | Changes the incoming value by the Modifier rate. Result = Value × (1 + Modifier) |
| Multiplier | Multiplies the incoming value directly by the Modifier. Result = Value × Modifier |
info
ValueAdapter_Alter has implementations for different value types. The supported value type and the exact behavior of the modification depend on the specific implementation being used.
Example
With an incoming value of 100, all three types reach 110:
| Modify Type | Modifier | Result |
|---|---|---|
| Flat | 10 | 100 + 10 = 110 |
| Rate | 0.10 | 100 × (1 + 0.10) = 110 |
| Multiplier | 1.10 | 100 × 1.10 = 110 |
The Vector3 version works per component: ValueAdapter_Multiply_3DC (Multiplier (4, 0, 4)) turns a knockback direction (0.8, 0.1, 0.6) into a 4 m offset along the ground, (3.2, 0, 2.4).