Relative Stats for Target Stats and Attribute Stats
You can find a video tutorial ▶ here.
A Stat can participate in an Effect in two different roles:
- As the Target Stat, whose value will be modified.
- As an Attribute Stat, whose value is used by a Processor while processing an Effect.
These two roles often require different Relative Stats.
For example, consider the following scenarios:
Assume the Attack Stat has two different Modifier Relative Stats, each designed for a different usage:
AttackModifier— modifies values when Attack is the Target Stat.AttackDamageModifier— modifies outgoing Effects when Attack is used as an Attribute Stat.
Attack10AttackModifierAttackDamageModifierBoth modifiers increase values by 10%, but they serve different purposes and are resolved through different Relative Stat keys.
1. Attack Stat as the Target Stat
The BSModifier Processor uses the Attack Stat as the Target Stat. It resolves the Modifier_Applying Relative Stat, which points to AttackModifier, and increases the incoming value from 5 to 5.5 before applying it to the Attack Stat.
Attack5BSModifierModifier_ApplyingAttack10 → 15.52. Attack Stat as an Attribute Stat
Now consider a different situation. The Effect targets the enemy's HealthStat, while the AttackStat is used only as an Attribute Stat.
During the ASModifier stage of the processing funnel, the Processor evaluates the Attribute Stats attached to the Effect. Because the Attack Stat is being used in this role, it resolves the Modifier_ApplyingAS Relative Stat, which points to AttackDamageModifier.
This increases the outgoing damage from -10 to -11 before the Effect is applied to Health.
Health
Attack-10ASModifierModifier_ApplyingASHealth100 → 89The role of a Stat determines which Relative Stat relationship should be resolved.
Modifier_Applying is scoped to direct Target Stat modification. In scenario 1, BSModifier resolves this key and follows the relationship to AttackModifier.
When Attack is used as an Attribute Stat, it should not reuse Modifier_Applying. Instead, ASModifier resolves Modifier_ApplyingAS, which points to the separate AttackDamageModifier Stat.
This separation is intentional. AttackModifier controls modifications to the Attack Stat itself, while AttackDamageModifier controls modifications to Effects that use Attack as an Attribute Stat.
As shown in the samples, you will often see both Modifier_Applying and Modifier_ApplyingAS Relative Keys.
- Modifier_Applying is resolved by BSModifier when the Stat is used as the Target Stat.
- Modifier_ApplyingAS is resolved by ASModifier when the same Stat is used as an Attribute Stat to modify the Effect value.