I’m incredibly new to Datastores and so far… I hate them… I hate them a lot… but I gotta learn how to do this (regardless of my hatred) so here I am.
My question:
I’m creating a system that needs to save items like clothing, helmets, tools, etc. and I’m wondering if this (below) is a viable way to do so or if it’s gonna make my game implode.
I figured I’d put all of the items from the game in a series of folders and pretty much just loop through the folders and place them into categorized tables within the player’s main table + a bool that details whether the player own’s the item or not.
PlrTable {
PlrOutfits{
PinkOutfit = true, -- The items inserted from the loop
BlueOutfit = false, -- The bool for whether the player owns it or not
OrangeOutfit = false
}
PlrHats{
BlueHat = false,
GreenHat = true,
PurpleHat = true
}
PlrTools{
Shovel = true,
Flashlight = true,
Grenade = true
}
}
So what I’m asking is whether this is a good, and somewhat efficent way to save or if there’s another route I should go.
Well I won’t be manually naming them in the script, for example the outfit would be in its own folder named “PinkOutfit” and the name would be fetched by the script during a loop prior to actually saving the table to the player.
Edit: The loop would go thru something like this,
and fetch all of the items and the categories they are in.