Project Settings
The weapon subsystem discovers assets through configured database assets. Creating a master or part in the Content Browser alone does not register it.
Configure the Databases
- Create a
PDA_WeaponDatabaseasset for Weapon Masters. - Fill its
Tablewith non-emptyFNameIDs and soft references to your master assets. - Create a
PDA_WeaponPartsDatabaseasset for attachments and fill itsTablein the same way. - Open Edit → Project Settings → Cube Game Systems → Weapon SubSystem.
- Add the master database to
WeaponMasterDBsand the part database toWeaponPartsDBs. - Configure
StatModifierDBsandSideEffectsDBswhen using those database lookups. - Save the assets and configuration before starting a new play session.
Use each master's WeaponID and each part's PartID as its database key. IDs should be unique across asset types: the shared WeaponDBTypeLookup routes each ID to one asset type. Avoid using the same ID for a master and a part.
The database assets provide editor actions such as RebuildRegistry. After changing registry entries, check the actual Table and its asset references.
Startup and Loading
UWeaponSubsystem is a Game Instance subsystem. It creates the data manager and runtime builder during initialization. The data manager loads configured databases asynchronously and builds lookup tables from their entries.
Master and part assets are resolved on demand. Database initialization is separate from build validation and runtime mesh assembly. Do not assume that the databases are ready merely because Character BeginPlay has fired.
Use DumpWeaponDBLookup and DumpWeaponLookupTables on the subsystem to inspect registration and loaded assets. The current initialization-completion function does not expose a Blueprint readiness event.
Gameplay Tags and Weapon Sockets
Register the slot tags used by your assets in Project Settings → Gameplay Tags. Master and part SubSlotSockets map gameplay tags to mesh socket names.
For the editor action BakeMeshSockets, use socket names such as:
| Mesh socket | Gameplay tag |
|---|---|
Slot_Barrel | Cube_Weapon.Slot.Barrel |
Slot_Barrel_Muzzle | Cube_Weapon.Slot.Barrel.Muzzle |
The master's bake action requires the complete derived tag to exist. The part's bake action uses the deepest registered tag along that path. Both actions clear the existing SubSlotSockets map before rebuilding it.
These weapon-part sockets differ from character sockets such as hand_r_weapon or back_weapon.
Mesh Component Capacity
The settings contain default static and skeletal component counts for Base, Melee, Range and Throwable actors. Allocate enough components for the master and all installed parts of each mesh type.
Restart the editor after changing these counts. The actor constructors create these components as default subobjects; changing the configuration does not resize an existing actor.