Overview

WCGASAICombatSubsystem is a World Subsystem that serves as the central coordination point for the AI combat system in the Wonderscape GAS Ally plugin. It automatically initializes for game worlds, tracks all registered combat components using O(1) TSet operations, broadcasts threat information for squad awareness, provides global combat queries for target aggregation, coordinates boss phase transitions, routes combat events to registered listeners, and manages squad formation and command distribution.


Purpose

The AI Combat Subsystem orchestrates all AI combat coordination by providing:


How It Works

Initialization Flow

  1. Subsystem Creation: When a Game/PIE/GamePreview world initializes, this subsystem is automatically created via UE's subsystem lifecycle
  2. Difficulty Subscription: Subscribes to UWCGASDifficultySub::OnDifficultyChanged to reload configurations when difficulty changes
  3. Lazy Configuration Loading: Default threat and squad configurations are loaded on first access (not at startup) to minimize initialization cost
  4. Ready State: Subsystem is now ready to accept component registrations and process combat events