Defining Attributes
Place each value at the narrowest level that matches how it changes. Category-level values describe the category itself, Item Definition values differ by item type, and Item values can differ between runtime instances of the same definition.
The examples below use the starter database from New Database: All > Consumable and All > Equippable > Weapon, with Health Potion, Iron Sword, and Fire Wand definitions.
Choose where the value belongs
| Attribute collection | Use it when | Standard example |
|---|---|---|
| Item Category | The category itself has one shared value. | CategoryIcon for Weapon |
| Item Definition | Every Item created from one definition should share the value. | Icon, Description, Attack, BuyPrice |
| Item | Each runtime Item may need its own value. | Durability on an individual Iron Sword or Fire Wand |
Attributes are declared in the Item Category editor, even when their values belong to Item Definitions or runtime Items. A category passes those declarations to its descendants. The Item Definition editor then sets definition values and the Default Item values used as the starting point for runtime Items.
The Common Attributes page lists names and types that built-in views or components may expect. In particular, Description is normally a string, Icon is a Sprite, and BuyPrice is normally a CurrencyAmounts Item Definition attribute.
Configure the starter categories
- Open Tools > Opsive > Ultimate Inventory System > Main Manager and select Item Categories.
- Select All, then open the Attributes section and its Item Definition tab.
- Confirm that
IconandDescriptionare present. For the standard shop example, addBuyPricehere if every starter definition can be bought. Use the + button to add an attribute. - Select Weapon. In the Item Definition tab, add
Attack. - In Weapon’s Item tab, add
Durabilityso each runtime weapon can have a different remaining value. - In Weapon’s Properties, enable Mutable and Unique when each Iron Sword and Fire Wand must keep its own changing Durability and must not stack with another weapon.
- Select Consumable. Leave Mutable and Unique disabled when Health Potion values do not change per instance and matching potions should stack in a normal Item Collection.
Do not redeclare Icon, Description, or BuyPrice on Weapon or Consumable when they already inherit those attributes from All. Add an attribute to a narrower category only when definitions outside that category should not receive it.
Set the definition and Default Item values
- Open the Item Definitions editor and select Health Potion.
- In the Item Definition attributes, set its
Icon,Description, andBuyPricevalues. Health Potion does not inheritAttackorDurabilitybecause it is a Consumable rather than a Weapon. - Select Iron Sword and set its
Icon,Description,Attack, andBuyPricedefinition values. - In Iron Sword’s Default Item attributes, set the starting
Durability. - Repeat the weapon steps for Fire Wand, using values appropriate to that definition.
At this checkpoint, both weapon definitions should expose Attack at the Item Definition level and Durability on the Default Item. Health Potion should expose the common display and price values without the weapon-only fields.
Choose an attribute variant
Each attribute value has a Variant choice:
- Inherit uses the value from its parent.
- Override supplies a specific value at the selected Category, Definition, or Item.
- Modify calculates a value from the inherited value or another attribute in the same collection.
Use Override for the direct Attack value of Iron Sword or Fire Wand. Use Inherit when a child Item Definition should keep its parent’s value. Use Modify for a predictable variation, such as a child definition whose Attack is based on its parent’s Attack.
For a fixed upgrade path, consider separate Item Definitions such as Iron Sword > Iron Sword +1 > Iron Sword +2. Parent and child definitions must use the same Item Category. The upgraded definition can inherit most values and override or modify only the values that change. Use a runtime Item attribute instead when the value belongs to one instance, such as Durability lost through use.
Decide mutability and stacking
The Mutable and Unique Category properties affect Items directly assigned to that category:
| Choice | Result | Typical use |
|---|---|---|
| Immutable, common | Values do not change per instance, and matching Items can stack. | Health Potion or materials |
| Mutable, unique | Every Item has its own identity and changing values. | Iron Sword or Fire Wand with Durability |
| Immutable, unique | Values stay fixed, but Items do not stack. | A key or other one-off Item |
| Mutable, common | Matching Items may stack even though values can change; the existing stack’s values are retained when merging. | A deliberately shared mutable stack |
Use mutable, common Items only when that merge behavior is acceptable. If two weapons must retain different Durability values, they should be unique.
Compare the existing demo patterns
The legacy demo uses Sword and Material categories to show the same decisions with a larger data model.
Mutable, unique Sword
The demo Sword category is Mutable and Unique because each sword can change through upgrades without stacking into another sword.

CategoryIcon is inherited from Viewable and supplies the editor icon. AnimatedID is inherited from Animated and identifies the animation shared by Items in the category.

BaseAttack belongs to the Item Definition because it is fixed for that sword definition.

Attack and Slots belong to the runtime Item because they can change. The demo’s Attack value uses Modify to begin from BaseAttack.
Immutable, common Material
The demo Material category is Immutable and common because its values do not change per instance and matching materials should stack.

The category-level CategoryIcon describes the Material category itself.

The remaining values belong to Item Definitions so each material type can supply its own fixed data.

No Item attributes are needed because individual material instances have no changing values.
Verify at runtime
- Add two Iron Sword Items and a stack of Health Potion Items to the player’s Bag collection.
- Enter Play Mode and inspect the Inventory component.
- Change the Durability of one Iron Sword and confirm that the other sword keeps its own value.
- Confirm that matching Health Potion Items stack when the collection permits stacking.
- Open an Item View and confirm that Icon and Description come from the selected definition.
- If the shop is configured, confirm that it reads the expected
BuyPricefor each definition.
Troubleshooting
- An expected field is missing from a definition: Check its Item Category and ancestors, then confirm that the attribute was added to the correct Item Definition or Item tab.
- Changing one weapon changes every copy: Check that the changing value is an Item attribute and that the direct category is Mutable and Unique.
- Items do not stack: Check the direct category’s Unique property and any Item Collection restrictions.
- An inherited value cannot be edited: Change its Variant from Inherit to Override, or edit the parent value.
- A child category reports an overlapping attribute: Keep one declaration on the appropriate ancestor. Multiple parents cannot supply same-named attributes with conflicting types.