Skip to content
Tuxedo CatSTUDIO
Menu

Quickstart_Blueprint

Review draft. This source page has not completed website editorial and release-specific verification.

# Blueprint Quickstart

Create an InventoryItemDefinition Data Asset. Set Item Id to a specific child of Inventory.Item, such as Inventory.Item.HealthPotion. Configure Stackable and Max Stack Size, then add the asset to an Inventory Component Starting Items array when appropriate.

Add an Inventory Component to an Actor. Enable Persistent Inventory and set Inventory Id to a stable semantic name when the inventory must be found across actor lifetimes. For a temporary inventory, leave persistent mode disabled; the component uses its runtime GUID and preserves any authored Inventory Id value without requiring it.

Set Slot Capacity to 0 for unlimited storage or a positive value for a bounded inventory. Starting Items are fallback initial authority.

Use the component’s pure query nodes: HasItem, GetItemCount, CanAddItem, CanRemoveItem, GetItemAtSlot, IsSlotOccupied, GetSlotCount, GetOccupiedSlotCount, GetFreeSlotCount, FindSlotsForItem, and GetContents.

Use the callable mutation nodes: AddItem, RemoveItem, RemoveAllOfItem, SetItemCount, ClearInventory, ResetToStartingInventory, MoveStack, SwapSlots, SplitStack, and MergeStacks. Each returns FInventoryMutationResult; branch on its Status rather than reducing a structured result to a Boolean.

Bind InventoryChanged to receive FInventoryChangedEvent with the inventory identity, mutation status, and slot changes. Rejected and no-change operations do not emit a committed-change event.

Obtain the normal Game Instance Inventory Subsystem. Use FindInventory, FindPersistentInventory, and FindTemporaryInventory with target identities. Create safe identities with MakePersistentInventoryTarget or MakeTemporaryInventoryTarget from UInventoryDirectorBlueprintLibrary.

Call TransferItem with source identity, destination identity, item definition, and count. Transfer routing remains identity-based and returns FInventoryMutationResult.

Call SelectRandomItemFromPool, SelectRandomItemsFromPool, or GiveRandomItemFromPool with a caller-owned FRandomStream pin. The stream is an in/out reference. A failed operation leaves it unchanged; a successful selection commits the stream advancement.

Use CapturePersistenceSnapshot, ValidatePersistenceSnapshot, and RestorePersistenceSnapshot as explicit callable execution nodes. These are not pure nodes because validation and restore may resolve item assets and perform an explicit persistence operation. Restoring a Blueprint-created snapshot still performs the complete strict validation and transaction plan.

During PIE/SIE open Tools → Director Suite → Runtime Inspectors → Inventory Director Runtime Inspector to observe the selected authority; this surface is strictly read-only. Use Tools → Director Suite → Runtime Controls → Inventory Director Runtime Controls to apply item, count, slot, stack, and transfer operations through the existing subsystem validation. Advanced Debug Override is unavailable because Inventory has no policy-only bypass. Runtime Controls do not save automatically; ordinary gameplay snapshots may capture committed state.