How many datastore keys can I use?

Hello!

I am currently making a trading system and I want to prevent duping.
Every item in my game is marked with a unique UUID so in theory I should just be able to check if that UUID already exists to prevent duping, right?

This is where my issue comes in. I could store all UUIDS in a single datastore key as a dictionary. The issue with that is that we are limited to 4mb or something like that per key.

Does this mean I could instead set up a system with multiple keys, where the key has the UUID attached to it? Or does anyone have some other input on how I could make these UUID checks?

And yes, I would only make this check once a trade is about to go through.

1 Like

There isn’t a limit on how many keys you have in a datastore.

I’m not sure designating a key for every item is necessary though. Session locking stops duping just fine. Logging trades or the chain of ownership for an item is still smart, but you shouldn’t need to lean on another key for every trade in your game.