API Reference
Every public type in the CrimsonEquipment runtime module, plus the editor module. Types owned by other modules are labeled.
Manager component
| Member | Kind | Notes |
|---|
UCrimsonEquipmentManagerComponent | Class (UPawnComponent) | Implements ICrimsonEquipmentHost. Delegates OnEquipmentChangedMessage, OnEquipmentSourceChanged, OnCharacterLookChanged (each with a ...Native twin) and the static native OnEquipmentGrantsChanged. Calls SetIsReplicatedByDefault(true) in its constructor. BlueprintSpawnableComponent. |
EquipmentList | Property (replicated) | The FCrimsonEquipmentList of applied entries. COND_None. |
OnEquipmentChanged | Delegate (BlueprintAssignable, no parameters) | Server only. Broadcast from EquipItem, UnequipItem (not during teardown), SwapEquippedItems and MoveEquippedItemToSlot. |
EquipItem(EquipmentDefinition, SourceObject, SpecificSlotIndex) | Function (server) | BlueprintAuthorityOnly. SpecificSlotIndex defaults to -1 (first free index). Returns the new instance, or null. |
UnequipItem(ItemInstance, bForce) | Function (server) | BlueprintAuthorityOnly. bForce skips CanUnequipItem. |
UnequipItemInSlot(SlotTag, SlotIndex) | Function (server) | BlueprintAuthorityOnly. No-op when the slot is empty. |
SwapEquippedItems(ItemA, ItemB) | Function (server) | Exchanges slot assignments only. No grants, actors or hooks change. |
MoveEquippedItemToSlot(ItemToMove, NewSlotTag, NewSlotIndex) | Function (server) | Rewrites one entry's slot assignment only. |
GetEquipmentInstanceForSlot(SlotTag, SlotIndex) | Function (pure) | The instance in a slot, or null. |
GetEquipmentActorInSlot(SlotTag, SlotIndex) | Function (pure) | This machine's first spawned actor for that item. |
GetEquipmentActorsInSlot(SlotTag, SlotIndex) | Function (pure) | All of this machine's actors for that item. |
GetFirstInstanceOfType(InstanceType) | Function (pure) | First equipped instance of a class. |
GetEquipmentInstancesOfType(InstanceType) | Function (pure) | Every equipped instance of a class. |
GetEquipmentList() | Function (C++ only) | Const access to the entries for iteration. |
CanEquipItem(EquipmentDefinition, SourceObject) | BlueprintNativeEvent | Defaults to true. Gates EquipItem and ICrimsonEquipmentHost::CanEquip. |
CanUnequipItem(ItemInstance) | BlueprintNativeEvent | Defaults to true. Skipped entirely when bForce is set. |
OnBeforeSwapUnequip(Incoming, Outgoing) | BlueprintNativeEvent | Called on a displacement only, between the incoming equip and the outgoing unequip. |
GatherSaveData() | Function (server) | BlueprintAuthorityOnly. Skips entries whose source is a non-asset object. |
RestoreFromSaveData(SaveData) | Function (server) | BlueprintAuthorityOnly. Force-unequips everything first; caches if the ASC is absent. |
TryFlushPendingRestore() | Function (server) | Applies cached restore data once the ASC exists. False when nothing was pending. |
HasPendingRestore() | Function (pure) | Whether a restore is still waiting on the ASC. |
Equipment list and entries
| Member | Kind | Notes |
|---|
FCrimsonEquipmentList | Struct (FFastArraySerializer) | The replicated container. PostReplicatedAdd runs OnEquipped plus the messages on clients; PreReplicatedRemove runs OnUnequipped, destroys actors and broadcasts; PostReplicatedChange is intentionally empty. |
FCrimsonAppliedEquipmentEntry | Struct (FFastArraySerializerItem) | One row: definition class, instance, slot tag, assigned index, granted handles. Every member is private with no Blueprint accessor, so this struct exposes nothing to Blueprint. |
FCrimsonAppliedEquipmentEntry::GrantedHandles | Property (NotReplicated) | FCrimsonEquipmentGrantedHandles. Authority-only. |
GetInstance, GetEquipmentDefinition, GetSlotTag, GetAssignedSlotIndex, GetGrantedHandles, GetDebugString | Functions (C++ only) | Entry accessors. |
Slots component
| Member | Kind | Notes |
|---|
UCrimsonEquipmentSlotsComponent | Class (UActorComponent) | BlueprintSpawnableComponent - it does appear under Add Component. Not replicated. |
SlotLayout | Property (EditDefaultsOnly, BlueprintReadOnly) | The array of slot definitions. Protected. |
FindSlotDefinition(SlotTag, OutDef) | BlueprintNativeEvent | Linear search by default. Override for computed layouts. |
GetSlotLayout() | Function (pure) | The whole array. |
SetSlotLayout(InSlotLayout) | Function | Replaces the array. No authority guard - call it on every machine whose copy matters. |
FCrimsonEquipmentSlotDefinition | Struct | SlotTag plus SlotCount (clamped to a minimum of 1). |
Definitions and visual actors
| Member | Kind | Notes |
|---|
UCrimsonEquipmentDefinition | Class (Const, Abstract, Blueprintable) | Read from the class default object; never instantiated. Passed everywhere as TSubclassOf. |
EquipmentSlotTag | Property (EditDefaultsOnly) | The slot this fills. Unfiltered tag picker. |
InstanceType | Property (EditDefaultsOnly) | Defaults to UCrimsonEquipmentInstance. |
AbilitySetsToGrant | Property (EditDefaultsOnly) | TArray<const UPrimaryDataAsset*> restricted to UCrimsonAbilitySet. Honored only by CrimsonCore; standalone, use GrantedAbilities / GrantedEffects / GrantedAttributeSets. |
ActorsToSpawn | Property (EditDefaultsOnly) | TArray<FCrimsonEquipmentActorToSpawn>. |
FCrimsonEquipmentActorToSpawn | Struct | ActorToSpawn, SpawnRule, StaticMesh, SkeletalMesh, bUseLeaderPose (default true), AttachSocket, AttachTransform. |
ECrimsonEquipmentActorSpawnRule | Enum | AllMachines (default) or ServerOnly. |
ACrimsonEquipmentDisplayActor | Class (Blueprintable) | The default cosmetic actor: scene root plus a static and a skeletal mesh component, collision and overlaps and navigation all off, bReplicates = false. |
GetStaticMeshComponent(), GetSkeletalMeshComponent() | Functions (pure) | Component access. |
BP_OnDisplayInitialized (On Display Initialized) | BlueprintImplementableEvent | Fires after the meshes and leader pose are applied. The hook for materials and VFX. |
InitializeDisplay(StaticMesh, SkeletalMesh, bUseLeaderPose, LeaderPoseTarget) | Function (C++ only) | Called by the instance during spawning; not a UFUNCTION. |
Equipment instance
| Member | Kind | Notes |
|---|
UCrimsonEquipmentInstance | Class (Blueprintable, replicated UObject) | Outered to the owning pawn. Registers Iris replication fragments. |
SourceObject | Property (ReplicatedUsing = OnRep_SourceObject) | Opaque. Can read null on a client until the object itself replicates. |
Definition | Property (ReplicatedUsing = OnRep_Definition) | Its arrival is what makes a client spawn its cosmetic actors. |
SpawnedActors | Property (not replicated) | This machine's actors only. |
GetSourceObject(), GetDefinition(), GetPawn(), GetSpawnedActors() | Functions (pure) | Accessors. |
GetTypedPawn(PawnType) | Function (pure) | DeterminesOutputType - a pre-cast pawn getter for Blueprint. |
SpawnEquipmentActors(ActorsToSpawn) | Function | BlueprintCallable, no authority guard. Branches internally on authority for ServerOnly entries. |
DestroyEquipmentActors() | Function | BlueprintCallable, no authority guard. Destroys this machine's actors. |
OnEquipped() | BlueprintNativeEvent | Runs on the server and every client. Gate authoritative work on GetPawn()->HasAuthority(). |
OnUnequipped() | BlueprintNativeEvent | Same. Runs before the actors are destroyed and the grants revoked. |
Abilities
| Member | Kind | Notes |
|---|
UCrimsonGameplayAbility_FromEquipment | Class (Abstract, Blueprintable, extends UGameplayAbility) | Extends Epic's UGameplayAbility directly, so it needs no Crimson ability plugin. |
GetAssociatedEquipment() | Function | The instance from the current ability spec's SourceObject. Null (with a warning) outside an active activation. |
GetSourceObject() | Function | That instance's source object. |
IsDataValid (editor) | Override | Fails validation for a NonInstanced instancing policy, which cannot read the spec. |
Messages and tags
| Member | Kind | Notes |
|---|
FCrimsonEquipmentChangedMessage | Struct (BlueprintType) | Instance, SlotTag, bEquipped. All BlueprintReadOnly. |
CrimsonEquipmentTags::Equipment_Message_Changed | Native tag | Crimson.Equipment.Message.Changed - the channel for the message above. |
CrimsonEquipment::SystemReadyFeatureName | Native tag | Crimson.SystemReady.Equipment feature state (state tag TAG_Crimson_SystemReady_Equipment) - announced by the Game Feature action once the layout is applied. |
FCrimsonEquipmentSourceChangedMessage | Struct | Host, SourceObject, DefinitionClass, SlotTag, SlotIndex, bEquipped. Broadcast on Message.Equipment.SourceChanged. |
FCrimsonCharacterLookChangedMessage | Struct | Pawn only. Broadcast on Message.Character.LookChanged for every equip, unequip, swap and move. |
This plugin defines exactly the two tags above and ships no tag ini. Slot tags such as Equipment.Slot.Weapon are yours to author.
Save data
| Member | Kind | Notes |
|---|
FCrimsonEquipmentSaveData | Struct (BlueprintType) | EquippedItems, an array of entries. SaveGame-flagged. |
FCrimsonEquipmentSaveEntry | Struct (BlueprintType) | EquipmentDefinition, SlotTag, AssignedSlotIndex (default -1), SourceObjectPath. All BlueprintReadWrite and SaveGame-flagged. |
The plugin implements no save-system interface and depends on no save plugin - these structs are handed to whatever your project already uses.
Game Feature action
| Member | Kind | Notes |
|---|
UCrimsonGameFeatureAction_AddEquipmentSlots | Class (MinimalAPI, display name Add Equipment Slots) | Extends UCrimsonEquipmentGameFeatureAction_WorldActionBase. MinimalAPI, so it cannot be subclassed from another module. |
SlotsList | Property (EditAnywhere, private) | The array of requests; the action's only editable property. |
FCrimsonAddEquipmentSlotsRequest | Struct | ActorClass, SlotLayout, bServerComponent (true), bClientComponent (false), bAddEquipmentManager (false), SlotsComponentClass, EquipmentManagerClass. |
Adding is idempotent - it returns early if the actor already has a slots component, and only adds a manager when the actor has none. Removal searches by the base component classes, so subclasses are found too.
Settings
| Member | Kind | Notes |
|---|
UCrimsonEquipmentSettings | Class (UDeveloperSettings, Config = Game, DefaultConfig) | Project Settings -> Crimson -> Crimson Equipment. Writes to the project's Config/DefaultGame.ini. |
DisplayActorClass | Property (Config) | Default ACrimsonEquipmentDisplayActor. Spawned for entries with no ActorToSpawn; falls back to the plugin's class if it fails to load. |
bVerboseLogging | Property (Config) | Default false. Gates Info-level LogCrimsonEquipment output for equip, unequip, slot resolution, swap, move, actor spawn and destroy, the lifecycle hooks, and save gathering. |
Editor module
| Member | Kind | Notes |
|---|
| Content Browser menu | Editor UI | Add -> Crimson Plugins -> Equipment creates Blueprint children of the definition, instance, manager, slots component and equipment ability. |
Contract types and engine types
| Type | Module | Role here |
|---|
ICrimsonEquipmentHost | CrimsonEquipment (Equipment/) | Implemented by the manager. The item-system bridge. CannotImplementInterfaceInBlueprint. |
FCrimsonEquipRequest, FCrimsonEquipResult, FCrimsonEquipmentSlotInfo, FCrimsonEquipmentSourceChangedMessage | CrimsonEquipment (Equipment/CrimsonEquipmentBridgeTypes.h) | The bridge's request, result, layout and source-changed structs. |
UCrimsonEquipmentBridgeStatics | CrimsonEquipment (Equipment/) | The consumer side: Find Equipment Host Component, Is Object Equipped, Get Equipped Object In Slot, Get Equipment Slot Layout. |
FCrimsonEquipmentAbilityGrant, FCrimsonEquipmentEffectGrant, FCrimsonEquipmentAttributeSetGrant, FCrimsonEquipmentGrantedHandles | CrimsonEquipment (CrimsonEquipmentAbilityGrants.h) | Engine-typed grants and the handles that revoke them. |
FCrimsonCharacterLookChangedMessage | CrimsonEquipment (Messaging/) | Payload of On Character Look Changed. |
UGameFrameworkComponentManager feature states | ModularGameplay (Epic) | CrimsonEquipment::SystemReadyFeatureName is announced through it; wait with RegisterAndCallForActorInitState. |
UCrimsonEquipmentGameFeatureAction_WorldActionBase | CrimsonEquipment | Base of the slot-adding action. |
UAbilitySystemGlobals, IAbilitySystemInterface | GameplayAbilities (Epic) | How the ASC is found. No Crimson ability plugin is involved. |
UPawnComponent, UGameFrameworkComponentManager | ModularGameplay (Epic) | The manager's base, and the extension mechanism the Game Feature action uses. |
CrimsonCore (for orientation only)
CrimsonCore is free to download, but compiles only with all Crimson plugins installed. It ships a paper-doll equipment panel, equipment slot widgets and a ready-made Equipment.Slot.* tag set on top of this plugin - see CrimsonCore -> Inventory UI. Nothing in CrimsonEquipment depends on it, and every recipe on these pages is built standalone.
System readiness
| Tag constant | Tag | Announced when |
|---|
CrimsonEquipment::SystemReadyFeatureName | Crimson.SystemReady.Equipment | The Add Equipment Slots Game Feature action has created the slots component and applied its layout on that actor. Components added any other way do not announce it. |
Wait on it rather than polling: UGameFrameworkComponentManager::RegisterAndCallForActorInitState(Pawn, CrimsonEquipment::SystemReadyFeatureName, FGameplayTag(), Delegate, true).