Download

InventorySystem - A complex Drag 'n Drop Inventory System With Crafting

458e815c94c170fb8116d3cad0af70b92117515c.png

I am happy to present InventorySystem, an advanced inventory and crafting system!
Available on the marketplace for a mere $19.99: https://www.unrealengine.com/marketp…ventory-system!

**Unreal Engine 4.19 Is Now Supported!

UPDATE: There is now chest functionality!**

What is it?
A complex Drag 'n Drop inventory system with features like crafting, a hotbar, stacking, item dropping, a datatable and more!

Which features does it have?
• Drag 'n Drop.
• Crafting
• Item Using
• Chests
• Enum and Datatable to easily add and use items / crafting recipes.
• Hotbar with Scrollwheel and keys 1-9 for slot selection.
• Stacking (with customizable size).
• Item Dropping (individual item or all in slot).
• Inventory/Unlocked Recipes Saving (to a .sav file)
• Simple Design.
• Comes with 7 inventory item images (example: Dropbox - Apple.png - Simplify your life), and more to come!
• Customizable inventory size.
• Sample Project.
• Documentation.

What does it look like?
4d448485947127ade3af87de1c35fa0a22e3738a.jpeg
But more skins/looks are coming! (and you can customize it’s looks yourself too!)

FAQ:
How hard is it to add new items?
Really easy! Just add an entry to the items enum and to the data table, and your new item is added!

Why Enums?
So that you can easily use items later on in your game with a drop down menu instead of having to remember or lookup item ID’s.

Is the crafting Drag 'n Drop too?
No, an old version had this, but testing revealed that just scrolling through a list and clicking on items was way easier than having to remember lots and lots of recopies, so this is the system I went with!

What does the crafting look like?
07db2ca13059c279837e01118a22b4e0fbff0723.jpeg

Can you use items?
Yes! You can drop items, and if the item allows this, you can specify a blueprint with a script to run when you press the use item key with this item selected in your hotbar.

Do you have any feature requests or questions? Don’t be afraid to ask!

I love this addon. I helped test it before release and it’s one of the better inventory systems that I’ve tried.

Happy to report to ya’all that InventorySystem will be on sale for 15$ (25% off) from the 1st of February till the 5th of February! :slight_smile:

[UPDATE]
InventorySystem is now permanently priced at $14.99!

We’re back with a 33% off sale! Get InventorySystem for a mere $9.99!

Hello! I’m interested in picking this up, but I have some questions.

Namely, how much can I customize the UI? For instance, I would want to set up my own style for the hotbar, and I want to include a description for each of the items in the inventory. There are also a couple of features I wouldn’t necessarily use, such as crafting or dropping.

I’ve been trying to develop a system of my own to match up with what I want, but none of the tutorials online are quite robust enough to help. The inventory system I’m interested in would resemble the relatively simple setup in the Legend of Zelda. That means I’m also looking to allow gamepad support. How much trouble would it be to set that up using your system?

Thanks for making this, by the way. It looks clean and cool. I just want to know what I’m getting into before I consider buying it.

Hey there. I wanted to let you know I went and bought the system, despite my worries. I’m having trouble, unfortunately.

I can’t get the UI to recognize my input at all. I can’t click and drag anything and the mouse wheel has no effect. Also, I can’t change any of the images in my hotbar. I can pick up items fine and add them to the inventory–the stacking works and everything. But I need a lot of help.

I tried setting up the system in a fresh project and had slightly more success–I can drag and drop items into the hotbar, at least. But the scrolling still doesn’t work and I can’t use any of the items.

So, please, I hope you can spare a moment to help me out.

Hey there, sorry that I didn’t notice your earlier replies, the forums didn’t beam stuff into my email box? Anyway, the best way to reach me is to shoot me an email at howtocompute123@gmail.com Now that’s out of the way, let me try and address your issues :slight_smile:

As for
I can’t get the UI to recognize my input at all. I can’t click and drag anything and the mouse wheel has no effect.

You should open the example project it’s player, and switch to the Input graph. This graph contains the scrollwheel + number controls for your hotbar. Also, be sure to copy the correct key bindings from the input tab under your project settings. Missing one of these things is the most likely cause of your issue.

Also, I can’t change any of the images in my hotbar.
I don’t currently have the unreal editor on me, but going into the widgets -> slot (an image) and updating it there should update them, if not, it could also be the case that there is a variable (switch to the graph and view the variables) that contains the hotbar image.

I hope this helps you, and if not, please shoot me an email or reply to this thread + send me a DM (so I should get notified).

Thanks for purchasing InventorySystem and I hope you can solve the issues you’re having :slight_smile:

Wow, I’m blind. I didn’t even notice that graph. That’s totally on me.

And this helped too, thank you. I got the hotbar images working.

However, I still can’t drag and drop anything out of the inventory. I put a print string in the “On Mouse Button Down” function inside the HotbarSlot WBP and I’m apparently getting nothing. Not sure what’s going on there.

I’ll be sure to send you a DM so you can catch this post. And thank you for helping me fix these problems.

hi there,
i just stumbled over this drag and drop inventory system and have some questions for using it in my point & click adventure game project:

  • i just need the inventory bar, i guess i can easily hide everything else ?
  • i need a fixed single row inventory bar at the bottom of the screen, with maybe 12 pieces. but if the player owns more than 12 objects, there has to be the possibility to scroll or move to the next/previous 12 pieces etc
  • i need the possibility to combine items per drag and drop (drag the rope on the stick to make a sling e.g.)
  • i need the possibility to drag items from the inventory on objects in the scene to use them. (drag key on door to open the door e.g.)
  • does it scale well with different resolutions ?
  • i need name text for the item on hovering over it with the mouse
  • i need a description text, when pressing right mouse button on the item

so thats all my “needs” for the inventory system in my game :wink:
do you think this is possible to add/achieve with your system. Could you add this ? Or is it possible for me(bleuprint beginner) to add it to your system ?

kind regards
stucki

No problem, glad you figured it out :slight_smile: Don’t worry about not seeing the graph, I’ll attempt to re-write the docs in the (near) future to point this out more clearly :slight_smile:

This is a rather strange issue that I’ve been unable to replicate I’m afraid, but I have a few tips :). First of all, did you open up your inventory? To avoid your mouse cursor not being captured by the game, you need to open your inventory to actually use the mouse button. And secondly, mind putting a print in Blueprints > BP_InventoryItemDragDropOperation > Event drag cancelled. This will help isolate the problem (as drag & drop or the dropping of the item could be a cause).

I hope this helps you debug your blueprint, and if not, please post the results of the above test & I’ll see if I can try and further debug your issue :slight_smile:

  • HowToCompute

Hey there stucki,

I’m afraid InventorySystem wasen’t designed with all of these “needs” in mind. I’d love to support every single type of inventory, but crafting can’t be done using the hotbar (mainly as it’s been designed to swap items instead of craft stuff). You can disable nearly every part of the inventory, tho disabling the larger inventory UI will require a bit of modding (removing the widget spawn / inventory space allocation). Crafting can easily be disabled tho. Againt, for your second point it was designed to be a hotbar and not an inventory I’m afriad. For your fourth point, I am currently working on a mechanic like this, but it has been quite unstable and isn’t ready for release yet. InventorySystem scales reasonably well on multiple devices, tho it has been designed with desktop usage on a 720/1080p monitor in mind. You may experience clipping of items if your screen is too small. To address your last to points, I do have plans on adding this in the future, but this is on the backburner I’m afraid.

I’m sorry to dissapoint you, but I hope this atleast clears things up :slight_smile: Good luck with your point & click adventure game :)!

Thanks for getting back to me!

I’m a little confused by this, truth be told. By “open your inventory,” do you mean in-game? Because I certainly have – that’s my problem, after all. I can’t click and drag any of the items in my inventory, or indeed interact with them in any way. Or do you mean the inventory widget?

Okay, I did that and nothing is being printed, so that event must never be getting called. Any idea what that could mean?

Sorry for confusing you, I think you did indeed open the inventory widget, but what I meant with this sentence is that you have to press E/I (whatever you happen open inventory to) before you can drag stuff around. This sets the input to UI only (instead of Game Only).

This is a rather strange issue, but after playing around for a while I think I may have discovered a possible cause. You mentioned that you are able to drag & drop stuff in a fresh project. This could mean that you have some kind of other drag & drop widget behind the InventorySystem inventory widgets (which “catches” the drag & drop operation, causing it to not be cancelled (which drops the item). Another cause could be an overlaying widgets (like an HUD) that overlays the InventorySystem widgets. This will in turn catch the On Mouse Button Down, and not pass it through to InventorySystem.

I hope one of these solutions can help you :slight_smile:

  • HowToCompute

Okay, this seems to be it. When I fully disable my HUD and the hotbar, the dragging worked. I need both of those, though, so I got around it by setting the Z order of the inventory widget to a higher number than the others.

I can’t drag the items into the hotbar, though. Possibly because of the same problem? But you have two distinct widgets open in your project and you don’t have this issue. So. I don’t know what to do about that. I tried setting the inventory screen and the hotbar to the same Z order, but that hasn’t solved it. I’m launching the hotbar the same way you are, so I don’t see what could be wrong.

We found the cause! As for your dragging into the hotbar issue, I’m currently still investigating this. I’ve never had this issue before, so I’m afraid I don’t have a known fix yet. I’ll report back as soon as I figure out a reliable way to fix this issue tho! :slight_smile:

So in order to create a situation like you described I added 1920*1080px widget to my viewport (in my level blueprint) that contained a (nearly) screen filling button. I have attached a screenshot of the situation. The things I changed that seem to allow me to drag stuff inbetween InventorySystem’s inventory & hotbar are the following:

  • Spawn the button (your own hotbar/HUD in your case) at a ZOrder of -100
  • Open up WBP_InventoryWidget, WBP_InventorySlot, WBP_HotbarWidget & WBP_HotbarSlot (all in InventorySystem/UMG) & go to the root element (the [NAME] element). In here I set my Input Priority (Input > Priority) to 100. Any number greater than what your own widgets are using should work.

This allows me to drag items between my Inventory & Hotbar, use items & still use the button behind my inventory/hotbar when I’m not over the widget.

I hope this fixes you issue too, and if not, please get back to me, and I’ll see if I can find another cause :slight_smile:

No luck so far, unfortunately. Even if I don’t spawn my HUD – even if the hotbar and the inventory are the only widgets on the screen – I still can’t click and drag anything. I went into both of them and set their priority to 100, and I tried to changing the Z order they spawn in with in BP_InventoryManagerComponent. Nothing yet.

I’ll try launching an empty project again and checking for discrepancies. If you have any more ideas, let me know.

Odd issue, I’m so sorry you are having these issues :frowning: InventorySystem is usually a Plug 'n Play solution, but I guess there are edge cases like this. I’ll continue looking into this issue, trying to re-create a situation like you are having & fixing it and will report back if I find any possible other solutions :slight_smile: Just so I can do my best to recreate the exact issue, would you mind stating the UE4 version you are on? I’ve been doing my testing in UE4.15/UE4.16, but if you are using a specific version, I’ll target my testing towards that :slight_smile:

PSA: Unreal Engine 4.17 Is Supported! Even Though It Only Just Released, I Have Managed To Get InventorySystem Through Thorough Quality Control And Was Unable To Find Any Issues (Related To This New Release). Please Contact Me If You’re Experiencing Any Issues Related To InventorySystem & UE4.17. Have Fun With The New Release!