Inventory System Overview

ORK’s inventory system manages items, equipment, currencies, crafting and more.

The following things are stored in the inventory:

  • items
  • equipment (but equipped equipment is not in the inventory)
  • currencies
  • crafting recipes
  • AI behaviours (if using quantities, an equipped AI behaviour is not in the inventory)
  • AI rulesets (if using quantities, an equipped AI ruleset is not in the inventory)

Inventory Settings #

The inventory settings manage some basic inventory and item collection settings. They can be found in Inventory > Inventory Settings.

Basics #

There are some base/default settings that manage the general handling of inventories and inventory space.

Inventory Type #

ORK’s inventory can be used in two modes:

  • Group
    The inventory shared by a combatant group (e.g. the player group).
    Each combatant has access to the same inventory.
  • Individual
    Each combatant has their own inventory.

Item Stacking #

You can define how items or equipemnt that’s added to an inventory will be stacked:

  • Add
    Just adds the items/equipment as they are as new items to the inventory (using the same quantity).
  • Auto Stack
    Automatically stacks items/equipment, i.e. items that are equal will be grouped together.
  • Auto Split
    Automatically splits items/equipment, i.e. adding multiple items will split them into single items in the inventory.

Individual items and equipment can override this.

Inventory Space and Space Limit #

Items can occupy space in an inventory. Each item/equipment can optionally override the default space.

The inventory itself can optionally have a space limit, exceeding the limit can either block adding new items or add status effects to the owners of the inventory.

Quantity Limits #

You can limit the quantity an item/equipment can have in an inventory. E.g. you can limit to only have 10 Potions in the inventory.

Each item/equipment can optionally override the default quantity limit.

Stack Limits #

Similar to overall quantity limits, you can limit the number of items that can be in an item stack. E.g. with a stack limit of 99, the 100’s potion would start a new stack.

Each item/equipment can optionally override the defaulst stack limit.

Default Prefab #

Define the default prefab that will be used by items, equipment, currencies, crafting recipes and AI behaviours/rulesets. Each of them can also define their own prefab.

The item prefab is used by Item Collector components to spawn an item in a scene, or when dropping an item into the game world (e.g. from an inventory menu screen).

Mark New Content #

These settings handle if and how new content will be marked and unmarked. E.g. getting a new item can optionally mark it as new in menus.

The settings are for everything that can be marked as new, not just inventory content:

  • abilities
  • AI behaviours
  • AI rulesets
  • bestiary entries
  • crafting recipes
  • equipment
  • items
  • logs
  • quests
  • research trees
  • shop content

Drop Item #

Define how items dropped into the game world (e.g. by killed enemies or when dropping things from an inventory menu screen) will be handled.

Start Settings #

Set up how the Item Collector component used by dropped items is set up, i.e. how the player can interact with it to collect the item.

Despawn Settings #

Dropped items can optionally despawn after a defind amount of time.

Inventory and battle drops have their separate settings.

Item Collection #

Define the UI used by Item Collector components when collecting single or random items (i.e. not item boxes).

You can optionally play an animation or sound before and after the collection.

Item Box #

Define the UI used by Item Collector components when used as an item box. Beside a collection choice dialogue you can also use an Inventory Exchange menu screen, which shows the player’s inventory and the item box side-by-side.

You can optionally play an animation or sound before and after the collection.

Quantity Texts #

Define how quantities of inventory content (e.g. items, equipment, etc.) are displayed.

You can define separate texts for quantities of 0, 1 and multiple (i.e. more than 1).

Notifications #

These settings handle a variety of notifications for inventory changes, durability changes and research. E.g. adding a new item to the inventory or finishing a research item can display a notification.

A notification shows a UI box with a message (using text codes to include the content the notification is about, e.g. <name> to add the item’s name) and automatically closes it after a defined time.

Learn more about notifications in this documentation.

Inventory Containers #

Inventory containers are an optional, slot-based inventory system that can be used on top of the standard inventory. They can be set up in Inventory > Inventory Containers.

General Settings #

The general settings define if inventory containers are used:

  • Disable
    Not used.
  • Enable
    Used by all combatants.
  • Player Only
    Used only by the player group.

Additionally, you can define an offset that’s added when displaying inventory slot indexes. The first index of the first slot is 0, e.g. to display the first slot as 1, set the Slot Index Display to 1.

Notifications #

Inventory containers can display notifications when there are only a few slots available.

  • Free Slots Remaining
    Displays a notification when only a defined number of free slots are available.
    Is not displayed for 1 or 0 free slots.
  • One Free Slot Remaining
    Displayed when only a single free slot is available.
  • No Slot Available
    Displayed when the last slot was filled.

Container Setup #

You can add as many inventory containers as you want.

Slots #

The inventory container defines how many slots it contains.

The slots are defined using a float value selection, i.e. you can also use a formula or a variable to define the number of available slots.

If the slot number changes and items are lost due to that, these lost items can optionally be remembered and added again when free slots are available.

Items #

Only content that’s enabled here will be stored in the inventory container.

You can individually enable currencies, items, equipment, AI behaviours, AI rulesets and crafting recipes.

Item Types #

You can optionally limit which item types can be stored in an inventory container.

How it works #

Inventory containers only contain the items and item types that are set up for them.

Adding an item that can be stored in one of the inventory containers can only be added if there is a free slot – if no free slot is available, the item can’t be added to the inventory.

Items that are not part of a container will be stored in the regular inventory. E.g. no container has currencies enabled, so currencies don’t occupy slots and are still added to the inventory even if all slots are occupied.

In addition to this, the standard inventory’s features are also used in inventory containers, e.g. quantity limits, stack limits and inventory space.

UI #

Inventory containers are displayed using an Inventory Container (Slots) menu screen part.

How the slots are arranged depends on the used UI box and UI module. E.g. using the Unity UI module can use a Grid Layout Group component to arrange them in a grid.

The content of an empty and occupied inventory slot can use HUDs to add a more complex setup. Occupied slots are shortcuts, see the HUD documentation on shortcuts for details.

Item Types #

Item types are used to organize inventory content and other purchaseable things (e.g. combatants, abilities). Item types also define the damage type of it’s items (each item can optionally override it) – learn more about damage types in this documentation.

You’ll mainly use them to filter content in the editor and in-game menus (menu screens, battle menus, shops).

Item types can be sub-types of other item types for a more detailed organization.

Item types are set up in Inventory > Item Types.