Injector
Injectors contribute to building a Stat's final value during the Stat update process.
During each Stat update, the Stat's Modified Value is initialized from its Raw Value (plus Modifiers). The assigned Injectors are then applied sequentially according to their Injection Order. See How Stat Values Are Evaluated.
There are two families:
| Family | Value comes from | Asset | Definition asset |
|---|---|---|---|
| Injector | a constant on the asset | Injector Model | Injector Definition |
| Linker | another Stat (the Injector Stat) | Linker Model | Linker Definition |
Attaching them
| How | Lifetime |
|---|---|
| In a Stat Definition's Injectors list (an Injector or Linker Definition) | always, on every Actor that has the Stat |
| With an Injector Effect or a Linker Effect | while the Effect's Modifier lives; Temporary + Managed By Code Linker Effects in an Actor's Effect Bundle live as long as the Actor |
Injectors added by Effects can be removed by tag with an Injector Remover Effect.
Older versions called Linkers Stat Injectors (StatInjectorModel_*, StatInjectorDefinitionModel). They are now LinkerModel_* and LinkerDefinitionModel. The separate Add, Multiply and Rate Stat Injectors were merged into Combine, and the Add / Multiply / Rate Value By Condition ones into Combine By Condition.
Linking Stats from the Power Editor
Power Editor › Stat › Link To Stat links a Stat to another in one step. When both Stats are in the same Environment it adds a Linker Definition to the target Stat's Injectors. When they are in different Environments it adds a Linker Effect to an Effect Bundle Stat of the source Environment ({SourceEnv}To{TargetEnv}Linker, created when missing), so only Actors that have the source Environment get the link.
Example
An Injector multiplies PhysicalAttack by 2, and a Linker adds Strength to it. Both sit in the Stat Definition's Injectors list, so they run in Injection Order on every update:
PhysicalAttack10
InjectorDefinition_Double (order 0)
LinkerDefinition_StrengthToAttack (order 1)InjectorDefinition_DoublePhysicalAttackCombine, Multiplier 20LinkerDefinition_StrengthToAttackPhysicalAttackCombine, Flat — Injector Stat: Strength1| Step | Value |
|---|---|
| Raw Value | 10 |
| Injector (× 2) | 20 |
Linker (+ Strength 5) | 25 — the Modified Value |
When Strength changes to 8, PhysicalAttack updates on its own to 28.