⚙️ItemData

The ItemData scriptable object is the foundation of the inventory system and contains all the information about the item you want to create in the game.

Info Section

  • Display Name = The name of the object as it appears on the screen

  • Description = The description the player will see in the crafting window when selecting this item

  • Type = The type of item this is: Resource, Equipable, Consumable, or Buildable

  • Resource Group = The group of resources this item is or produces. For example, a piece of wood comes from the Resource Group: Trees, while an Arrow is from the Resource Group: WoodArrow.

  • Icon = The image you want to use to represent this item

  • Drop Prefab = The prefab that will be instantiated when this item is dropped from the inventory into the world

Stacking Section

  • Can Stack = Whether or not this item is stackable at all

  • Max Stack = The maximum number of items to have in a single stack

Consumables Section

  • Consumables = A list representing the Vital and how much to add to that vital when this item is consumed by the player

Wieldable Section

  • Wieldable Prefab = The prefab to instantiate when the player equips the item. This is the prefab that will be displayed as the arms and weapon for the player

Building Section

  • Building Prefab = The prefab that will be placed in the world when a building item is equipped and done rotating

Usage Section

  • Usage Rate = The rate at which this item can be used by the player. The higher the number the more time must pass before the next usage.

  • Usage Distance = The distance from the player at which world objects will be affected by this item

Resource Gathering Section

  • Can Gather Resources = Can this item gather resources from the world?

  • Types that can be Gathered = A list of Resource Types that can be gathered from the world. An Axe, for example, can gather wood but not stone

Combat Section

  • Can Deal Damage = Can this item be used in combat to deal damage to NPCs?

  • Damage = The amount of damage this item can do

Crafting Section

  • Is Craftable = Is this item craftable via the crafting menu?

  • Category = The category that this item will show up under when crafting

  • Level = The level of crafting table that must be used to craft this item. By default, the level is zero which means the player does not need a crafting table to craft this item

  • Number per Craft = How many items will be crafted when a recipe is crafted

  • Cost = A list of costs to craft this item. For example, an axe may take one wood and one stone to craft

Item Type Specifics Section

  • Burn Rate = The rate at which this item burns in a campfire

Cooking Section

  • Is Cookable = Can this item be cooked on the campfire?

  • Cook Time = How long does it take to cook this item

  • Cooking Result = What item will be produced when this item has finished cooking?

Last updated