InventoryCreate Item Definitions using Item Fragments
This how-to will show you how to create your first few Inventory Items.
In your Content Browser, navigate to your item data folder. If you are creating a new folder, it should match the configuration in your Asset Manager.
Right-click in any empty area, select the Inventory category and then Item Definition.
Name your new container asset
Weapon_Sword
and open it.In the Gameplay Tags property, add the
Inventory.Item.Weapon.Sword
Gameplay Tag, to identify this item.Add the User Interface Fragment to configure how this item is presented in the user interface. Set appropriate values to it.
Add the Stack Fragment, set the Stack Limit to
1
so this item cannot be stacked, and the Maximum Limit to10
, so we can allow a maximum of 10 swords in the inventory.Add the Container Fragment and configure your Preferred Container Query to prioritize equipment containers.
When you are done, your Sword Item should look like this (except maybe for the User Interface details).
In your Content Browser, navigate to your item data folder. If you are creating a new folder, it should match the configuration in your Asset Manager.
Right-click in any empty area, select the Inventory category and then Item Definition.
Name your new container asset
Weapon_Shield
and open it.In the Gameplay Tags property, add the
Inventory.Item.Weapon.Shield
Gameplay Tag, to identify this item.Add the User Interface Fragment, and configure it.
Add the Stack Fragment, set the Stack Limit to
1
so this item cannot be stacked, and the Maximum Limit to10
, so we can allow a maximum of 10 shields in the inventory.Add the Container Fragment and configure your Preferred Container Query to prioritize the off-hand container.
When you are done, your Shield Item should look like this (except maybe for the User Interface details).
In your Content Browser, navigate to your item data folder. If you are creating a new folder, it should match the configuration in your Asset Manager.
Right-click in any empty area, select the Inventory category and then Item Definition.
Name your new container asset
Resource_IronBar
and open it.In the Gameplay Tags property, add the
Inventory.Item.Crafting.Iron
Gameplay Tag, to identify this item.Add the User Interface Fragment and configure it.
Add the Stack Fragment. Set a
Stack Limit
of20
, and a Maximum Limit of100
. Set it to Automatically Merge New Items.Add the Container Fragment and configure your Preferred Container Query to prioritize the backpack container.
When you are done, your Iron Bar Item should look like this (except maybe for the User Interface details).