Chain
Chain Adapters allows multiple value transformations to be applied sequentially to a Stat's value.
The Chain Adapter can optionally use another Stat Value Adapter as its initial value source. The resulting value is then passed through each configured Value Adapter in order, with the output of each adapter becoming the input of the next one.
| Field | Description |
|---|---|
| Stat Adapter | The Stat Value Adapter used to obtain the initial value. When not assigned, the Stat's current value is used directly. |
| Adapters | Defines the Value Adapters applied sequentially to the value. Each adapter receives the result of the previous adapter. |
Processing Order
The value is processed in the following order:
- If Stat Adapter is assigned, its result is used as the initial value.
- Otherwise, the Stat's current value is used directly.
- Each Value Adapter in Adapters is applied in array order.
- The final adapter's result becomes the final adapted value.
Stat Value → Adapter 1 → Adapter 2 → Adapter 3 → Final Value
This allows multiple value transformations to be combined into a single Stat Value Adapter.
Example
The Kodes melee mob dashes toward the player before it attacks. StatValueAdapter_Adapter_MeleeDashDirectionChain_R3D turns the mob's facing into a flat dash offset:
| Field | Value |
|---|---|
| Stat Adapter | StatValueAdapter_Adapter_MeleeDashDistance_R3D — Alter Vector3, Multiplier (8, 8, 8) on the facing Direction |
| Adapters [0] | ValueAdapter_Adapter_MeleeDashProjectPlane_R3D — Project On Plane, normal (0, 1, 0) |
Direction (0.5, −0.3, 0.8) → × 8 → (4, −2.4, 6.4) → flattened → (4, 0, 6.4): the mob dashes along the ground even when it faces slightly down.