Status Effects
A Status Effect is any temporary or permanent modifier applied to an entity. This includes buffs (positive effects), debuffs (negative effects), and crowd control (movement/action restrictions).
Buffs
Positive effects like healing, speed boosts, damage increases, shields.
Debuffs
Negative effects like poison, curses, stat reductions, DoT damage.
Crowd Control
Movement/action restrictions like stun, freeze, silence, root.
Each effect is defined by a StatusEffectDefinitionScriptableObject asset. At runtime, when applied to a target, an instance is created with its own duration timer, stack count, and tick tracker.
Categories
Categories group related effects together and provide shared configuration like UI colors and concurrent limits.
Category Properties
| Display Name | Name shown in UI |
| Category Type | Buff, Debuff, or CrowdControl |
| Color | UI tint color for icons |
| Max Concurrent | Max active effects of this category (0 = unlimited) |
| Replace Oldest | When at limit, replace oldest effect? |
| Exclusive | Only one effect of this category at a time; the higher Priority wins (v1.2) |
| Equal Priority Replaces | When Exclusive: does an equal Priority replace (true) or get blocked (false)? |
Duration Modes
Timed
Effect expires automatically after the specified duration. Most common for buffs and debuffs.
Duration: 10 secondsPermanent
Effect never expires on its own. Must be manually removed via dispel, cleanse, or API call. Useful for auras, passive abilities, and persistent states.
Stacking Rules
Defines what happens when the same effect is applied to a target that already has it active.
| Mode | Behavior | Use Case |
|---|---|---|
| None | Application rejected if already active | Unique buffs, toggles |
| Stack | Adds a stack (up to max), independent timers | Bleed, combo points |
| Refresh | Resets duration to full, no stacking | Standard buffs/debuffs |
| RefreshAndStack | Resets duration AND adds a stack | Stacking poisons |
| Extend | Adds the full duration on top of the remaining time (no cap) | Extendable shields |
Tick System
The tick system handles periodic events like damage over time, healing over time, or any repeating logic during an effect's lifetime.
Tick Configuration
| Has Tick | Enable periodic tick events |
| Tick Interval | Seconds between ticks (e.g., 1.0) |
| Tick On Apply | Fire first tick immediately on application |
| Max Ticks | Limit total ticks (0 = unlimited until duration expires) |
Subscribe to the OnEffectTicked event or use the GC2 Event On Any Effect Ticked to execute logic on each tick.
Immunity System
The immunity system prevents certain effects from being applied to a target. Supports both permanent and temporary immunities.
Permanent Immunity
Defined via ImmunityProfile ScriptableObject. Assign to StatusEffectManager.
- • Immune to specific effects
- • Immune to entire categories
- • Immune to effects with specific tags
Temporary Immunity
Granted at runtime via API or Visual Scripting. Expires after a specified duration.
- • AddTemporaryImmunity(effect, duration)
- • AddTemporaryImmunityByCategory(cat, duration)
- • AddTemporaryImmunityByTag(tag, duration)
Cooldown System
Cooldowns prevent effects from being re-applied too quickly. Perfect for balancing powerful buffs that shouldn't be spammed.
Cooldown Configuration
| Has Cooldown | Enable cooldown for this effect |
| Cooldown Duration | Seconds before effect can be reapplied |
| Cooldown Starts On Apply | If true, cooldown starts when applied. If false, starts when effect ends. |
Cleanse Types
Cleanse types control which dispel abilities can remove which effects. This allows for strategic depth - a magic dispel won't cure poison!
| Type | Description |
|---|---|
| Any | Can be removed by any dispel ability |
| Magic | Only removed by magic dispels (arcane curses, enchantments) |
| Physical | Only removed by physical cleanses (bandages, rest) |
| Curse | Only removed by curse-breaking abilities |
| Disease | Only removed by disease cures |
| Poison | Only removed by antidotes |
| Undispellable | Cannot be removed by any dispel (only expires naturally) |
VFX & Audio Feedback
Each effect can spawn visual effects and play sounds at key moments.
VFX Hooks
- • Apply VFX: Spawns when effect is applied
- • Remove VFX: Spawns when effect ends
- • Tick VFX: Spawns on each tick
- • VFX Lifetime: Auto-destroy delay
Audio Hooks
- • Apply Sound: Plays when effect starts
- • Remove Sound: Plays when effect ends
- • Tick Sound: Plays on each tick
- • Volume: Master volume (0-1)
Aura System
The StatusEffectAura component automatically applies effects to entities within a radius. Perfect for healing zones, poison clouds, or buff auras around NPCs.
Aura Configuration
| Effect | The status effect to apply to targets |
| Radius | Range of the aura in world units |
| Target Mode | All, Allies Only, Enemies Only, or Self Only |
| Remove On Exit | Remove effect when targets leave the aura |
| Update Interval | How often to scan for targets (seconds) |
Effect Interactions (Reactions)
Interactions let effects react to each other: Wet + Shock → Electrocuted, Burn melts Frozen, Oil + Fire → Explosion. A rule fires when an Incoming effect is applied while a matching Present effect is already active on the target. Rules are plain ScriptableObjects, grouped in an EffectInteractionSet.
1. Match
Incoming and Present matchers select effects by Definition, Category, Category Type, Tag or Any. Optional minimum stack count on the present effect.
2. Resolve
Incoming: Apply or Block. Present: Keep, Remove, Remove Stacks or Refresh, plus an optional duration bonus.
3. Result
Optionally apply a Result Effect (with the present effect's stacks transferred), spawn reaction VFX and play a sound. The On Effect Reaction event fires.
Evaluation Rules
- • Rules run after immunity, cooldown and resistance checks and before stacking, so a re-applied effect can trigger a rule too (Burn + Burn → Inferno).
- • Rules are evaluated by descending Priority; only the first matching rule fires.
- • Chance (0–1) lets a rule fire probabilistically. Disabled rules are skipped.
- • A Result Effect goes through the normal apply pipeline and can chain into further rules (depth-limited to 4).
- • A set is assigned per
StatusEffectManager; managers without a set fall back toEffectInteractionSet.Global.
Priority & Exclusive Categories
Every effect definition has an integer Priority (default 0). Mark a category as Exclusive and only one effect of that category can be active at a time:
| Incoming vs. Active | Result |
|---|---|
| Higher Priority | Active effect is dispelled, incoming is applied (Stun 10 replaces Slow 1) |
| Lower Priority | Incoming is blocked, On Effect Blocked fires |
| Equal Priority | Blocked by default; replaces when Equal Priority Replaces is enabled |
| Same Definition | Handled by the Stacking Mode as usual (Refresh, Stack, ...) |
GetHighestPriorityEffect(category) or the Category Priority At Least condition.Resistance & Apply Chance
Effects no longer have to land every time. Three optional settings on the definition control it; a failed roll fires On Effect Resisted (not Blocked) and nothing is applied.
| Apply Chance | Base probability 0–1 that the application succeeds (1 = always) |
| Resist Chance Stat | GC2 Stat on the target, read as a 0–100 % chance to fully resist (e.g. "Poison Resistance") |
| Duration Resist Stat | GC2 Stat on the target, read as a 0–100 % reduction of the duration (25 → 25 % shorter). Timed effects only |
Source Tracking
Every instance can remember who applied it. The Apply Status Effect instruction has a Source field (default: Self, i.e. the object running the instruction), auras report their owner, and code can callApplyEffect(definition, sourceGameObject).
- • Re-applying with a new source updates the instance (last non-null applier wins)
- • Query with Has Effect From Source, remove with Remove Effects From Source
- • Instruction lists on the definition receive the source as Target; the On Effect Reaction event passes it as the trigger's Target
- • Sources are scene objects and are intentionally not saved by StatusEffectRemember