I saw that you mentioned it would be better to use combined data stores instead of one large datastore for saving a lot of different data. Is there any particular reason for this? Currently my game (which is not yet launched) uses one data store which saves a table that looks like this:
I had this problem a long time ago when one of my modules were stuck as “Not for sale”
What I did to fix it was to find a dead obtainable (or alternatively you can simply publish to roblox as another script) and then replace it with that one.
I believe the datastore automatically does this.
You don’t need to do anything on your end. Using multiple datastores should prevent throttling completely.
It’s more ergonomic to use (easier to read, but also lets you just call :Set, :Increment without having to get the table, change one value, then set), lets you do things like serialize/deserialize specific stores (to make things like your inventory and whatnot smaller to save), and in the future will be prioritized in deveopment and made the default.
If your data already looks like that, you can just make the combined key (the first argument to .Combine) whatever it is now.
I know how data stores work but I’ve never used them. Should I learn to use normal Roblox datastores before this, or is this something I can start off with?
Does combined datastores combine multiple datastores in one, or it just creates combined datastore. I mean should I :Get() all keys before I combine them? Also it seems like Get is not Setting cache value which in normal datastore it does(I’m talking about GetAsync which is intuitive equivalent to Get for someone new to DataStore2). So once I get I should also set? Why isn’t get also setting it?
I see. Then just use Coins and Gems as you would normally, and never use the name “wealth” anywhere outside of the master key. Combined data stores are written such that you can just use the stores normally after you combine them.
1.You should Create DataStore for all data separately
2.Then you should Get values for each
3.Then you should set
4.Then every time you need data(For example to show money on display) you just :Get() it
5.Every time data changes you set it again
CharacterAdded doesnt seem to work after using :Get, is this intended?
(or at the very least, it doesnt work when the player first spawns, it only works after player respawns)