Hello! I’m currently working on a game that involves crafting etc…
I was wondering what you guys think would be the best way to datastore a users inventory. I was thinking about making each slot have a value that would be what item is in it, but I don’t really know if this would be efficient.
There are many different ways you can do this. What I did for an old game of mine was just store the kind of item that player had in a table and save the table with DataStore.
As an afterthought, over time a users inventory table can get pretty big. In order to save space, you might want to compress user data before saving it to the datastores, and uncompress it when retrieving it from the datastores.
It might seem complicated but it really isn’t. I’m just saving the Item by adding line between name and value and when I load it I just find that line in string. left side of the line is a name right side is a value
When I first started learning datastores. There were some stuff I couldn’t understand so I came up with that method and using it even now. It does all I need so I didn’t really need to switch to something new.