Game Development

[Unity] Game Creator 2 Inventory — Items, Equipment, Crafting & Shops

[Unity] Game Creator 2 Inventory — Items, Equipment, Crafting & Shops

Thank you for visiting this site.

This article provides a detailed guide to “Inventory”, one of Game Creator 2’s modules.

Inventory is a large-scale extension asset that comprehensively handles Item definitions / Bags (inventory) / Equipment / Currency / Merchants (shops) / Tinkering (crafting & dismantling) / Loot Tables (drops) / Sockets & Properties.

Official documentation: Game Creator 2 Documentation

You can find a complete list of all articles in this series here:

Complete Article List — Game Creator 2 Complete Guide Series Indexen.senkohome.com/gamecreator2-series-index/

What is Inventory?

A module that covers virtually every scenario where items are handled in a game.

Main elements:

  • Item: Item definition (ScriptableObject)
  • Runtime Item: An individual instance of “that item” in the scene
  • Bag: Container (component) for Items/Runtime Items
  • Equipment: Equipment slot definition (ScriptableObject)
  • Currency: Currency (ScriptableObject; can have multiple Coins)
  • Merchant: Shop component
  • Tinker: Opens crafting/dismantling UI
  • Loot Table: Weighted random drops
  • Sockets / Properties: Insert runes into weapons, hold variable values like attack power, etc.

Item vs Runtime Item

  • Item: A template existing in the project (Prefab-like). Defines name, weight, default Property values, etc.
  • Runtime Item: An instance in the scene. Can hold its own Property values (e.g., durability per sword)
  • Save/Load target: Runtime Items are saved as individual instances
  • Similar to Unity’s “Prefab ↔ Prefab Instance” relationship

Installation

  1. Purchase the Inventory module from the Asset Store
  2. Install via Window > Package Manager
  3. Install samples from Game Creator > Install...:
    • Items: Ready-to-use template items
    • UI: Inventory/shop/crafting UI templates
    • Examples: Tutorial scene collection for each feature
  4. Examples depend on both Items and UI. Dependencies are auto-resolved

Items (Item Definitions)

Creation

Right-click in Project → Create > Game Creator > Inventory > Item

Item Section Structure

ID

A unique string. Duplicates show an error (red). Expand the field on the right → Regenerate to generate a new ID.

Prefab

Prefab reference for drops/instance generation. If not set, the item cannot be dropped.

Inheritance

Specifying another Item as Parent lets it inherit Properties and Sockets.

Comparison behavior: When A inherits from B, “Is A equal to B?” returns true (A is subordinate to B). “Is B equal to A?” returns false.

Information

Name / Description / Sprite / Color. Dynamic properties for localization are available.

Shape

  • Width / Height: Occupied area in grid-type Bags
  • Weight: Weight (compared against maximum weight)
  • Max Stack: Maximum stack count for the same item
  • Having even one Socket automatically limits Max Stack to 1 (technical constraint)

Price

Currency (only one can be specified) and a value. Prices of attached Socket items are also summed (e.g., Sword 45 + Rune 20 = 65).

Properties

Dynamic keyed values (e.g., attack = 35). Each has Icon / Color / Number / Text.

Sockets

Slots where other Items can be inserted. Specify a Base Item.

Equipping

Settings for equippable Items. Works with the combination of Equipment asset and Bag.

Usage

  • Consume on Use: Whether consumed on use (potion vs. flute)
  • Can Use (Conditions): Usage conditions. Cannot be used if conditions aren’t met
  • On Use (Instructions): Executed on use. Self = GameObject with the Bag, Target = Bag's Wearer
  • Execute From Parent: Execute the parent Item’s Can Use/On Use first before executing its own (pattern for consolidating common effects like all potions in the parent)

Crafting

Both recipes and materials recovered from dismantling can be defined.


Properties (Item Attributes)

Adding a Property

Add with the Add Property button. Each has ID (name) / Is Hidden / Icon / Color / Number / Text.

Mutable vs Immutable

  • Mutable values change on Runtime Items (durability, remaining ammo, etc.)
  • Immutable values don’t change during gameplay

Inheritance

Turn ON the Inherit Properties toggle at the top of the Item to inherit the parent’s Properties. Individual override values can be set with the left toggle (e.g., Shield > Wooden Shield has lower defense, Shield > Steel Shield has higher).

Hidden Properties

For internal flags not shown in UI (hidden attributes like is-metal).


Sockets (Item Linking)

Two Roles

  • Socket Prefab: The appearance when this Item is inserted into another Item’s Socket (a Prefab with a Prop component)
  • Sockets (receptacles): Slots where this Item accepts other Items

Receptacle Settings

Add with the Add Socket button.

  • Base Item: The Item type to accept. All derived children are also accepted (specify Rune and Rune of Attack / Rune of Defense are all OK)
  • Socket ID: ID used by the Prop component to identify the insertion position

Prop Component

Automatically mounts the Prefab inserted into a Socket at a specific position on your 3D model. Set the “insertion position (child Transform)” for each Socket ID.


Bags (Inventory Containers)

Types

  • List Bag: List type arranged in order (recommended; easy to handle)
  • Grid Bag: Grid placement. For fitting shaped items together (advanced)

Bag Options

  • Maximum Height: Upper limit on the number of items that can be held
  • Maximum Weight: Exceeding results in Overloaded status
    • Height cannot be exceeded, but Weight allows adding items even when exceeded
  • Equipment: Reference to an Equipment asset (optional)

Stock / Wealth

  • Add Stock: Initial stock of Items and quantities (e.g., merchant’s starting items)
  • Add Wealth: Currency and initial balance
  • For random loot (treasure chests, etc.), Loot Tables are recommended

Skin UI

UI display skin for the Bag. Switch per use case (player inventory / treasure chest / shop).

Wearer

The target that actually wears equipped Items. Default is Self (when Bag and Character are on the same GameObject).


Equipment

Equipment Asset

Right-click in Project → Create > Game Creator > Inventory > Equipment

Equipment Slot

  • Base Item: The Item type to accept (e.g., using a parent Item Head as the base allows all helmets to be equipped)
  • Bone: Bone reference for displaying equipment. Dropdown for Humanoid, path specification for non-Humanoid

Standard Template Example

The included Equipment has 7 slots:

  • Head / Body / Right Hand / Left Hand (equipment)
  • 3 Consumables (consumable hotbar)

Currencies

Currency Asset

Right-click in Project → Create > Game Creator > Inventory > Currency

Multiple Coin Support

A Currency has one or more Coins. Each Coin is a “relative value to the base unit.”

Most games work fine with a single Coin (Gold 1). Decimals are not supported, so for 2 decimal places, manage values ×100 and shift for display.

Multiple Coin Example (Copper, Silver, Gold)

  • Copper = 1 → Silver = 25 → Gold = 125 (= 5 Silver × 25 Copper)
  • Give/take operations always use values converted to the base unit

Merchants (Shops)

Attach a Bag + Merchant component to the same GameObject.

Configuration

SettingDescription
Infinite CurrencyInfinite merchant currency (for buying from players)
Infinite StockSale items never decrease
Allow Buy BackRestock items the player sold
Sell Niche TypeRestrict sale Item types (Herbs specialist, etc.)
Buy RatePrice multiplier when merchant sells to player (1.0 = list price)
Sell RatePrice multiplier when merchant buys from player (typically 0.5 for half-price buyback)

Tinkering (Crafting / Dismantling)

Overview

  • Crafting: Make one item from multiple materials
  • Dismantling: Break down one item to recover multiple materials
  • How to open: Open Tinker UI instruction

Parameters

  • Tinker Skin: Skin that determines crafting or dismantling
  • Input Bag: Bag to take materials from
  • Output Bag: Bag to place created items/materials. Usually the same, but can be separate
  • Filter Item: Target Item type (narrow to Potion for Alchemy, Equipment for Forge, etc.)

Design Hints

The difference between genre-specific stations (forge/alchemy) is just changing the parent Item in Filter Item.


Loot Tables (Random Drops)

Creation

Right-click in Project → Create > Game Creator > Inventory > Loot Table

Entry Settings

  • Rate: Weight (relative value, not probability). Drawn as a ratio to the total sum
  • Loot: Choose Item or Currency
  • Amount: Fixed or random quantity
  • No Drop Rate: Weight for “nothing drops”

Execution

Instruction Loot Table → Specify the Loot Table asset + output Bag. One execution draws one entry. Running multiple times consecutively lets you “generate multiple items for a treasure chest.”

Typical Treasure Chest Pattern

Chest prefab with Trigger → Execute Loot Table instruction multiple times → Store in Chest’s own Bag. This way, treasure chests in a level are the exact same Prefab but with randomized contents.


User Interface (UI Components)

Three Types of Skins

Skin TypeRelated ComponentRole
Bag SkinBag UIOverall Bag display
Merchant SkinMerchant UIShop transaction screen
Tinker SkinTinker UICrafting/dismantling screen

Bag UI

  • 2 types: Bag List UI (for List Bags) and Bag Grid UI (for Grid Bags)
  • Parameters:
    • Prefab Cell: Prefab for each cell (Bag Cell UI component required)
    • Filter by Parent: Item type filter for display (convenient for tabs)
    • Content: Parent object where cell Prefabs are arranged
    • Can Drop Outside: Allow dragging outside UI to drop in the world
    • Max Drop Distance: Droppable distance
    • Drop Amount: One / entire stack
ComponentRole
Cell UIEach slot’s cell. Receives drag permission, drop/selection Instructions
Selected Cell UIDetail display for the currently selected cell
Socket UI / Property UIChild Prefab displaying one Socket/Property
Equip UIEquipment slot / consumable hotbar UI
Wealth UICurrency display
WeightCurrent weight / max weight display

Merchant UI

Bridges two Bag UIs (Merchant/Client). On Buy / On Sell (from the player’s perspective) can have Instructions assigned.

Tinker UI

Displays recipe/dismantle source list. Filter By Parent filters target Item types.


Visual Scripting Reference

Instructions (36)

Inventory > Bags (10)

InstructionFunction
Add ItemCreate new from Item type and add to Bag
Add Runtime ItemAdd existing Runtime Item to Bag
Remove ItemRemove specified Item type from Bag
Remove Runtime ItemRemove specified Runtime Item from Bag
Drop ItemDrop Item type from Bag into the world
Drop Runtime ItemDrop Runtime Item into the world
Increment Bag HeightIncrease Bag row count
Increment Bag WidthIncrease Bag column count
Move Content To BagMove all Bag contents to another Bag
Move Wealth To BagMove all Bag currency to another Bag

Inventory > Cooldowns (5)

InstructionFunction
Add Item CooldownAdd cooldown to an Item type
Add Runtime Item CooldownAdd cooldown to a Runtime Item
Reset Item CooldownReset Item cooldown
Reset Runtime Item CooldownReset Runtime Item cooldown
Clear CooldownsRemove all Bag cooldowns

Inventory > Currency (1)

InstructionFunction
Change CurrencyAdd/subtract Bag currency value

Inventory > Equipment (4)

InstructionFunction
Equip ItemEquip an item from the Bag matching the Item type
Equip Runtime ItemEquip a specified Runtime Item
Unequip ItemUnequip equipment of the Item type
Unequip Runtime ItemUnequip a Runtime Item

Inventory > Loot (2)

InstructionFunction
Instantiate ItemPlace an Item’s Prefab in the scene
Loot TableDraw one entry from Loot Table to Bag

Inventory > Sockets (2)

InstructionFunction
Attach Runtime ItemMount a Runtime Item to the first empty Socket
Detach Runtime ItemRemove a Runtime Item from a Socket

Inventory > UI (10)

InstructionFunction
Open Bag UIOpen the Bag UI
Close Bag UIClose the Bag UI
Open Merchant UIOpen the shop UI
Close Merchant UIClose the shop UI
Open Tinker UIOpen the crafting/dismantling UI
Close Tinker UIClose the Tinker UI
Set Bag UISwitch the Bag UI’s target Bag
Set Drop AmountSwitch drop behavior
Set Split AmountSwitch stack split behavior
Set Transfer AmountSwitch transfer behavior

Inventory > Variables (2)

InstructionFunction
Set ItemSave Item type to a Variable
Set Runtime ItemSave Runtime Item to a Variable

Conditions (24)

CategoryConditionCheck
InventoryCan AddWhether the specified Item can be added to the Bag
Has ItemWhether the Bag contains at least a minimum quantity of the specified Item
Has Runtime ItemWhether the Bag contains the specified Runtime Item
Is OverloadedWhether the Bag exceeds maximum weight
Is Type Of ItemWhether an Item is equal to or subordinate to another Item
Is UsableWhether an Item is usable
BagsEnough SpaceWhether the Bag has minimum free space
CooldownsIs Item CooldownWhether the specified Item is on cooldown
Is Runtime Item CooldownWhether the specified Runtime Item is on cooldown
EquipmentCan EquipWhether the specified Item can be equipped
Is Equipment Slot FreeWhether the specified slot is free
Is EquippableWhether the specified Item is equippable (as a type)
Is EquippedWhether equipment of the Item type is worn
Is Runtime Item EquippedWhether the specified Runtime Item is equipped
MerchantCan BuyWhether the specified Item can be purchased from the Merchant
Can SellWhether the specified Item can be sold to the Merchant
PropertiesItem Has PropertyWhether an Item has the specified Property
Runtime Item Has PropertyWhether a Runtime Item has the specified Property
TinkerCan CraftWhether the specified Item can be crafted
Can DismantleWhether the specified Item can be dismantled
Enough IngredientsWhether crafting materials are sufficient
Is CraftableWhether an Item has a crafting definition
Is DismantableWhether an Item has a dismantle definition
WealthCompare WealthWhether the specified currency value meets a condition

Events (17)

CategoryEventFires When
InventoryOn AddWhen an item is added to the Bag
On RemoveWhen an item is removed from the Bag
On Drop ItemWhen a Bag item is dropped onto a Trigger
On Instantiate ItemWhen an item is dropped from Bag to scene
CurrencyOn Change CurrencyWhen the Bag’s currency value changes
EquipmentOn Equip / On UnequipOn equip / unequip
MerchantOn Buy / On SellOn successful purchase / sale
SocketsOn Socket Attach / On Socket DetachOn Socket insert / remove
TinkerOn Craft / On DismantleOn successful craft / dismantle
UIOn Open/Close Bag UIBag UI open/close
On Open/Close Merchant UIShop UI open/close
On Open/Close Tinker UITinker UI open/close

Practical Usage — Configuration Guide by Goal

Use an HP Potion

  1. Create Item Health Potion. In the Usage section, set Consume on Use = true
  2. Add Conditions to Can Use (e.g., is the player alive?)
  3. In On Use, use the Stats module’s Change Attribute for HP +50
  4. Right-click from the UI hotbar → GC2 automatically fires the “use” process internally

Insert a Rune into a Weapon

  1. Add Base Item = Rune to the Sockets of weapon Item Iron Sword
  2. Create Rune of Attack as a child Item of Rune (Property: attack +10)
  3. Use Instruction Attach Runtime Item to mount a rune from the player’s inventory → onto the sword
  4. In the attack Formula, sum sword.attack + attached_rune.attack (Stats module)

Trade with a Merchant

  1. Attach Bag + Merchant to the NPC, Add Stock to the Bag
  2. On Interact, use Open Merchant UI instruction to start trading (Client Bag = Player's Bag)
  3. Play sounds or notifications on Merchant UI’s On Buy / On Sell

Random Treasure Chest Contents

  1. Add a Bag component to the Chest Prefab
  2. On Start Trigger → Call Loot Table 3 times
  3. Player acquires items via Open Bag UI on opening

Crafting Stations (Forge / Alchemy Differentiation)

Use the same Tinker UI and just swap the parent Item in Filter Item. Forge → Filter = Equipment, Alchemy → Filter = Potion.

Slow Movement Speed Based on Item Weight

On Trigger On Add / On Remove, check Is Overloaded. If true, use Change Movement Speed to reduce the character’s speed and display a notification UI.

Skill-like Usage with Cooldown

Use Add Item Cooldown to apply cooldown after use. In the UI, monitor remaining time with Is Item Cooldown and gray out the display.


Tips and Notes

  • Max Stack is forced by Socket presence: Items with Sockets can differ per instance, making stacking impossible. When designing for stacking, use separate Items without sockets
  • Leverage inheritance to reuse the same logic: Common processes like “play a voice on use” for all potions should be written in the parent Item’s On Use, with children relying on Execute From Parent
  • Shift decimal values: Currency is integers only. If you need $0.50, treat it as 50 cents
  • Grid Bag is a last resort: Unless you want shape-puzzle elements, List Bag is sufficient. UI implementation is significantly easier
  • Don’t confuse Item and Runtime Item: Template vs. instance. Note that both variants exist for Equip/Drop/Has instructions
  • Merchant Buy/Sell is from the player’s perspective: On Buy = when the player buys. Don’t interpret the names backwards
  • Save targets: Runtime Items, Bag contents, equipment state, and cooldowns are all saveable by default (via the Save & Load system)
  • Move Content To Bag and Move Wealth To Bag are separate instructions: You need both for a “take everything” from a treasure chest
  • Make full use of Filter by Parent: Tab separation, merchant genres, and crafting genres can all be controlled by parent Item type. Item hierarchy design is the key to success


Summary

This article covered the Inventory module for Game Creator 2.

The Inventory module encompasses everything needed for in-game item management, from Item definitions to Bag management, equipment, currency, shop transactions, crafting, and random drops.

The Item inheritance-based type filtering system is particularly powerful — the design that controls tab separation, merchant genres, and crafting genres all through parent Item types provides robustness that doesn’t break down even in large-scale games.

Complete Article List — Game Creator 2 Complete Guide Series Indexen.senkohome.com/gamecreator2-series-index/

We hope you’ll continue reading our next article as well.