What are Item Types?
Item Types help us categorize our items. This provides a hint to the player about the purpose of the item. For example in a Survival or RPG when the player sees an item type of Resource they typically know it is something they can use for a crafting. When the player sees Equipment they know it is something they can equp.
There are also Item Sub Types, which is an optional second level type. Treat Item Type like the category, and Item Sub Type as the sub-category.
How are they used?
Item Types and Sub Types can be used as criteria for our specialty slots.
Item Types and Sub Types appear as text labels on the item tooltips.
Item Types are also used by the grid filter widget used by the player's inventory and containers by default.
Modify a default Item Type or Item Sub Type
Navigate to the Blueprints/Variables/DataAssets/ folder, then open either the ItemTypes/ or ItemSubTypes/ sub-folder. Open the type you wish to modify and edit the variables within it.
Item Type Variables
Item Sub Type Variables
Create Item Types
- Right click in your content browser and select Miscellaneous > Data Asset. Then depending on which type you need select either the DA_ItemType or DA_ItemSubType primary data asset from the list. Give your new type a name.
- Open up your new item type or item sub type and fill out the variables in the details panel. Definitions for the variables of each type can be found above.
Item Type Filter Widget
By default, the item type filter is a set of buttons at the bottom right hand corner of our player's inventory and our remote storages. Clicking the buttons will make it easier to find those types of items in the linked grid.
The item filter widget UI_ItemGrid_Filter found in the UIs/Shared/GridFilter/ folder helps us identify specific types of items in our linked grid. We link the filter to the UI_Grid by selecting the UI_Grid instance in the designer and adding a linkedWidget, which we select this UI_ItemGrid_Filter widget.
You can customize what item types are shown in the filter with the itemsType variable from the designer tab. The icon is pulled from the data asset for the Item Type.
You can remove the Item Filter Widget from the designer tab, just make sure you also unlink it from the UI Item Grid.