Skip to main content

Weapon Operations

An operation is an FWeaponOpRequest containing OperationType, Controller and an FInstancedStruct payload. Build it with UWeaponCommonFuncLib, then submit it through QueueWeaponOperation on the Weapon Subsystem.

Submit a Request​

Create...Op(RequestingController, operation inputs)
→ Request, bSucceed, FailureReason
→ QueueWeaponOperation(bSucceed, FailureReason, Request)

The helpers are Blueprint-pure functions. Creating a request does not execute it. QueueWeaponOperation returns void; it does not return an operation-completion success flag.

bCondition = false causes the subsystem to broadcast/log Message and stop. Otherwise it looks up the registered Net component and routes the request.

Supported Routes​

HelperRouted behavior
CreateBuildOpCreate a new working build GUID
CreateAddPartToBuildOpSet master or append a part record
CreateRemovePartFromBuildOpRemove matching part or reset root
CreateValidateBuildOpLoad assets, validate and register the working build
CreateImportBuildOpLoad assets and replace the working build
CreateFetchBuildOpRetrieve registered build data
CreateDeleteBuildOpClear the matching working build
CreateAcquireOpInternal spawn or external allocation request
CreateEquipOpAssign/initialize an already acquired actor
CreateUnequipOpClear runtime entries and assignment; request allocation-aware cleanup
CreateUseOpSelect weapon and change its character socket
CreateWeaponAttackOpTrigger/release attack on ActualUsedWeapon
CreateReloadOpRequest reload on the selected weapon
CreateTriggerFiremodeOpCycle fire mode on the selected weapon

Some enum values are not handled by the router. InitializeWeapon reaches an empty implementation. There is no built-in Drop operation; implement world pickups/drop behavior in your project.

Completion and Validation​

Request construction checks inputs such as non-null references, non-empty names and valid GUIDs. Full build validation is a separate operation. These checks are not a comprehensive authorization/security policy for arbitrary client requests.

Use OnWorkingBuildModified, OnWorkingBuildReplicated, OnWorkingBuildCreated, OnBuildValidatedCallback and FetchBuildCallback for their respective stages. Bind before queuing the request.

Asset loads can finish later. Serialize edits to the one working build and wait for the appropriate completion state; the name QueueWeaponOperation does not imply a serialized asynchronous job queue.

Network Execution​

Build, acquire and equip requests execute directly on authority or travel through reliable server RPCs. Interaction requests also execute locally on a requesting client before their server RPC.

Use the owning controller's component. Test client/server behavior separately; do not infer network correctness solely from successful Standalone play.

See Implementation Limits for the current behavior of incomplete routes and gameplay.