Inventory Manager

Inventory Manager is the base inventory and looting system for building your game's inventory.

I wrote Inventory Manager to work in the context of a fantasy RPG prototype, but discovered it's great in all games that need an inventory.

Inventory Manager uses decentralized loot generation based on simple lootable objects. Any item in your game can be turned into a lootable object by attaching the LootableObject component.

Lootable objects could be chests, slain opponents, wreckage to be salvaged, anything that spawns random pieces of loot. Lootable Objects can also be special objects that contains only one specific piece of loot like that bronze statue with the ruby eye - maybe just the one you need to complete your quest?

Inventory Manager includes hooks to optionally trigger animations, fading & destruction on the lootable object. The LootableObject component can open the lid to your chest, make it fade away when empty and finally destroy the GameObject, removing it from your scene.

Having items that hold a single piece of loot can be used to pick up items from the game world - like weapons, armor or anything lying around that your players might want. Simply make the object lootable and when your player loots that object, destroy the GameObject as it transfers the item from the game world into the player's inventory. It is possible to optionally instantiate items back into the game world when removed from the inventory, and if these items are Lootable, they can be picked back up again!

Easy & Versatile

Inventory Manager allows for easy prefabbing, customizing and organizing of your lootable objects and their lootable content. Each lootable object holds one or more loot tables that define the loot that will be spawned by the item.

As a lootable item can have any number of concurrent loot tables, these can be edited and organized for clarity. You can define your junk loot, good loot and rare loot very easily - each in it's own concurrent loot table. By organizing loot in a concurrent table, it's easy to quickly understand at a glance the chance of any piece of loot being generated.

The system is versatile. Loot tables can be set to generate loot based on a chance value or by picking any number of objects from the list. You can easily prevent picking duplicates with a flag.

It's easy to generate loot in a way that makes human sense. Any given loot table can have a chance value to be included or ignored when generating the loot for an object. If we want "A 10% change of Rare loot, which will be one of the items from this list", this is done by giving the list itself a 10% chance, choosing "Pick from List" and assigning a value of 1.

Drag & Drop

Inventory Items can be dragged and dropped by their icons between bags, the character sheet or dropped back into the game world. Bags can be added, removed and swapped - even when full. Bags are replacable if space permits for easy upgrades to bag size. Simply drop a new bag onto an occupied bag slot and if there is room in the new bag for all the items, the bag will be replaced.

Item Editor

Inventory Manager includes an Inventory Item Editor as an editor window for ease of creating, browsing and maintaining inventory objects.