Purpose:

This is an abstract base class that allows you to implement subrace variants within a race system for your RPG/progression game. Whether you want racial subtypes (High Elf, Wood Elf, Drow), regional variants (Highlander Human, Coastal Human), bloodline variations (Noble Dwarf, Mountain Dwarf), or any other secondary heritage distinction—you create Blueprint children of this class to define the unique bonuses, abilities, and effects for each subrace.


What It Does:

When you create a Blueprint child class and configure its properties, this system:

  1. Provides additional bonuses on top of base race - Subraces are children of races, adding specialized stat bonuses, abilities, and effects that stack with the parent race's rewards. A High Elf gets both the base Elf bonuses AND the High Elf-specific bonuses.
  2. Supports hybrid character subraces - Each race in a hybrid character can have its own independent subrace. A Half-Elf/Half-Human hybrid can be specifically a High Elf + Highlander Human, with each subrace contributing its unique bonuses.
  3. Validates subrace assignments - The Validate Subrace Assignment function lets you enforce design rules like level requirements, story flag prerequisites, or specific class combinations before allowing a subrace to be selected.
  4. Provides lifecycle hooks - On Subrace Applied and On Subrace Removed events allow you to grant subrace-specific equipment, trigger visual effects, revert appearance changes, or handle subrace transitions at runtime.
  5. Integrates seamlessly with GAS - All bonuses (abilities, effects, attribute rewards) are applied directly to the actor's Ability System Component. The subrace system enhances GAS without replacing any of its core functionality.
  6. Grants one-time bonuses on assignment - Designers can configure Attribute RewardsAbilities To Grant, and Effects To Apply directly on the subrace data asset. These bonuses are applied once when the subrace is assigned—after base race bonuses are applied.
  7. Uses soft references for performance - Icons, abilities, and effects use TSoftObjectPtr and TSoftClassPtr to avoid loading assets until they're actually needed, supporting lazy loading patterns.
  8. Belongs to parent race hierarchy - Each subrace is added to a parent UWCGASRaceData::AvailableSubraces array, establishing clear parent-child relationships. The parent race can require subrace selection via bRequiresSubrace.

How It's Used:

Step 1: Create Your Subrace Data Blueprint

  1. In Content Browser, Right-click → Blueprint Class
  2. Search for and select WCGASSubraceData as parent class
  3. Name it descriptively (e.g., BP_HighElfSubraceBP_WoodElfSubraceBP_DrowSubrace)

Step 2: Configure Subrace Identity Properties