Overview
WCGASOverflowSubsystem is a World Subsystem that provides utility functions for implementing overflow mechanics in event-triggered Gameplay Abilities. Overflow occurs when damage or healing exceeds target capacity (overkill/overheal), enabling mechanics like chain reactions, shield conversion, and cascading effects. This subsystem is NOT standalone—it provides utilities for use INSIDE abilities that react to overflow events triggered by GAS's native Gameplay Event system.
Purpose
The Overflow Subsystem provides tools for building overflow reaction abilities by offering:
- Event Data Extraction: Parse overflow magnitude and source ability information from Gameplay Event Data
- Source Ability Filtering: Identify which ability caused the overflow for conditional reactions
- Target Finding: Locate nearby actors for chain reactions (sync and async variants)
- Effect Application: Apply overflow damage/healing to discovered targets with multipliers
- Tag-Based Filtering: Filter overflow reactions by source ability tags for flexible design
How It Works
Overflow Event Flow
- Effect Execution: A
UGameplayEffect executes on a target (damage or healing)
- Overflow Detection: Execution calculation (
UWCGASExecCalc_Damage or UWCGASExecCalc_Healing) detects overflow when magnitude exceeds capacity
- Event Dispatch: Execution calculation sends a Gameplay Event with overflow data via GAS's event system
- Ability Activation: Pre-granted abilities with matching trigger tags (e.g.,
Event.Combat.Damage.Overflow) activate automatically
- Subsystem Usage: Activated abilities use this subsystem's utilities to extract data, find targets, and apply effects
Typical Usage Pattern
Setup Phase: