Skip to main content

Item Static Data Asset

ItemStaticDataImage

Every item are constructed from a data asset, it's appearence (both in inventory and in game) and all relevant attributes which are static, is holded here. Such as: Mesh, weight, base price etc.

Using Inheritance in Data Assets

You can create new Data Asset Blueprints which your item instances could will from. For example a weapon class should hold its basic damage values, but armor items should hold its armor stats.

This way you can create a clean the data structre by only showing items relevant info, structure assets based on inheritance hierarchy, easily make changes via Property Matrix or make use Editor Utilities (which plug-in has some built in) while editing.

Default NIA Item Data Asset

By default NIA only provides the attributes that are nececarry for the inventory system to work. Giving developers the maximum flexibility to work with.

Example Item Data Asset Image

ItemStaticData

ItemStaticData is a class that contains the following properties:

  • ItemStaticInfo: An instance of the ItemStaticInfo class that contains information about the item.
  • ItemSettings: An instance of the ItemSettings class that contains settings for the item.

ItemStaticInfo

ItemStaticInfo is a struct that contains the following properties:

PropertyTypeDescription
NameTextThe name of the item. By default it is used for showing tooltips when mouse hovers around items at template inventory.
TypeGameplayTagThe type of the item. Used for checking if the item could enter a section. For example Sections are A: Item B:Item.Armor C: Item.Weapon, Item Type is: Item.Armor.Helmet: Item can enter A and B but not C. For more info check Gameplay Tags.
IconSoftObjPointer<Texture>The icon of the item. Used in template inventory icons. Grid size and resulation of the image should match to avoid straching. Eg: GridSize: 1x2 -> Res: 256x512
IsStackableboolWhether the item is stackable.
MaxStackSizeInt32The maximum stack size of the item.
GridSizeIntPointThe grid size of the item. For the size of it takes in the inventory.

ItemSettings

ItemSettings is a struct that contains the following properties:

PropertyTypeDescription
PayloadTemplatePayloadTemplateEvery item payload can be created from a template, by doing so setting it's inventory structure, initial inventory items etc. And/Or payload's initial values. By default it creates item's sub inventory.