Nested Data Table

Hi,
So I’m working on an inventory system and I have a master data table with every item in the game. I have multiple smaller data tables that just contain data table row handles that reference the master data table. Those tables might contain only references to the potions or armor. What I’m not sure how to do is how to grab an item from the larger table by using the smaller data table. Any ideas would be greatly appreciated! :slightly_smiling_face:

A row handle is just a struct consisting of the table and the row name. It seems like a lot of work to me

Hey @ClockworkOcean
Thanks for the response. Is there a better way to go about this if nesting data tables isn’t the way to go? The problem that I’m having is that I can’t guarantee which sub data table I’m going to use. One might be used for a potion shop while another might be used for an armor shop and another might have a mix of ammo and potions. But they would all be referencing the main data table.

1 Like

I’m afraid I’m not a big data table fan ( as you might have gathered ). But don’t let put you off, if you think you’re close to a solution :slight_smile:

I have never implemented an inventory system ‘in anger’, but I think I would probably do it as a blueprint inheritance chain. So, parent with all the code for pickups and widgets, but the details in the children. That sort of thing.

It really depends on how it will be used.

The main problem with tables, is they can’t be updated ( I haven’t checked lately ), without a plugin.

I actually was talking out my problem with somebody and I realized that there’s no reason to make multiple structs. I can just have different data tables that use the same struct which just holds a data table row handle. Thanks again for your help though :slightly_smiling_face:

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.