Does minimising data actually matter?

I am currently in the phase of setting up how data works in my game. Right now I have two ideas for how inventory data will be set up:

Inv= { [itemID] = {PhysicalLevel, EnergyLevel, Effect, Chances} }

The second method would be:
Inv= { [itemID] = {Physical = 43; Energy = 10; Effect = nil; PLevel = 1, ELevel} }

I understand that the first method is less data, but the second method would be significantly easier to work with and if I wish to add data, I can just add to the dictionary without issue unlike the first method, so it has huge retrospective advantages.

I wish to work with the second method, but since its more data to be handled, would it be worth it working with the first method instead? Or would the effects on datastores and data transfer between server to client etc would be so minimal it doesn’t matter which method I use. Note that Inv will hold a many of the data examples above.

The difference shouldn’t be that big, i mean after all you get 260k characters limit per key, i don’t think you’ll hit this so soon. Use the easier way.

1 Like

You really shouldn’t worry about the size of Data, but you can always do simple things like 1 for the Sword instead of doing “Sword” and etc… if you’re worried about stuff like that. Just do what’s easy for you and works the best. Only time you should worry about the actual size is if your doing massive dictionaries full of thousands and thousands of things. Always remember too, that there is no limit to how many DataStores you can actually create for saving it, so if you max one out, just create another for the player.

1 Like

The first way is actually really bad, as you are assuming that the table will keep its indexes in order, which is not always the case I believe. I’d go with the second method; you can add tons and tons of data before you hit the Character limit :slight_smile:

3 Likes