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:
- Skills are defined as rows in a
UDataTableusingFCSkillDataStruct(execution class, specific data) andFCSkillMetadataStruct(label, cooldown, icon, color). UCSkillManageris aUGameInstanceSubsystemregistered as a singleton viaCNAME_Singleton_SkillManager.- When
consumeSkillis called with a skill name, the manager looks up theFCSkillDataStructrow from the coordinator DataTable. - 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++UCAbstractSkillsubclass referenced byskillClass. - C++ skill classes inherit
UCAbstractSkilland implementapplySkill. They can access skill-specific DataTable rows viawithSpecificData<T>. - The
SkillUtilitystatic helper provides a global entry point to consume skills from anywhere without direct manager access.