Purpose:
This is an abstract base class that allows you to implement any race system imaginable for your RPG/character system. Whether you want simple single races (Human, Elf, Dwarf), hybrid multi-race combinations (Half-Elf, Half-Orc), subraces with regional or bloodline variants (High Elf, Wood Elf, Drow), or blessing-enhanced racial traits—you create Blueprint children of this class to define the bonuses and behaviors for each race type.
What It Does:
When you create a Blueprint child class and configure its properties, this system:
- Provides one-time static bonuses - Unlike classes that grant per-level rewards, races apply all their bonuses once during character initialization. This includes attribute bonuses, racial abilities, and passive effects that define your character's heritage.
- Supports hybrid (multi-race) characters - A character can have both a primary and secondary race (e.g., Half-Elf = Elf + Human). The system calls each race's rules independently, then combines the results based on configurable Combine Rules (Additive, Halved, Maximum, PrimaryOnly, etc.).
- Enables subrace specialization - Each race can have multiple subraces (e.g., Elf → High Elf, Wood Elf, Drow). Subraces provide additional bonuses on top of base race bonuses, allowing fine-grained character customization.
- Handles blessing-modified bonuses - Blessings are stackable modifiers granted at runtime (quest rewards, shrine visits, NPC blessings). The
Calculate Blessing Bonus function lets races respond to specific blessings with race-specific enhanced effects.
- Provides lifecycle hooks -
On Race Applied and On Race Removed events allow you to grant starting equipment, trigger visual transformations, log analytics, or handle race-change mechanics.
- Validates race combinations -
Validate Race Addition lets you enforce design rules like "no Vampire + Werewolf" (incompatible curses), "Dragonborn requires Dragon Ancestry achievement," or "maximum 2 simultaneous races."
- Integrates seamlessly with GAS - All rewards (abilities, effects, stats) are applied directly to the actor's Ability System Component. Attribute bonuses are converted to Gameplay Effects that modify attributes. The race system enhances GAS without replacing any of its core functionality.
- Uses soft references for optimization - All ability and effect references use
TSoftClassPtr<> to avoid loading assets until they're actually needed, improving memory usage and load times.
How It's Used:
Step 1: Create Your Race Data Blueprint
- In Content Browser, Right-click → Blueprint Class
- Search for and select WCGASRaceData as parent class
- Name it descriptively (e.g.,
BP_HumanRaceData, BP_ElfRaceData, BP_HalfElfRaceData)
Step 2: Configure Race Identity Properties