Item Definitions & Fragments

UCrimsonInventoryItemDefinition is a Const, Abstract, Blueprintable UObject data asset. It holds Fragments (definition-level data) and StateFragments (per-instance mutable state templates).

cpp
UCLASS(Blueprintable, Const, Abstract)
class UCrimsonInventoryItemDefinition : public UObject
{
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = Display)
FText DisplayName;
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = State, Instanced)
TArray<TObjectPtr<UCrimsonInventoryItemFragment>> Fragments;
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = State, Instanced)
TArray<TObjectPtr<UCrimsonInventoryStateFragment>> StateFragments;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Item, meta = (AssetRegistrySearchable))
FGameplayTag ItemType;
};

Built-in item fragments

ClassDisplay NameKey properties
UCrimsonInventoryItemFragment_DataInventory DatabUnique, bStackable, MaxStackSize
UCrimsonInventoryItemFragment_FootprintInventory FootprintDimensions (FIntPoint, for grid), Weight (float, for weight constraint), SlotCost (int, for multi-slot flat items), bAllowRotation
UCrimsonInventoryItemFragment_VisualsItem VisualsItemIcon, SlotWidgetClass, PickupActorClass, PickupMesh
UCrimsonInventoryItemFragment_ConstraintInventory ConstraintsConstraintsToCheck - instanced constraints evaluated alongside the component stack
UCrimsonInventoryItemFragment_GrantCurrencyGrant CurrencyCurrency type and amount granted on pickup (item is consumed)
cpp
UCLASS(Blueprintable, DisplayName = "Inventory Footprint")
class UCrimsonInventoryItemFragment_Footprint : public UCrimsonInventoryItemFragment
{
/** W x H in cells (grid layouts). */
UPROPERTY(EditAnywhere, BlueprintReadOnly, meta = (ClampMin = "1"))
FIntPoint Dimensions = FIntPoint(1, 1);
/** Mass / encumbrance per single unit (weight layouts + float-tag weight constraint). */
UPROPERTY(EditAnywhere, BlueprintReadOnly, meta = (ClampMin = "0.0"))
float Weight = 0.f;
/** Slots this item consumes per stack in a flat-slot layout. */
UPROPERTY(EditAnywhere, BlueprintReadOnly, meta = (ClampMin = "1"))
int32 SlotCost = 1;
/** Whether grid layouts may rotate this item to fit. */
UPROPERTY(EditAnywhere, BlueprintReadOnly)
bool bAllowRotation = false;
};
Sensible defaults
Items without a Footprint fragment behave as 1x1, weight 0, 1-slot. You only need the fragment when an item is genuinely larger, heavier, or non-default.

State fragments (per-instance replicated mutable state)

ClassPurposeKey API
UCrimsonInventoryStateFragment_DurabilityTracks current/max durability for equipmentApplyDurabilityChange(float), GetDurabilityPercentage(), IsBroken()
UCrimsonInventoryStateFragment_LifetimeTracks elapsed time for time-limited itemsTimer-driven countdown; override in BP to implement expiry