Item Category

Item Categories are used to organize the Item Definitions.  The editor allows you to create and edit your existing Item Categories.

The Item Category editor is split in three sections: properties, attributes and relationships. The properties section shows the Item Category specific properties. The attributes section allow you to modify the Item Categories attributes. The relationships section is a useful view for observing how the Item Category relates to other objects within your inventory.

The search bar has some special characters for searching by

  • “c:<categoryName>” : Use the “c:” prefix in the search bar to filter all categories that have the category with that name as direct parent.
  • “i:<categoryName>” : Use the “i:” prefix in the search bar to filter all categories that have the category with that name as an ancestor (the category Inherits from that ancestor category).
  • “a:<AttributeName>” : Use the “a:” prefix in the search bar to filter all categories that have an attribute with that name.

Properties

The following Item Category properties can be modified:

  • Name: The name of the Item Category. Item Categories are Scriptable Objects so the name will also represent the file name. The name must be unique.
  • Mutable: A mutable Item Category sets its direct items as mutable. Mutable item can be have attribute values change at runtime. By setting the Item Category to be immutable we can assume that it will not change after the items creation. This improves memory usage by having a single item instance instead of many items.
  • Unique: A unique Item Category sets its direct items as unique. Unique items will not stack in the default Item Collection. Common (not unique) items which are also mutable will merge with similar items when added to an Item Collection this can lose attribute values.
  • Abstract: An abstract category will not show up as an option for Item Definitions category. Abstract categories have the purpose of organizing your Item Definitions in a clean way.
  • Editor Color: The color that the category should appear in the editor. This is meant purely to visualize and organize the objects lists more efficiently.
  • Editor Icon: The icon that should appear in the editor. If no Editor Icon is specified the attribute with the name “CategoryIcon” will be used.
  • Parents: Item Categories can have multiple parents and multiple children.  An item category cannot have a parent that is of it’s own descendants as that would create a loop. Item Category parents must have non-ovelapping attributes. Attribute overlapping happen when two or more attributes have the same name but different type. If they have the same type then the first parent with that attribute will be used for the attribute inheritance.

Attributes

An Item Category has three attribute views: Item Category, Item Definition and Item. You can access each one individually by clicking on their respective tab.

  • Item Categories attributes are inherited only by Item Categories. They are meant to be used for values that are specific the the Item Category or that will be shared by all items in the category.
  • Item Definition attributes will be inherited by the the Item Categories and the Item Definitions. These are used to define attributes that will be specific to the Item Definition. This could be an item icon, description, etc.
  • Item attributes will be inherited by Item Categories and Items. Item Definitions have a “Default Item” and it can be used to change values of item attributes in the editor. Item attributes are specific to the item it is on and no other. Two items with the same definition may have different item attributes. Examples include lifetime, durability, or item slots. Since only mutable items can change item attributes at runtime it is common to set item attributes only for mutable Item Categories.

The Item Category editor is the only place where you will be able to add and remove attributes. Adding an attribute in the different collections will affect the respective category children and/or the definition children. To add an attribute go in the attribute tab and press the ‘+’ button. To remove an attribute, select it in the list and press ‘-‘. You will be prompted to either remove the attribute for this Item Category and all its parents or remove it for all its and parents and children.

The Attributes page describe how to modify the Item Category attributes.

Relationships

The relationships view shows a few lists which may help you locate the objects that relate to the current Item Category. Once you find the object that you want to view, press the colored box before the name to go to its page.

Relationship tabs include:

  • Ancestors
  • Descendants
  • Direct Item Definitions
  • Inherited Item Definitions
  • Direct Recipes
  • Inherited recipes