Free Inventory System - Backend

New version is up. Including an very simple Inventory UI Example. Its basically just displaying whats inside + you can use the items with a rightclick. This UMG example is just barely documentated, because its not on my prioritylist right now, i just added it to showcase stuff a bit and help you guys get an idea of how to use the Inventory System (ill put up some infos here soon). If you got any questions ask them (please dont ask questions like how do i add drag drop and stuff).

Ive added a playercontroller wich you can set in your gamemode for easy demonstration.

Also ive changed alot of under the hood things. The inventory array size is now fixed to the size of the inventory. (This is to be better suitable for a grid system)

I had to split those files from my regular project so if something isnt working as expected please tell me (alot of wires got disconnected and i had to reconnect them again, also my main project got shred:S)

Update: There was an Problem with the “Reorder Inventory” Function wich is now fixed. Just grab the latest version and you should be set

worked like a charm!

since i’m a newbie, your system really helped me get something started (e.g. it was easy to add “picking/dropping items” from the ground to/from the inv). Right now im trying to play with UMG.

btw im trying to use it in a MP game and theres a weird bug that crashes UE (due UE, not your system. works fine in a SP game).

Rama explains whats happening https://github.com/EpicGames/UnrealEngine/pull/628

well, I will buy your stuff (Player Structure System looks great too) if it goes to marketplace (right now I cant donate since my PP account is zero :stuck_out_tongue: )

anyway, thanks !

thank you for kind words. Havent tested stuff in MP yet, iam heavly dealing with the User Interface iam creating. Using this Inventory Actor. Ill post some WiP stuff later :slight_smile:

Hi there, thanks for this system. I have extracted the contents of the zip folder to the content folder in my project.
However, when I open the project and go to the rInventory folder in my content browser, the folders there are empty (as if the uasset files haven’t been imported).
When I try to import them manually/draganddrop, it pops up with the error “unknown extension uasset”.

I suspect that this may be because I am still using version 4.4.3. Do you perhaps have a fix or am I doing something wrong?

Well, i dont have 4.4.3 anymore so i cant reproduce this error, maybe someone can confirm? The Blueprints were made in 4.5 maybe you should try to update (Add a new Engine Version) and try this thing in a blank project

Edit: I moved all the UI related stuff to a new post since this should be on the backend and not the frontend

Total noob with this stuff, whats the step by step to get it working, if i put the player controller inventory in it will spawn an inventory but i cant do anything with it

Second post is what you have to put in your controller or whatever to get things working. Its just an example. This is just a backend actor the videos i posted is my personal work on an inventory for a game. its not part of this free system

This is fantastic work! i did a very similar system in a game jam environment but it was ugly and hacky because of the time limit. Very pleased to have this leg up, but also thank you for providing the basic UI interface!

This is fantastic work! i did a very similar system in a game jam environment but it was ugly and hacky because of the time limit. Very pleased to have this leg up, but also thank you for providing the basic UI interface!
[/QUOTE]

Thank you very much.

I just tested the Actor in 4.6 and had a strange issue. Its not really a bug just a disconnected wire in the InventoryActor->GetItemDatafromClass Function. Please check after updating your project to 4.6. if the SpawnActor Node is still connected with its return value pin to the Object pin of the Cast To node. If not simply connect and everything should be ok again

Yay finished the first c++ version of this. I dont have done any documentation so far but well, if you use c++ you should be able to use this Inventory :D. I improved the c++ so you dont need to spawn any thing to work with the inv, its also alot faster and network ready.

Maybe a Mod could move this Thread to the WiP Section please :D?

GitHub link on the First Post

Hey, thx a lot for sharing !

So i am supposed to see something when i hit play?

I tried to use it : so in the level blueprint i spawn rInventaryActor, i add some items. Then on rInventary actor, on beginPlay i create UserInterfaceWidget and add it to view port, and i only see Inventary in a black background, there is no items.

Im doing something wrong?

You should create your Inventory when a Player Spawns so in the controllers begin play for example. Then if you create the widget you should also have some items “Add to Inventory” added :slight_smile:

Edit: Ive uploaded a whole working demo project, Simply put the Folder inside the ZIP Archive to your projects and open the unreal project.

Thx for answering me and for the upload. What i did wasn’t working because i forgot to set the reference Inventary Actor in the widget … :confused:

But i think it ins’t fully working yet : i can’t see items in the grid and i can’t add or remove anything, add to inventary always return false, i think it’s because this test always return false

Inside the Inventory Actor there is a function called “get Item Data by class” … there is a spawn node wich has a broken connection. Fix it and everything should work… No idea why all those bp nodes are so unstable ******** break all the time.

Edit: Updated the Zip again. and resaved all the stuff. also i did include all the “maybe” unneeded files…

Okay so i downloaded the last version, it still wasn’t working : in get data from class, the object spawned from the node wasn’t connected in the cast node. After i connected it i now can see items in the grid, when i click on it, it spawn a meat or razor into the world but it doesn’t update the numbers of the items (always stay the same). So im guessing other stuff aren’t working well since i don’t know what is possible to do with your inventary, i can’t really know what isn’t working, but i basically can’t do anything with it.

Anyways thx a lot, it is still a great example for doing UMG related stuff.

check the mouse move event or mouse up there should be another disconnected node

There is another broken node in OnMouseButtonUP in InventorySlotWidget from the SpawnActor to the Cast, which when fixed restored the click to use functionality, but not the mouse drag. Looked through others but didn’t find anything obviously wrong.

This sample does not contain drag & drop :slight_smile: as its just a sample on how to visualize the content of the actor

Ahh… Ok. I looked at it again and understand.

This is a nice piece of work, . Thanks for sharing it with the community.

thank you… iam going to release a tutorial on how to do moveable windows in umg and blueprint this week so stay tuned :slight_smile: