S-Inventory: Equipment, Crafting, Skill Bar, Item Groups, Containers & Merchant (C# & JS)

This is an inventory system that anyone can setup in few minutes. This system is easy to edit from the inspector without having to modify scripts. It’s suitable for RPG games. This inventory system also includes an equipment system, merchant system, crafting system and a skill bar system.

  • Customize everything from the inspector without modifying the code.
  • Suitable for different types of games!
  • Fully commented C# and JS code!
  • Mobile friendly.
  • 20+ Custom Events to customize the asset even more!
  • Comes with a detailed guide.
  • Three item pick methods (Mouse, keyboard and on collision pickup).
  • Two item drop methods (Re-spawn items or destroy items).
  • Create and customize items easily.
  • Two types of items: Bag items and Currencies including consumable and non-consumable items.
  • Customizable UI: Drag and drop items inside the same menu or between different menus to equip them, move them to a container, skill bar slots, sell them to a vendor. Mouse hover on an item to show its info. Right click to open the item actions menu. Drag to real world to drop items (optional). And more!
  • Load and save items in different menus.
  • Item Groups: Create a list of items within one object and display them randomly (optional). Perfect to use for enemy drop loot trophies.
  • Vendor system: Create vendors easily to trade with.
  • Buy and sell your items to vendors.
  • Equipment system: Easily create your custom equipment slots (+3 different ways to equip an item). Assign equipment attributes to different items and call their values from your code to customize the asset to your needs!
  • Skill Bar system: Manage a dynamic skill bar including assigning a trigger key for each slot and a use cool down.
  • Containers system: Create unlimited containers and use them to store items. You can easily transfer items between containers and inventory. Most features of the inventory UI is available for the container UI as well (dragging and dropping items, dragging the whole container window, showing item’s info, removing items, etc…).
  • Crafting system: Full crafting system that allows you to create unlimited recipes and customize the crafting window to your needs.

Demo:
WebPlayer Demo

Documentation:
Online Documentation

ChangeLog:

ChangeLog

v1.01 – 25**/09/2013**:

– Added a sound when the player tries to add an item while the inventory is full.
– Added a label that appears to inform the player when an item is added, removed, equipped or when the inventory is full.
– Fixed the inventory size bug.

v1.02 – 03/11/2013:

– Added a skill bar system to the package.
– Dynamic skill bar that you can edit the number of slots in it, their size, texture, GUI style and many more options.
– Link the skill bar easily to your scripts using some special functions.
– Added health potion item.

v1.03 – 08/12/2013:

– Converted all the scripts to C#.
– The package now includes C# and JS scripts at the same price.

v1.05 – 16/05/2014:

– Fixed bug while dragging the inventory windows on the C# version.
– Equipment GUI window re-scripted to minimize the lag on mobile devices.
– Added a GUI button that shows/hides the inventory window.
– Added a GUI button that shows/hides the equipment window.
– Added a GUI button that picks up items (without the use of mouse and keyboard).
– Added a new inventory GUI window position: middle screen.
– Added custom events: callbacks used to customize the inventory, equipment, vendor and skill bar system with code.

v1.06 – 11/06/2014:

– Fixed the item’s description display when the mouse hovers over one of the inventory’s items.
– Improved the GUI skin for the inventory, skill bar, equipment, vendor and item group menus.
– Fixed some other small bugs.

v1.07 – 15/08/2014:

– Added a crafting system.
– Customize the crafting window to your needs.
– Unlimited recipes.
– New custom event when an item is crafted.

v1.08 – 05/10/2014:

– Added a container system.
– Customize the container window UI.
– Create unlimited containers and store items in them.
– Transfer items easily between the inventory and containers.
– Containers UI support most actions done by the inventory UI: dragging and dropping items, dragging the whole window, showing item’s info, removing items, etc…

v1.09 – 21/12/2014:

– S-Inventory now supports uGUI introduced in Unity 4.6.
– Refactored code to reduce memory and CPU usage.

v1.20 – 30/12/2014:

– Both demo scenes have been added.
– You can now drag and drop items between the inventory, equipment and skill bar slots.
– Items now are directly usable from the inventory menu (comes with a new custom event).
– Added new custom events when a player picks up or drops an item.
– Skill bar items are now usable with a trigger key, cool down and a custom event for each slot.
– Added the option to drop items when you drag them from the inventory to the game world.

v1.23 – 17/03/2015:

– 2D support.
– Added an option to use the global drop type or pick a different drop type for each item.
– Added an option to disable/enable showing toggle info for each UI panel.
– Added 12 events for showing/hiding UI panels.
– Added the option to destroy or keep items on inventory use.
– The whole item object is now passed in the inventory events for more customization.

v1.23 – 03/05/2015:

– Fixed a bug in creating currencies.
– Added the option to display one currency in the bag part of the inventory.
– Added an animator to play opening and closing animations for the item group chest.
– Added the option to press “Enter” to complete dropping or selling more than item at a time.
– Added the option to close all panels with one key.

v1.25 – 25/06/2015:

– Fixed a bug in dragging and dropping items from the skill bar menu/equipment menu to the inventory menu.
– You can have multiple equipment/skill bar slots sharing the same name.
– You can now choose whether to keep an item (put it back in the inventory) or destroy it after using it in a recipe.
– In each recipe, items can take a certain time (defined in the inspector) to craft, while it’s being crafted you will see a percentage indicating when it will be ready and you can’t use that recipe till the item is ready.
– When an item is crafted, it won’t be added automatically to the player’s inventory, it will remain in the crafting window till the player takes it to the inventory manually.

v1.26 – 16/07/2015:

– Added inventory tabs.
– New UI graphics.

v1.27 – 13/08/2015:

– Improving the inventory tabs feature.
– Making all the windows draggable.
– Adding equipment attributes info in the equipment window.
– Added the option to show a progress bar while crafting an item.
– Added equipment objects: The ability to activate objects when equipping an item by linking the object and the item in the equipment inspector.
– Fixed a small bug with dragging items.
– Equipment attributes are now shown in the item’s description when hovering over its icon.

v1.28 - 12/12/2015:

  • Added dragging and dropping feature for all UI windows.
  • You can now assign a name, for each vendor, that will appear in the vendor UI window.
  • Make one slot and create others based on that slot.
  • Items in the vendor UI window are now shown along with their prices and the currency type.
  • Changed the way item slots are created in the vendor UI window: You just create one slot and the rest will be created depending on settings you choose from the inspector.
  • You can now play a sound effect when the player can’t afford to purchase something from a vendor.

v1.29 - 20/12/2015:

  • Added the option to allow a double mouse click to move an item back from a vendor to the inventory after attempting to sell it.
  • Added option to allow a double mouse click to purchase an item from a vendor.
  • Added a button that will allow the player take back all the items (when attempting to sell them) from a vendor at once (Note that the player can still double click or select one item at time).
  • Added the option to show the item’s info in the vendor menu when hovering the mouse over it.

v1.30 - 01/01/2016:

  • New item weight feature:
  • Set the weight for each item.
  • Set the maximum weight for the inventory.
  • Display the “CurrentWeight/MaximumWeight” in the inventory panel.
  • Added the option to require a currency amount to craft an item in a recipe, you can pick the currency name and amount and the player will be required to have that amount so that he crafts the item.

v1.31 - 16/04/2017:

  • Small bug fixes.
  • Changed the way the system creates inventory, container, item group and vendor item slots in order to improve the overall performance.
  • General code refactoring.
  • Added namespaces.

Third Party Support:

S-Quest
Dialogue System
Realistic FPS Prefab

Screenshots:


UPDATE: While dropping an item, if its amount is more than 1. Then the player will have to enter the amount to drop from this amount.

Hello Soumia,

Great Project!!

Hello Japhet,

Thank you for this nice comment!
This project will be released in 2 weeks maximum. It will cost from 10$ to 15$ (I don’t think that’s expensive haha). I still have more ideas to improve this inventory system. Also, If you have any suggestions for features you want to see in this inventory system, please let me know.

Thanks,
SoumiDelRio.

New update:

  • Sounds added when: picking up an item, dropping it, picking up a coin (2 types), opening the inventory and closing it.
  • Saving and loading items and coins: I did this using PlayerPrefs. But if you have any suggestions for other saving and loading methods, please let me know.
  • I have added some new functions in the script like “ClearItems”, “ClearSavedItems”, “ReloadItems”, “Save” and many more in order to make the system editable by external scripts.

Web Player will be updated tomorrow.

Can it be setup that items can take up more than 1 square. Eg a rifle could be 3 squares long, and have it that the item is rotatable for space management.

Very good suggestion John G! Thank you! I’ll see what I can do.

Another small update:

  • If you are using the mouse pick up method, an information box will be displayed whenever your mouse hover over an item.
  • If you are using the keyboard pick up method, an information box will be displayed whenever your player is in collision with an item.
    Here’s a screen shot (The mouse cursor was removed, dunno why):

Also I have updated the web player: here’s the new link: http://bit.ly/14PlRJb

Hello Soumia,

Can u add some feature like saving your inventory and equipment? so you won’t lose the item that you gathered when you change scene.

Thanks,
Japhet Eisenhdorf

Hey Japhet,

I already finished that saving and loading part so you won’t lose items when change scene or leave the game and you will be the one who decides whether to save your items and load them or not. Currently, I’m working on many new features such as dragging and dropping items inside the inventory, showing the short description on mouse hover (in the inventory GUI), adding a bag item and item groups (an object that contains many items at the same item and you can choose which item to take or take all of them) and few more things.

Thank you,
SoumiDelRio

Big updates:

  • You can now drag and drop items inside the inventory (I have re-written some parts of the scripts and improved the slot system in order for this to work).
  • Fixed few bugs in the keyboard pick up method. (It’s fully working now).
  • When the mouse is over an item inside the inventory it shows a short description of this item. (This short description can be modified through the inspector in the item script).
  • Removed the scroll view vector.
  • You can now choose, through the inspector, if you want your dropped items to get destroyed or re-spawned in the real world. If you choose the second option you are able to re-equip them.
  • I’m no longer using buttons in the inventory GUI for items, I switched to textures.

Few screen shots of today’s work:

I’ll upload the web player tomorrow in which you will be able to modify many things in the inventory (such as drop type, equip type etc…) using simple GUI buttons and check boxs.

Great Update! Hoping to see the updated web player!

More Power Soumia!

I’m sure you’ll see more in the next few days, thank you for your comments Japhet!
I’ll upload the web player now.

EDIT:

Newest web player link

UPDATE:

  • I have finally finished the Item Group script which can hold an amount of items and the player is able to take a look at these items, take all of them or pick few of them. This script works perfectly with a treasure object. Like all the three other scripts, you can modify everything from the inspector without editing anything in the script.

P.S: This new features is not in the web player, it will be added in the next version.

Check out these screen shots:

Small update:

  • I’ve been testing this system and looking for bugs today, I found few and I fixed them all.
  • In the item group, when you select an item, a green rectangle will be drawn around this item to inform you that it’s selected.
  • Made the item drag and drop smoother.
  • I also changed the font used in all the GUI elements.
  • Started working on the vendor script: Buy and sell items for an amount of currency.

Also, here’s the new web player link with all features listed above: http://bit.ly/1cywTf2

Hello again Japhet,

I’m planning to add that after finishing the vendor system. And since each RPG game has different equipment slots, I will make you able to create your own equipment slots and limit them to 10 or 12. And based on them, you can assign items to them. I will also make the equipment UI window suitable for any desired number of equipment slots. But for now, any suggestions for the vendor system?

I also want to thank you for supporting me in my first project!

SoumiDelRio,

Take a look at the first vendor system screen shot. Like the whole system, everything’s dynamic here, you create an item object set the currency and the amount required to buy then add it to the vendor script.

What do you think?

Great as Always!

I worked on the vendor system today and finished many things:

  • You can assign the price to an item through the inspector by editing two variables: Currency name and Currency amount.
  • Select an item in the buying menu, then click on the buy button to purchase it (checks if you have the required currency type, if yes checks if you have the required amount. If you don’t have one of them, the selection color would turn into red).
  • In the selling menu, you simply drag and drop an item from your inventory into a specific position then input the amount you wish to sell from this item if it’s above 1 of course and it will be added in the items waiting to sell list, you can take back the items you wanted to sell them by clicking on take back or click on sell to get the currency and just sell them.

I still have more ideas for this system that will be done by tomorrow
I have also started documenting everything I make.