ORK Framework Logo - RPG Editor for Unity
  • Features
  • Showcase
  • Guide
    • Documentation
    • Tutorials
    • API
  • ORK 2
    • Tutorials
    • Plugins
    • API
  • Support
  • Forum
  • Get ORK

2D RPG Quickstart

  • START 2D RPG Quickstart
  • 01 Initial Setup
  • 02 Player Setup
  • 03 Music & Scenes
  • 04 UI System Setup
  • 05 UI Boxes
  • 06 Flying Texts
  • 07 Status Values
  • 08 Status Effects
  • 09 First Abilities
  • 10 Fighter Setup
  • 11 First Enemies & Battle AI
  • 12 Battle System Setup
  • 13 Animating Battle Start and End
  • 14 Random Battles
  • 15 Animating Actions
  • 16 Player Battle HUD
  • 17 Elemental Attacks
  • 18 Animating More Actions
  • 19 Inventory & Loot
  • 20 Equipment
  • 21 Loot, Start Equipment & Viewers
  • 22 Magic Abilities
  • 23 Caster Setup
  • 24 More Enemies
  • 25 Start Menu & Save Games
  • 26 Menu Screens
  • 27 Interactions
  • 28 Item Collectors
  • END 2D RPG Quickstart

3D RPG Quickstart

  • START 3D RPG Quickstart
  • 01 Initial Setup
  • 02 Player Setup
  • 03 Music & Scenes
  • 04 UI System Setup
  • 05 UI Boxes
  • 06 Flying Texts
  • 07 Status Values
  • 08 Status Effects
  • 09 First Abilities
  • 10 Fighter Setup
  • 11 First Enemies & Battle AI
  • 12 Battle System Setup
  • 13 Animating Battle Start and End
  • 14 Random Battles
  • 15 Animating Actions
  • 16 Player Battle HUD
  • 17 Elemental Attacks
  • 18 Animating More Actions
  • 19 Inventory & Loot
  • 20 Equipment
  • 21 Loot, Start Equipment & Viewers
  • 22 Magic Abilities
  • 23 Caster Setup
  • 24 More Enemies
  • 25 Start Menu & Save Games
  • 26 Menu Screens
  • 27 Interactions
  • 28 Item Collectors
  • END 3D RPG Quickstart

Status System Setup

  • START Status System Setup
  • 01 Status Values
  • 02 Status Development
  • 03 Attack/Defence Modifiers
  • 04 Status Effects
  • 05 Formulas
  • 06 Ability & Item Types
  • 07 Abilities Part 1: Attacks
  • 08 Abilities Part 2: Support & Sabotage
  • 09 Abilities Part 3: Elemental Magic
  • 10 Items
  • 11 Equipment Part 1: Slots & Slot Set Templates
  • 12 Equipment Part 2: Weapons
  • 12.5 (Optional) Equipment Part 2.5: Weapons
  • 13 Equipment Part 3: Shields, Armor & Accessories
  • 13.5 (Optional) Equipment Part 3.5: Shields, Armor & Accessories
  • 14 Equipment Part 4: Available Equipment Templates
  • 15 Loot
  • 16 Battle AIs
  • 17 Combatants Part 1: General Settings
  • 18 Combatants Part 2: Players
  • 19 Combatants Part 3: Enemies
  • 20 Combatant Groups
  • END Status System Setup

3D RPG Playground

  • START 3D RPG Playground
  • 01 Player Setup
  • 02 Start Menu
  • 03 First Interaction
  • 04 Music
  • 05 Areas
  • 06 Collecting Items
  • 07 Displaying Equipment
  • 08 Combatant Prefabs, Icons & Portraits
  • 09 Combatant Animations
  • 10 Camera Positions
  • ANIM 01 Battle Start/End Schematics
  • ANIM 02 Use, Cast & Camera
  • ANIM 03 Abilities & Items
  • ANIM 04 Physical Attacks
  • ANIM 05 Special Actions
  • BATTLE 01 Battle Menu
  • BATTLE 02 Prepare for Battle
  • TURN 01 Turn Based Setup
  • TURN 02 Turn Order HUD
  • ATB 01 Active Time Setup
  • ATB 02 Cast Times
  • ATB 03 Timebar HUD
  • BATTLE 03 The First Battle
  • BATTLE 04 Hunting Move AI
  • BATTLE 05 Spawning Combatants
  • 11 Save Games
  • MENU 01 UI Boxes
  • MENU 02 Template HUDs
  • MENU 03 Overview Menu
  • MENU 04 Menu Screens
  • 12 Shop
  • BATTLE 06 Random Battles
  • DUNGEON 01 Enter the Dungeon
  • DUNGEON 02 The Trapdoor
  • DUNGEON 03 Enemies on Level 1 & 2
  • DUNGEON 04 Traps on Level 3
  • DUNGEON 05 Going Deeper
  • 13 Bestiary (+MENU+ANIM)
  • QUEST 01 Hunting Quests (+MENU)
  • QUEST 02 Guard NPC
  • QUEST 03 Forest Ruin Cheese
  • QUEST 04 Witch NPC with Cheese
  • QUEST 05 Quest Mark HUDs
  • 14 Research Trees (+MENU)
  • CRAFT 01 Crafting Materials
  • CRAFT 02 Crafting Recipes
  • CRAFT 03 Crafting Menu
  • CRAFT 04 Crafting Proficiency & Critical Crafting
  • CRAFT 05 Materials Loot
  • 15 Changing Choice Dialogue
  • 16 Follow Me!
  • BATTLE 07 Sequence Loot Dialogue

3D Action RPG

  • START 3D Action RPG
  • 01 Status System Setup
  • 02 Player Setup
  • 03 Player Weapon
  • 04 Player Attacks
  • 05 Enemy: Chomper
  • 06 Chomper Attack
  • 07 Hit & Death
  • 08 HUDs
  • 09 Rolling on the Floor
  • 10 Enemy: Spitter
  • 11 Spit Attack
  • 12 Potion
  • 13 Grenade
  • 14 Item HUD
  • 15 Enemy: Grenadier
  • 16 Grenadier Melee Attacks
  • 17 Grenadier Flamethrower
  • 18 Item Drops
  • END 3D Action RPG

2D Grid Battle RPG

  • START 2D Grid Battle RPG
  • 01 Player Setup
  • 02 Prefab & Music Setup
  • 03 Randomizing Combatants
  • 04 UI Setup
  • 05 Battle Start, End & Phase Schematics
  • 06 Battle System Setup
  • 07 Battle Grid Setup
  • 08 Grid Move
  • 09 Forest Battle Grid
  • 10 Battle AI
  • 11 Ability Ranges
  • 12 Death & Use Schematics
  • 13 Attack Schematic
  • 14 Shoot Schematics
  • 15 Battle Selection Interaction
  • END 2D Grid Battle RPG

Schematics

  • Simple Start Schematic
  • Battle Start Schematic
  • Battle End Schematic
  • Moving to Target and Back
  • Animating a Base Attack
  • Animating a Magic Ability
  • Grid Movement
  • Open and Close UI Animations
  • Flying Text Mover

UI Setups

  • Unity UI: Initial Setup
  • Unity UI: TextMesh Pro Setup
  • Unity UI: UI Box
  • Unity UI: Flying Text
  • Unity UI: Dragging Notification
  • Unity UI: Canvas with Screen Space Camera
  • Unity UI: Interaction HUD
  • Unity UI: Simple Player HUD
  • Unity UI: Quest HUD
  • Unity UI: Shortcuts HUD
  • Unity UI: Currency HUD
  • Unity UI: Tooltip HUD
  • Unity UI: Control HUD
  • Unity UI: Attack Modifiers
  • Unity UI: Defence Modifiers

Gameplay Bits

  • Combining Input Origins
  • Combining Status Value Flying Texts
  • Fun With Flying Text
  • HUD Effects With Conditional Schematics
  • Inventory Containers
  • Multi Interaction Controllers
  • World Space HUD
  • World Space Dialogue
  • Home
  • Guide
  • Tutorials
  • 2D RPG Quickstart
  • 19 Inventory & Loot

19 Inventory & Loot

Table of Contents
  • Inventory Settings
  • Item Types
    • 0: Potions
      • Content Information
      • Item Type Settings
    • 1: Equipment
      • Content Information
    • 2: Valueables
      • Content Information
  • Currencies
    • Content Information
    • Base Settings
  • Potion
    • Content Information
    • Item Settings
      • Price Settings
    • Use Settings
    • Target Selection Settings
    • User Settings > Use Cost
    • Target Settings > Target Changes
    • Battle Animation
  • High Potion
    • Content Information
    • Target Settings > Target Changes > Target Change 0 > Status Change 0
  • Magic Potion
    • Content Information
    • Target Settings > Target Changes > Target Change 0 > Status Change 0
    • Battle Animation
  • Revive Potion
    • Content Information
    • Use Settings
    • Target Selection Settings
    • Target Settings > Target Changes > Target Change 0 > Status Change 0
    • Battle Animation
  • Cure Potion
    • Content Information
    • Target Settings > Target Changes > Target Change 0 > Status Change 0
    • Battle Animation
  • Loot
    • Gold
      • Loot Table 0
    • Potion
      • Loot Table 0
  • Combatants General Settings
    • Inventory & Equipment > Default Loot Settings
  • Player Start Inventory
    • Inventory & Equipment > Start Inventory
  • Save Changes
  • Testing

In this tutorial we’ll add items and a currency to the game.

Items can do the same things abilites can, but are (usually) consumables that are removed from the inventory upon use. You can also create non-consumable and even non-useable items, e.g. for quests or crafting recipes, or to progress in your game. Learn more about items in this documentation.

Currency can be used to purchase things in shops, to pay for status upgrades (e.g. via research trees) and more. Learn more about currencies in this documentation.

We’ll set up multiple inventory-related things:

  • inventory settings
  • item types
  • currency
  • 5 items (potions)
  • loot
  • start inventory

Let’s get to it!

Inventory Settings #

Navigate to Inventory > Inventory Settings, we’ll check how the inventory system is set up. You can learn more about the inventory system in this documentation.

We’ll use the group inventory (i.e. all combatants in a group share the inventory), auto stack items and equipment and not use any kind of quantity or stack size limit – so, we’ll stick with the default setup of a new project.

  • Inventory Type
    Select Group.
  • Item Stack Type
    Select Auto Stack.
    Items will automatically stack when added to the inventory.
  • Equipment Stack Type
    Select Auto Stack.
    Equipment will automatically stack when added to the inventory.
  • Limit Quantity
    Disable this setting.
  • Limit Stack
    Disable this setting.

There’s a lot more settings available to control inventory related things, but we don’t really need to change anything for now. We’ll later revisit this, e.g. to set up item collection dialogues.

Item Types #

Next, we’ll set up item types.

Navigate to Inventory > Item Types, we’ll change the Default type and add two new item types.

0: Potions #

All potions will be part of this item type.

Content Information #

  • Name
    Set to: Potions

Item Type Settings #

  • Damage Type
    Select Default.
    The damage type manages which animations will be used on targets to animate damage, evade, etc.
    The default damage type is already set up to use the default animation types added for these.

1: Equipment #

Copy the Potions item type and change the following settings.

Content Information #

  • Name
    Set to: Equipment

2: Valueables #

Copy the Potions item type and change the following settings.

Content Information #

  • Name
    Set to: Valueables

Currencies #

Next, we’ll set up the currency for our game. You can add multiple currencies, but we’ll just use one. You can learn more about currencies in this documentation.

Navigate to Inventory > Currencies and select the Default currency.

Content Information #

  • Name
    Set to: Gold
  • Sprite (Icon)
    Select icons_116.

Click on the Find TMP Tag button to get the icon’s tag for displaying it in texts (via text codes). This uses TextMesh Pro’s sprite asset setup.

Base Settings #

  • Item Type
    Select Valueables.

Potion #

Our first item will be a potion to restore some HP.

Navigate to Inventory > Items, we’ll change the Default item.

Content Information #

  • Name
    Set to: Potion
  • Description
    Set to: Restores 100 HP
  • Sprite (Icon)
    Select icons_164.

Click on the Find TMP Tag button to get the icon’s tag for displaying it in texts (via text codes). This uses TextMesh Pro’s sprite asset setup.

Item Settings #

  • Item Type
    Select Potions.

Price Settings #

You can set a price to purchase the potion in shops here.

We don’t add a shop in this tutorial series, though.

Use Settings #

  • Useable In
    Select Both.

Target Selection Settings #

  • Target Type
    Select Ally.
  • Target Ranget
    Select Single.

User Settings > Use Cost #

  • Consume
    Enable this setting.
  • Auto Consume
    Select On Selection.
    This’ll automatically remove the item from the user’s inventory when selecting a target (i.e. when the action was registered with the system)
    You can also use other options, e.g. consuming it when the outcome is calculated (select No for that).

Target Settings > Target Changes #

Click on Add Target Change.

Click on Add Status Change.

  • Change Type
    Select Status Value.
  • Status Value
    Select HP.
  • Operator
    Select Add.
  • Change Value
    Select Value > Value.
    Select 100.

Battle Animation #

We’ll use the Use schematic and replace the prefab.

Click on Add Battle Animation.

  • Schematic Asset
    Select the Use schematic.
  • Set Prefabs
    Enable this setting.
  • Auto Destroy After Time
    Enable this setting.
  • Time
    Set to 0.55.
  • Prefab
    Select the SmokeGreen prefab.
    You can find it in Assets/Tutorial Assets/Prefabs/Effects/.

High Potion #

The high potion does the same as the potion – it just heals more HP.

Copy the Potion item and change the following settings.

Content Information #

  • Name
    Set to: High Potion
  • Description
    Set to: Restores 500 HP
  • Sprite (Icon)
    Select icons_167.

Click on the Find TMP Tag button to get the icon’s tag for displaying it in texts (via text codes). This uses TextMesh Pro’s sprite asset setup.

Target Settings > Target Changes > Target Change 0 > Status Change 0 #

  • Change Value
    Select Value > Value.
    Set the value to 500.

Magic Potion #

The magic potion restores MP instead of healing HP.

Copy the High Potion item and change the following settings.

Content Information #

  • Name
    Set to: Magic Potion
  • Description
    Set to: Restores 50 MP
  • Sprite (Icon)
    Select icons_155.

Click on the Find TMP Tag button to get the icon’s tag for displaying it in texts (via text codes). This uses TextMesh Pro’s sprite asset setup.

Target Settings > Target Changes > Target Change 0 > Status Change 0 #

  • Status Value
    Select MP.
  • Change Value
    Select Value > Value.
    Set the value to 50.

Battle Animation #

We’ll change the prefab.

  • Prefab
    Select the SmokeBlue prefab.

Revive Potion #

The revive potion revives the target and restores a 50 HP.

Copy the Potion item and change the following settings.

Content Information #

  • Name
    Set to: Revive Potion
  • Description
    Set to: Revives the target with 50 HP
  • Sprite (Icon)
    Select icons_173.

Click on the Find TMP Tag button to get the icon’s tag for displaying it in texts (via text codes). This uses TextMesh Pro’s sprite asset setup.

Use Settings #

  • Revive Target
    Enable this setting.

Target Selection Settings #

We need to be able to target dead combatants – let’s limit the use on dead combatants.

  • Is Dead
    Select Yes.
    If you select Ignore you can also target alive combatants.

Target Settings > Target Changes > Target Change 0 > Status Change 0 #

  • Change Value
    Select Value > Value.
    Set the value to 50.

Battle Animation #

We’ll add the revive schematic.

Click on Add Battle Animation.

  • Schematic Asset
    Select the PlayerRevive schematic.

Cure Potion #

The cure potion will remove all negative status effects.

Copy the Potion item and change the following settings.

Content Information #

  • Name
    Set to: Cure Potion
  • Description
    Set to: Removes all negative effects
  • Sprite (Icon)
    Select icons_185.

Click on the Find TMP Tag button to get the icon’s tag for displaying it in texts (via text codes). This uses TextMesh Pro’s sprite asset setup.

Target Settings > Target Changes > Target Change 0 > Status Change 0 #

Instead of changing a status value, we’ll change status effects.

  • Change Type
    Select Status Effect.
  • Change
    Select Remove.
  • Use Effect Type
    Enable this setting.
    We’ll remove based on the status effect type.
  • Status Effect Type
    Select Negative.
  • Remove Type
    Select All.

Battle Animation #

We don’t replace the prefab, using the schematic’s original (Smoke) effect.

  • Set Prefabs
    Disable this setting.

Loot #

Loot allows setting up different loot tables, optionally based on level checks or other conditions, e.g. an enemy can drop a regular Potion for level 1 to 25 and a High Potion for level 26 to 50. Learn more about loot in this documentation.

We’ll set up 2 loot tables for our enemies to give gold and potions as battle spoils, without any level checks or other conditions.

Navigate to Combatants > Loot, we’ll change the Default loot and add another new loot.

Gold #

We’ll give a random amount of gold between 1 and 20.

  • Name
    Set to: Gold

Loot Table 0 #

Click on Add Loot Table.

Click on Add Item in the Loot Settings.

  • Type
    Select Currency.
  • Currency
    Select Gold.
  • Quantity
    Select Value > Random.
    Set the 1st value to 1.
    Set the 2nd value to 20.

Potion #

Add a new Loot setup.

  • Name
    Set to: Random Potion

Loot Table 0 #

Click on Add Loot Table.

We’ll add multiple potions and randomly get one in the Loot Settings.

  • Get Random
    Enable this setting.
    We’ll get one of the defined items randomly – the individual item’s chance check is still used.

Click on Add Item.

  • Type
    Select Item.
  • Item
    Select Potion.
  • Quantity
    Select Value > Value.
    Set the value to 1.
  • Chance
    Select Value > Value.
    Set the value to 75.

Copy the Potion item.

  • Item
    Select Magic Potion.
  • Chance
    Set the value to 40.

Copy the Magic Potion item.

  • Item
    Select Cure Potion.
  • Chance
    Set the value to 30.

Copy the Cure Potion item.

  • Item
    Select High Potion.
  • Chance
    Set the value to 20.

Copy the High Potion item.

  • Item
    Select Revive Potion.
  • Chance
    Set the value to 10.

Combatants General Settings #

We’ll add the loot as default loot for all combatants.

Navigate to Combatants > Combatants > General Settings.

Inventory & Equipment > Default Loot Settings #

We’ll use both Gold and Random Potion as loot.

  • Loot Origin
    Select Loot.

Click on Add Loot.

  • Loot
    Select Gold.

Click on Add Loot again.

  • Loot
    Select Random Potion.

Player Start Inventory #

We’ll add some items to the start inventory of our player combatant.

Navigate to Combatants > Combatants and select the Fighter combatant.

Inventory & Equipment > Start Inventory #

Click on Add Item.

  • Type
    Select Currency.
  • Currency
    Select Gold.
  • Quantity
    Select Value > Value.
    Set the value to 50.

Click on Add Item.

  • Type
    Select Item.
  • Item
    Select Potion.
  • Quantity
    Select Value > Value.
    Set the value to 5.

Copy the Potion item.

  • Item
    Select Magic Potion.
  • Quantity
    Set the value to 3.

Copy the Magic Potion item.

  • Item
    Select Cure Potion.

Copy the Cure Potion item.

  • Item
    Select High Potion.
  • Quantity
    Set the value to 1.

Copy the High Potion item.

  • Item
    Select Revive Potion.

Save Changes #

And that’s it for now!

Save the changes using the Save Settings button at the bottom of the editor.

Testing #

Hit play and start a battle.

You now have items available and can use them in battle.

And we get loot from killed enemies.

 

Next, we’ll add equipment.

Share This Article :
  • Facebook
  • Twitter
  • LinkedIn
  • Pinterest
Updated on March 7, 2023
Table of Contents
  • Inventory Settings
  • Item Types
    • 0: Potions
      • Content Information
      • Item Type Settings
    • 1: Equipment
      • Content Information
    • 2: Valueables
      • Content Information
  • Currencies
    • Content Information
    • Base Settings
  • Potion
    • Content Information
    • Item Settings
      • Price Settings
    • Use Settings
    • Target Selection Settings
    • User Settings > Use Cost
    • Target Settings > Target Changes
    • Battle Animation
  • High Potion
    • Content Information
    • Target Settings > Target Changes > Target Change 0 > Status Change 0
  • Magic Potion
    • Content Information
    • Target Settings > Target Changes > Target Change 0 > Status Change 0
    • Battle Animation
  • Revive Potion
    • Content Information
    • Use Settings
    • Target Selection Settings
    • Target Settings > Target Changes > Target Change 0 > Status Change 0
    • Battle Animation
  • Cure Potion
    • Content Information
    • Target Settings > Target Changes > Target Change 0 > Status Change 0
    • Battle Animation
  • Loot
    • Gold
      • Loot Table 0
    • Potion
      • Loot Table 0
  • Combatants General Settings
    • Inventory & Equipment > Default Loot Settings
  • Player Start Inventory
    • Inventory & Equipment > Start Inventory
  • Save Changes
  • Testing
Sitemap
  • Features
  • Showcase
  • Guide
    • Documentation
    • Tutorials
    • API
  • ORK 2 Hub
    • Tutorials
    • Plugins
    • API
  • Support
  • Forum
  • Get ORK
  • Contact
  • Blog
  • Makinom
  • gamingislove.com
Categories
  • News (60)
  • ORK 2 (137)
    • Tutorial (137)
      • Game tutorial (50)
      • Gameplay (32)
      • How-to (55)
  • Release (130)
Search

© 2015 Gaming is Love e.U.

Disclosure: This site may contain affiliate links, which means I may receive a commission if you click a link and purchase something that I have recommended. While clicking these links won’t cost you any money, they will help me fund my development projects while recommending great assets!