Datastore limits

What about splitting up individual types of data into different keys/scopes/stores?
Inventory could have its own store, with each item having its own key (if necessary, if not, just keep all under one key - and perhaps limit the total number of items available in one’s inventory?)
Quests could have it’s own datastore. One key could be used for the quests a player is currently doing, and another could be used for the quests already completed (solely the IDs - and for current quests possibly the progress or whatever suits)
Player House data can have its own store, saving only the necessary information.

I don’t know how recommended it is to use separate stores, it may be frowned upon, I don’t know. Though, especially if you do need a lot of data, it may be a viable solution perhaps?

1 Like

There is indeed a limit for requests. This is why rather than having a load of separate stores you can put them as a list.

— Below is an example of roughly how I would store the information

local Inventory = “”
for i = 1,#Items do
local NewString = tostring(itemID) … “:”
NewString = NewString … tostring(itemcount) … “:”
NewString = NewString … tostring(AmountStolen)

 Inventory = Inventory .. Newstring .. ","

end

---- Below is how to get the data from the string

local ItemData = string.split(String,“,”)
for i = 1,#ItemData do
local Data = string.split(ItemData[i],“;”)
local ItemID = Data[1]
local ItemCount = Data[2]
local AmountStolen = Data[3]
— Put the information where it needs to be
end

1 Like