Skip to content
Plugin 1.0 · Unreal Engine 5.8Source snapshot · Version details

Items and fragments ​

Configure an item definition ​

Add fragments to URicItemDefinition.Fragments. Choose only the fragments the item needs:

  • Text and icon fragments supply presentation data.
  • Shape fragments supply occupied cells for grid placement.
  • Stats and gameplay-tag fragments initialize runtime tag stacks.
  • Container fragments create nested inventory space.
  • Actions and visual-resolver fragments supply extension classes.

The fragment reference lists the built-in options.

Runtime quantity and stats ​

GetNum() reads the item's stack count. GetMaxStack() reads Ric.Item.Stat.MaxStackSize and clamps the effective maximum to at least 1.

Initial stats are set through URicItemFragmentSetStats.InitialItemStats. At runtime, use the supported operations to change quantities and tags. In a client UI, prefer SetItemNum and the tag operations on URicClientPredictedInventoryComponent.

OnGameplayTagChanged reports the tag and its old and new values. Quantity and other numeric statistics share the tag-stack mechanism.

Item shape and rotation ​

Use URicItemFragmentJigsawItemShape for a filled rectangle, or URicItemFragmentJigsawItemShapeCustom for a custom mask. A shape has rows, columns, and occupied-cell bits.

URicItemFragmentRotation exposes 90°, 180°, and 270° permissions, initially taken from inventory settings. ERicRotation uses D0, D90, D180, and D270; these are enum values, not raw degree numbers.

Nested inventory ​

Use URicItemFragmentContainer for one nested container definition, or URicItemFragmentContainerCollection for a collection. Creation hooks attach the runtime containers to the item instance.

Use GetContainers() for direct children and GetContainersRecursive() for the subtree. When searching the owner's inventory, use the manager's recursive item and container methods.

Item actions ​

Create a Blueprint or C++ subclass of URicItemAction and add its class to ExecutableActionClasses in an actions fragment. Implement its label, availability, context-menu visibility, and execution hooks.

Set bExecuteOnServer when the action needs the server route. Invoke it through the predicted component's ExecuteAction for the player-facing path. Action classes are accessed as default objects; keep per-item state on the item, not on the action CDO.

Magazine data ​

URicItemFragmentMagazineData identifies the ammunition definition. The predicted component's LoadAmmo and UnloadAmmo use Ric.Item.Stat.AmmoCount and Ric.Item.Stat.MaxAmmoCount. The fragment alone does not implement a weapon, firing, or reloading animation.