Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

What is the most efficient way to save with datastores?

Asked by
Rhuxus 25
8 years ago

Please make your question title relevant to your question content. It should be a one-sentence summary in question form.

I'm going to be making use of datastores to save stats.

I don't know if it's relevant but it's a game going across multiple places in a game universe so two questions.

1) Does each place in the game universe have its own limit before the datastore is throttled? and 2) Would it be better to save all the stats when the player leaves with :playerremoved() or to save each stat each time the values are updated?

0
the roblox wiki uses a combination of the two which is a good idea here is the link http://wiki.roblox.com/index.php?title=Saving_Player_Data ProfessorSev 220 — 8y
0
Ok thanks Rhuxus 25 — 8y

2 answers

Log in to vote
0
Answered by 8 years ago

So, starting from the bottom. 1) Yes, the throttling rates are per server 2) If you plan for the server to have a lot of activity or such that might cause a stat to get updated too frequently, then it would be a better idea to save as the player leaves.

I personally believe in a more hybrid approach: save the player's data when he leaves to make sure no last minute changes are missed, but also save with every important change or after some sort of time increment. My main reason for the semi frequent timed or on-update saving is to make sure the server isn't trying to save too much of the player's data right before he leaves. I'm sure ROBLOX has exceptions to make sure the player doesn't fully leave before all his data can be saved... but... strange things happen when computers talk with each other. Best to plan for the worst. But again, relying too heavily on those timed or on-update saves runs the risk of going over that throttling limit that DataStores have. It's all a balance.

Ad
Log in to vote
0
Answered by 8 years ago

I have been testing with 14 leaderstats. Datastores works good with multi servers only sometimes with a shutdown in a other sever doesn't let save it. If you going use datastore to save gear or tools in multi servers. You going to the other server and got the same onces in their too if you put the same script in the same place. But don't forgot to connect the two or more places togheter otherwise it won't work. Visits Roblox wiki for more information ;)

Answer this question