Hello all, i just have a quick question for you guys. Currently the limit for a datastore is 260k(not exactly but ya know) characters. Is this per datastore? Example:
The 260,000 limit is per key. You can store as much as you’d like in each datastore, your only limited to the amount of characters you can store in the value field per key.
All three of these SetAsyncs work fine because they’re storing data on different keys.
local ds1 = game:GetService('DataStoreService'):GetDataStore('Datastore1')
local ds2 = game:GetService('DataStoreService'):GetDataStore('Datastore2')
local nearLimit = ('a'):rep(250000)
ds1:SetAsync('SameDatastoreExample1', nearLimit) -- your key here is 'SameDatastoreExample1'
ds1:SetAsync('SameDatastoreExample2', nearLimit) -- your key here is 'SameDatastoreExample2'
ds2:SetAsync('DifferentDatastoreExample', nearLimit) -- your key here is 'DifferentDatastoreExample'
@Venetrix is asking about data storage limits, not method call limits. You’re thinking about the limits to how often you can call GetAsync/SetAsync/UpdateAsync/RemoveAsync/GetSorted.
I see, thanks for your help. If i were to create a multiple save slot system how would i go about doing this. Just use the players userId followed by a slot number?
That’s one way to do it, yes. That would let you store the most data per-slot. You’ll need to either know all of the slot numbers beforehand (e.g. players can have only 5 slots) or use a separate key to store a list of saved slots and their infos.