I’m working on a Sand Box & Multi-Places Projects.
I will need to save a lot of things.
In my game, people will have two “inventories”.
In the first one, there will be the objects the player has and can place on his plot.
And on the second one, there will be “materials” and this kind of things.
I want to get the second inventory and all the values and currencies when the player loads.
And I want to load the ploat and the position of each objects later seperatly.
So I’m wondering if I save everything inside the same DataStore or if I create a dedicated DataStore for the placed objects.
What do you think about it?
Ask question if you want!
I thought about something like this:
The Global Save for the currencies, the two “Inventories” and for other things to save.
And the Sand Box Save for all the placed Items and for the upgrade of the plots like “size of plots”
What do you think about doing something like this?
You could use a dedicated datastore. Even though you will have to make more datastore calls, you would be able to store bigger plots since datastores have a size limit. It really depends on how you serialize the information
So the best idea is to have a dedicated DataStore to store a dictionnary with all the placed items, something like this:
shorterName = {"Furnace" = "FN"}
local placedItems = {}
for i, item in pairs(plot:GetChildren()) do
local info = {
name = shorterNames[item.Name], -- So with a shorter Name like this
x = item.Position.X,
y = item.Position.Y,
z = item.Position.Z,
r = item.Rotation.Y -- I think it is the Y axe
}
that's it?
Is: “CFrame:components()” a real command wich returns an array with x, y, z pos?
But okay I understand, but I think i’ll split the save in two datastores, one for global things and the other one for Sand Box