Help with Bag Containers and Handling inventory

Hi Keep this as short as I can while explaining all that I can.
I have two projects as seen here: https://youtu.be/DqR7IPGwllU, that I have edited to help describe my issues visually.

Overview: The first project was a tutorial I followed but ran into problems with equipping skeletal meshes (as well as the code not replicated and other things) this was made using a Pickup_Master and Backpack_Master blue print. The second project contained the solution to equip skeleton meshes all while looking nice and replicated, this is a modular system build on Actor Components.

My Problem I wish to have zero (or little) inventory linked to the player. with most of the UI and functionality assigned to items i equip (like 4 slots for a shirt), (8 slots for pants, 30 for a backpack etc)… and they would be added to my screen as i “equip them” Games like SCUM and DAYZ for reference is the goal I am trying to reach the way they have no inventory if you are naked, but what you wear determines that

My Question: What is the best approach for having similar functionality like from pt 1 of the video, to be applied to pt 2… Im now working with a different (and intermediate-like BP design) project, so i am overwhelmed on where I should be starting.
I can already pick up a bag, drop a bag, I just need the inventory ASSIGNED to backpack, and each backpack in the world is unique.
My immediate question/assumed solution would be, would I alter the AC, to suit a Backpack_master blueprint? I feel its going to be a mess with where the DTs and structs are pointing, if I try move them to their own container… I might need to make an inventory MASTER AC where I split some logic to the bag (then make a Container_Master? then remove it from my Player Character?)

Any direction, or help will be enormously appreciated as this method of inventory management is the very core of my game (especially when i try and implement a jigsaw-like system to them). I am quite new (3 months) to UE… also a 43hr begin->advance Udemy course… So I am actively learning and wish to find a solution to this, from minds more experience then I of a place to start trying to tackle this?
I have tried to be as descriptive as posbbile including a vid. If you need code snips or aything else please ask.

Just did a couple of Chatgpt searches with;
“How would I implement a backpack inventory system in unreal engine 5 for a third person open world survival. where the inventory picked up is specific to each backpack picked up and replicated across multiplayer”

And it is basically telling me to go back to project 1 and refactor the code better… Twice it has said create a backpack class with a datatable specific to THAT backpack.
So even if was able to move the inventory to a backpack class in PT2… I would need to revamp the datatables also. Project 2 cost me a little bit, and it comes with things like attributes, health, cold, oxygen etc… built in… so Id like to use it if i can.

Still keen to hear your Human ideas?

You need to make inventory structure and add it to each gear.

Then, when you open your inventory just build UI slots from combination of all of the gear.

1 Like

Do I need a way to make the structures dynamic so each array is assigned to each backpack? or can they share from a large item struct… Assuming your talkin about the itemDT/structs - but how could they update on the server?
The bag would need to make its stucts when spawned in the world right?, would it need to create a “copy struct” on the server to check with?

Im just thinking out aloud there… let me know if im worng/can improve any of that.
So going back back to your comment, do you mean inventory DTs and Structs… or do you mean essentially the widget structure?

Thanks for replying.

Bonus question while looking at my master blueprint; Instead of a backpack_master, Greenshirt_master, blue_blueshirt_master etc… (all the gears that populate with slots)… I would be able to refactor the gear pickups/equipment into one"GearContainer_Master" right? and associate a DT and enum to that to select the mesh and its “structure”?
Is a GearContainerMaster the right way to go about my problem instead of 100 masters for 100 meshes with different slots…? - as in, is this acheivable from just one master blueprint (or is it more complex?)

I wolud make an array of gear inside your char.
When you pick up gear, it’s gonna get destroyed and a copy of it will be added to the array, containing items ofc.
When dropping the gear, new gear would spawn in the world and then removing its copy from the array.

When you open inventory, you’ll just go thru your gear array.

So your suggesting each player has their array specific to them, pickup gear (some with items inside (like a multiplayer person you just killed’s bag of items)) you would need to access their array. And maybe a world array? to spawn the item in the world would have its own instance (array) of the loot on the map (on the server?) and to add to your array, and u would need to validate before you are able to add the item to your array?
I would consider though, sharing others array of items would open some vulnerabilities to hackers seeing what players have on them or making items of your own on the client side? of course it would get validated somewhere along that line.

But if what your saying is a good idea. Would gameplay tags be suited to this? ie. search> enemy.gear.shirt. and unique ID so the server manages the loot (so no 2 bags are the same) and duplicates?

Would like to Bump this for more opinions.
Currently ive reworked it as jigsaw like inventory. So it looks different to above links, however I still wish the items to be stored in the bag in the world (forever until a despawn timer obviously).

Regards.