Modify regeneration rates, delays, or completely disable regeneration.
Overview
The Modifier System includes built-in support for modifying how Vital attributes regenerate. This is essential for ARPG-style status effects like Poison (disable regen) or Blessing (faster regen).
Completely prevent regeneration while the modifier is active.
// Poison effect - no health regen
group.disableRegeneration = true;
Note: disableRegeneration takes precedence over rate/delay modifications. If set to true, the attribute will not regenerate regardless of other bonuses.
Stacking Behavior
Multiple modifiers affecting regeneration stack according to their types:
Flat bonuses: Add together (+5 + +3 = +8)
Percentage bonuses: Add together (+50% + +25% = +75%)
Multipliers: Multiply together (x1.5 x 1.2 = x1.8)
Disable flags: Any single disable = no regen
Final Value Calculation
The calculation order for regen rate and delay modifiers:
// Regen Rate Formula
Final Rate = (Base Rate + Total Flat Bonuses) × (1 + Total Percentage / 100) × Product of Multipliers
// Example: Base 10 HP/sec + 5 flat + 50% + x1.5 multiplier
Final Rate = (10 + 5) × (1 + 50/100) × 1.5
= 15 × 1.5 × 1.5
= 33.75 HP/sec
// Regen Delay Formula (same structure)
Final Delay = (Base Delay + Total Flat Bonuses) × (1 + Total Percentage / 100) × Product of Multipliers
// Example: Base 5 sec delay - 2 flat - 50% delay
Final Delay = (5 + (-2)) × (1 + (-50)/100) × 1.0
= 3 × 0.5
= 1.5 seconds
Note: If disableRegeneration = true on ANY active modifier, the attribute will not regenerate regardless of other bonuses. The disable check happens before any calculations.