Strictly for saving, loading, and replication, seems like each “Container” being a UCLASS that has a TArray of Containers, would work? Seems straightforward.
that would work 1 level deep bit if we have a small pouch inside a backpack inside a container you’d need structs for every level, i also have mod slots which are technically items too.
If each item has a custom data for durability, it can also have a custom data for the items it stores.
The backpack, crate and bags only have to be items too.
An item only has to be a hashkey that can have all the related tables you need, both static and dynamic.
thats what im leaning towards, basically a guid for each item and the inventory just references the guid, the only annoying thing then is i have to look up the item from its guid in possibly 100s of items everytime i want to access it
Well, it is not something that you have to do every frame, but if you are going to have a lot of data and you are afraid of performance you can use SQL or similar databases, they are very fast with queries, and there are several plugins in the marketplace.