Overview

WCGASResistanceSubsystem is a Game Instance Subsystem that serves as the central coordinator for the immunity and resistance system in the Wonderscape GAS Ally plugin. It automatically manages per-actor immunity GameplayEffects based on each actor's UWCGASResistanceComponent configuration, maintains isolated immunity states with unique FActiveGameplayEffectHandle per actor, handles dynamic immunity tag changes through GE refresh cycles (remove + reapply), integrates with the Diminishing Returns system to track effect applications and enforce DR-based immunity, and provides delegate bindings to ASC effect application events for automatic DR history recording.


Purpose

The Resistance Subsystem orchestrates all immunity and resistance behavior by providing:


How It Works

Initialization Flow

  1. Subsystem Startup: When the GameInstance initializes, this subsystem automatically loads via UE's subsystem lifecycle
  2. Load Immunity Effect Class: Retrieves the configured immunity GE class from Project Settings (if configured)
  3. Prepare Registries: Initializes empty RegisteredComponentsImmunityStates, and EffectAppliedDelegateHandles maps
  4. Ready for Registration: Components that initialize after the subsystem will register automatically via their BeginPlay

Component Registration Flow