Gameplay Attributes
The Inventory Framework includes its own Attribute Set, containing multiple relevant categories such as Weight, Equipment Level and an abstract concept of Wealth.
The Attribute Set is represented by the NinjaInventoryAttributeSet class, make sure to add it to the Ability System Component assigned to your Character or Player State.
Available Attributes
The following table contains all attributes available in the Inventory System's Attribute Set.
Attribute | Description | Meta |
|---|---|---|
| Current wealth for the character. Can represent any type of in-game currency. | No |
| Average Equipment Level, considering all active equipment. Maintained automatically. | Yes |
| Maximum weight capacity for this inventory. | No |
| Weight currently carried by the avatar, considering stacks. Maintained automatically. | Yes |
| Slots available for the Backpack container. Provided for convenience, but not required. | No |
Average Equipment Level
This Meta Attribute is calculated by the GetAverageGearLevel function in the Equipment Manager. The attribute is updated when the total Equipment Level changes. The calculation logic can be represented as:
This means the average level is defined by the absolute item level divided by the amount of relevant containers configured in the inventory layout.
Initialization Data
You can use this Json to facilitate the creation the Data Table used to initialize the Inventory Attributes. Please note that only attributes that are not maintained automatically were included.
The Data Table Row type used to create Attribute Set Data for initialization is provided by the Gameplay Ability System You can create your data table using the AttributeMetaData structure.