Inventory system through data tables?

So I’ve been going through a couple tutorials on creating inventory systems and the logic and structure itself is fairly understandable. One thing I’m noticing though is they tend to necessitate a large amount of fiddling and back and forth for implementing the items. Which is alright by itself but when you’re making hundreds it can get fairly cumbersome. Of course a large amount of manual input will always be necessary but the main thing is I find them to be somewhat disorganized.

So, was wondering if anyone could give a simple breakdown of how to do this through data tables? The benefit I see is the unique ID you can easily assign to items which make them easy to call and you can customize your widgets to behave a certain way based on categories and identifiers. While this can also be achieved through actor blueprints (which I suppose it will have to have anyway), simply calling a unique identifier to populate the variables in the blueprints makes it easier to visualize and especially balance weapons and armor as wel as loot tables. Think old wowhead with item id numbers. That single number directed you to all the information regarding set item like class, value, damage (if applicable), recipe relations etc. It seems like a very efficient way to organise data. Also because I used to do that for a living in a way.

So if anyone could give me some pointers on how to achieve this that would be amazing. So far I’ve got functionality for populating variables based in class (which involves making that class for each item which I find cumbersome). But how would I go about achieving this through simply referencing an item ID number and pulling data from a table?

for something like armor its not too hard to implement at least on the most basic level. just fair warning im not saying this is 100% the best route but it is an example of how it could be done. you could create a struct which contains all the stats and information the item could possibly have (name, id#, mesh, str, stam, etc). then create and populate your data table. next create a actor which will be all armor pieces. this actor will need to have the components to accommodate the information from the struct including a static or skeletal mesh and a variable for storing the item stats (could just use a copy of the struct for simplicity). you will also need a variable for the row name so we can get the row which contains the information. then you just need to script a way to get the needed row then transfer the information contained therein to the actor, what comes to mind for this would be to expose the variable on spawn so then you can set the name and have a basic script in the construction script which sets the information to the variables. using a system like this you could in theory create every piece of armor with one item, then you could do the same for weapons and end up with 2 items for all the gear in the game.

Exactly, that’s what I’d like to do. Every armor item would be basically a duplicate of itself and you just set the item ID number and it’ll populate, including stats, type, skeletal mesh/static mesh to use etc. Gonna take some time to figure out all the logic, but it seems like a very robust system once it works. Lots of split struct pins incoming I suspect.

As a followup question, I currently have three inventory systems running as I am testing out various methods. One relies on BPI, stored functions in the player character for inventory and heavy widget coding, one uses an inventory component (which I quite liked since it makes creating containers very simple) and one uses an actor as the basis for the inventory system.

Now after building it I am partial to the last option as I believe creating an actor container and simply spawning the inventory actor specific to that container, populated with its own items shouldn’t be much trouble once I figure it out. But still not 100% sure if it’s the best way to go.

Do you have experience with this? I’d think a component and an actor could do basically the exact same thing, but seems to component may be more versatile in use as adding inventory items would be a simple matter of adding array elements.