Overview
WCGASHeritageComponent is a comprehensive ActorComponent that serves as the per-actor state tracker for character identity systems in the Gameplay Ability System. It manages three interconnected progression pillars: Classes (character archetypes that define stat growth and abilities), Races (static bonuses applied at character creation), and Subraces (race specializations with additional modifiers). The component supports multi-class progression, hybrid races, race blessings, class mastery tracking, validation rules, and save/load persistence.
Core Functionality
- Tracks active class tags per actor with support for single-class, dual-class, and unlimited multi-class configurations
- Manages race identity with support for single races and hybrid (dual-race) characters
- Supports subrace selection per race (e.g., High Elf, Wood Elf for Elf race)
- Tracks class mastery progression ("how many levels gained with each class")
- Manages race blessings with stack counts and timestamps
- Provides Blueprint-friendly query APIs for UI widgets, gameplay logic, and AI systems
- Validates class/race tag additions through subsystem rules
- Integrates with LevelingComponent for stat growth calculations
- Supports save/load persistence for complete heritage state
- Caches AbilitySystemComponent and LevelingComponent references for performance
- Replicates all heritage state to clients for multiplayer compatibility
- Registers automatically with WCGASHeritageSubsystem for central coordination
Initialization Flow
Automatic Initialization (Default Behavior):
- Component reaches BeginPlay