CSKILLUMODULE

Overview

The CSKILLUMODULE is a skill management system for CCHARUMODULE actors. It provides a data-driven skill pipeline where skills are defined in DataTables, resolved at runtime, and executed through either C++ implementation classes or Blueprint lambda overrides.

Depends on CCOREUMODULE.

Functionalities Overview
Data Skill definition structures (FCSkillDataStruct, FCSkillMetadataStruct) stored in DataTables
Manager UCSkillManager subsystem that resolves, caches and executes skills
Base UCAbstractSkill abstract class for C++ skill implementations
Blueprint Blueprint-callable functions for skill retrieval and consumption (UCSkillBPLibrary, UCSkillManager)

Architecture

The skill execution pipeline works as follows:

  1. Skills are defined as rows in a UDataTable using FCSkillDataStruct (execution class, specific data) and FCSkillMetadataStruct (label, cooldown, icon, color).
  2. UCSkillManager is a UGameInstanceSubsystem registered as a singleton via CNAME_Singleton_SkillManager.
  3. When consumeSkill is called with a skill name, the manager looks up the FCSkillDataStruct row from the coordinator DataTable.
  4. Execution follows a two-step priority: first, a Blueprint lambda override (whatToDoOnSkill) is checked; if not set, the manager instantiates (or reuses from cache) the C++ UCAbstractSkill subclass referenced by skillClass.
  5. C++ skill classes inherit UCAbstractSkill and implement applySkill. They can access skill-specific DataTable rows via withSpecificData<T>.
  6. The SkillUtility static helper provides a global entry point to consume skills from anywhere without direct manager access.