Skip to main content

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​

  1. Create a PDA_WeaponDatabase asset for Weapon Masters.
  2. Fill its Table with non-empty FName IDs and soft references to your master assets.
  3. Create a PDA_WeaponPartsDatabase asset for attachments and fill its Table in the same way.
  4. Open Edit → Project Settings → Cube Game Systems → Weapon SubSystem.
  5. Add the master database to WeaponMasterDBs and the part database to WeaponPartsDBs.
  6. Configure StatModifierDBs and SideEffectsDBs when using those database lookups.
  7. 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 socketGameplay tag
Slot_BarrelCube_Weapon.Slot.Barrel
Slot_Barrel_MuzzleCube_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.