Help on creating Data Character Slots

Hi, I’m looking to learn about how I can go about creating a character slots system, an example would be vestaria, like how a player can choose one slot then create their character and then choose another slot to make another character.

However can someone guide me on how I can go about doing the data slots ( preferably 3 slots a player can use), I’m not asking for someone to fully script this for me, just asking for guidance and tips

Image example:

1 Like

Funnily enough, Vesteria is actually open source, you can find its code here: GitHub - berezaa/vesteria: Vesteria is a fantasy MMORPG on Roblox- originally founded by berezaa, sk3let0n and Polymorphic in the Roblox Incubator program.

Anyways, you could accomplish this in a few ways, but by far the most popular two would be:

1: having separate data slots in your datastore depending on which character they’re using

  • What I mean by this is that you would store each character separately in a database using a key like ]UUID]_[slot], and have a central database that stores things that carry over between character slots, and also stores which slot is currently selected

2: using 1 data system for all character slots

  • What I mean by this is that you would store all of your data in a single database, and you would include an array of all of your character slots within that data, and you would also have a key/value pair indicating which character slot is currently selected

Note: when I say database I really mean datastore

2 Likes

Thank you very much replying, just to make sure I’m understanding correct what you’re saying, please can you demonstrate an example for 1 and 2?

Is 1) like [“Slot1”] = {Coins = 0, Level = 0}, [“Slot2”] = {Coins = 0, Level = 0}, et cetera and would it use like the same key e.g. player’s user Id to access the data of player? so if I were to get data of a player from their player Id key, would all those slots be stored under the Player Id Key data?

This is a bumping procedure: bump

each slot should be treated as different data slots.
for me it wouldnt require multiple datastores since my code runs off a visual hierarchy of folders
and values that can be infinite.

although i recommend doing something like this

if slot1 == picked then
local DataToGet = player.UserId…“Slot”…Number:GetAsync()

2 Likes

Thank you, I also have a folder (stats folder) that stores values such as “coins” “level”, et cetera in it, please can you give an example how you would implement this method with folders and values?

templatefolder serverstorage then for each new slot i would clone the contents of the templatefolder and have them put under a folder called SlotSlotNumber. i would have my code detect the folders name as a slot and save every instance value name + value/if folder it creates new table with all values inside and repeats until it returns everything creating a dictionary. then when they join game all you need is a value in player called PickedSlot and then the options of all folders with “Slot” at the start of the name

2 Likes