Game Creator
  • Welcome to Game Creator!
  • Quickstart
    • Get Started
    • Setup
    • Tutorials
  • Game Creator
    • Game Creator
      • Actions
      • Conditions
      • Triggers
      • Hotspots
      • Characters
        • Player
        • Markers
        • Gestures
        • States
        • Advanced
          • IK in custom Animations
      • Camera
        • Camera Motors
      • Variables
        • Global Variables
        • Local Variables
        • List Variables
    • Systems
      • Localization
      • Event System
      • Timeline
      • UI
      • Module Manager
      • Game Creator Toolbar
      • Pool System
      • Game Creator API
        • Custom Actions
        • Custom Conditions
        • Custom Triggers
        • Custom Hooks
        • Custom Save & Load
        • Variables Access
        • Custom Module
  • Dialogue
    • Dialogue
      • Anatomy
      • Actors
      • Dialogue UI
      • API
  • Inventory
    • Inventory
      • Inventory Window
        • Catalogue
        • Recipes
        • Types
        • Settings
      • Merchants
      • Containers
      • Loot Tables
      • Equip Items
      • Actions
      • Conditions
      • Custom Inventory UI
  • Quests
    • Quests
      • Quests Overview
      • Create Quests
      • Quests UI
        • Custom UI
  • Stats
    • Stats
      • Stats Overview
        • Stat
        • Attributes
        • Status Effects
        • Formulas
        • Stat Modifiers
      • Stats UI
      • Common Use Cases
        • Simple Health Bar
        • Regenerative Mana
        • Poison Status Effect
        • Levels and XP
        • Strength and Armor
        • Lockpicking
  • Behavior
    • Behavior
      • Behavior Graph
        • Nodes
        • Blackboard
      • Perception
  • Shooter
    • Shooter
      • Weapons
      • Ammunition
      • Interaction
      • Examples
        • Example 1 - Get Started
        • Example 2 - Pick Weapons
        • Example 3 - Top Down
        • Example 4 - Side Scroll
        • Example 5 - First Person
        • Example 6 - Combat
      • Advanced
        • Custom Crosshairs
        • Shooter API
  • Melee
    • Melee
      • Weapons
        • Blade Component
      • Shields
      • Melee Clips
      • Combat
  • Traversal
    • Traversal
      • Obstacles
      • Climbables
      • Built-in Elements
  • Annex
    • Roadmap
    • FAQ
Powered by GitBook
On this page

Was this helpful?

  1. Inventory
  2. Inventory

Loot Tables

Slime dropped 5 coins and 1 Rusted Sword

PreviousContainersNextEquip Items

Last updated 6 years ago

Was this helpful?

Looting is an integral part of any RPG game and is one of those things game designers never stop tweaking during the development of the game, because its relies on player progression and a misplaced item could make the Player overpowered at the beginning of them game.

That's why we wanted to create a looting system that was easy to debug and tweak.

Loot Tables allow to easily define what items will be dropped after doing a certain task and with which probability these items will be dropped (if any at all).

To create a Loot Table object, right click on the Project Panel and select Create → Game Creator → Inventory → Loot Table. This will create a Loot Table object you can place anywhere you want in your project.

We recommend keeping all Loot Table objects inside a Assets/LootTables/ folder in your project, but feel free to organize them as you see fit.

For example, if two items have the following probability weights:

  • Item A: 3

  • Item B: 1

The probability of dropping Item A is 75% while dropping Item B is only 25%

Using Loot Tables in a game

Once you have created a Loot Table, using it is very simple. All that needs to be done is call the Use Loot Table Action and drag and drop the Loot Table object onto its field.

This will execute the Loot Table and give the Player a random item picked from the Table (if any). You can also send the randomly picked item into a Container, instead of the Player Inventory.

Executing a Loot Table will only pick one item. You might want to run it three, four or more times after defeating an enemy to give the player not only one but multiple random items.

Each time you execute a Loot Table you'll pick a different random item, even from them same Actions object.

A Loot Table is based on At the end of the Loot Table there's a summary of the probabilities of dropping each item based on their weight.

weighted probabilities.
(Screenshot from Diablo III, loot scattered after defeating an enemy)
(Simple Loot Table for a Common Enemy)
(Loot Table Action using the Common Enemy table)