#Understanding ProfileStore

1 messages · Page 1 of 1 (latest)

west cairn
#

Hi, i was a dev mainly on GMOD and some random games i made for fun but now i'm trying with a group of friends to make a roblox RPG game

I am currently trying to understand ProfileStore and basically how all the data interactions work with roblox but i'm unsure of how i should build the default table

I will need to store lot of data for the players but how precise do i need to be in the build of the default tables ?

As example, for PlayerInfo i want to save lots of informations for titles/achievements like total Monsters/Boss killed, a count of each separate boss killed (ex: Hydra Killed : 0...) and many other things but i also need an inventory where some items will be used to craft, some to evolve magic powers or equipment

Should i anticipate and build every single keys i would need in advance ?
As example, the "Characters" key will be to display which one they have to equip/unequip and use them in PVE/PVP but considering they will be able to upgrade/equip items to their chars, how should i build all this ?

Btw, english is not my native language so if there is any missing/unclear information feel free to ask me to reformulate or give more details

return {
    PlayerInfo = {
        Level = 1,
        XP = 0,
        PStats = {
            TCC = 0,
            DCC = 0,
            DropBonus = 0,
            ATK = 0,
            HP = 0,
            CDR = 0,
        },
                PSuccess = {},
    },
    
    Currencies = {
        Gold = 0,
        Gems = 0,
        Tokens = 0,
        Souls = 0,
    },
    
    Inventory = {
        TestItem = 0,
    },
    
    Characters = {},
}

twilit trellis
#

Also, this is the best formatted and explained post i have ever seen in this channel, so dw bout that.

solar onyx
#

also if I missunderstood, ProfileStore owns a reconcile method that reconciles the data of the Profile if any keys you've added is not in the Profile of the Player

west cairn
west cairn
twilit trellis
versed jacinth
# west cairn Hi, i was a dev mainly on GMOD and some random games i made for fun but now i'm ...

Let me work in reverse:

You're clearly European as for that last comment. Just remember this one detail: you don't need perfect grammar to be understandable. Only little words show full message 😉 .

(rest will be from top down again)

Don't overestimate what you need to save. Just add stuff to the save dict as you design new parts of your game: i.e. if you've decided to split your currency system into "bank" and "cash", then it will only take like 3 minutes to retrofit your table to split up the money. If you've already made code for other games, then we both know how easy it is to add minor changes to a nice, modular code base.

Simply stuff, yet don't overdo it. Roblox does limit the types you can store in a datastore (see the API reference for further detail), yet you can easily store a shit ton of information. The amount of data you can load/save per minute is quite a lot.

as for that last paragraph, read the one 2 above this one.

west cairn
versed jacinth
solar onyx
#

sadly that scale will change in 2026 so look up that too to prepare for it

west cairn
hard treeBOT
#

studio** You are now Level 1! **studio

lavish frigate
# west cairn Hi, i was a dev mainly on GMOD and some random games i made for fun but now i'm ...

yes it can be a lot of data. no, don't bother anticipating every single thing you need in advance. instead take an iterative approach. data migration is a very common thing https://en.wikipedia.org/wiki/Data_migration so naturally all you need to care about is how to transform older savedata versions to the latest version should you ever come across something you need to add that is incompatible with older versions, or if you ever want to change how the data is structured. the datastore limits are large enough to not really need to care about the limit in your current use-cases so no stress. you got this coolguy

Data migration is the process of selecting, preparing, extracting, and transforming data and permanently transferring it from one computer storage system to another. Additionally, the validation of migrated data for completeness and the decommissioning of legacy data storage are considered part of the entire data migration process. Data migratio...

versed jacinth
lavish frigate
#

i don't use profilestore because i simply have no reason to, but it is great for beginners getting started since it deals with a lot of common problems that beginners have a hard time dealing with. you good. keep calm and make games salute

west cairn
versed jacinth
west cairn
#

clearly, thank you guys for all the answers btw

I will take a good look at all these documentation before continuing to build the default table, have a nice day

twilit trellis
golden haven
#

do you stll need help?

west cairn
west cairn
# twilit trellis Yea, could also just be a number, but using strings is an option aswell. You cou...

Hey sorry to ping you, i have a question about the way i structure my inventory player data

Instead of storing every informations about the item for every players which will make the data bigger, is it possible to create a "wiki" that would be global which will be used to display all the informations ? Since there will be a lot of items i think its better but i'm not sure

As example :

-- inside the player data it looks like that rn
 Inventory = {
        ITEM_NAME = {
          Name = "Item Name", 
          Quantity = 1,
          CanSell = false,
          CanEquip = true,
          Type = 1,
          CanTrade = true,
          SellingPrice = 0,
          Rarity = 3,
        },
    },

-- Instead of doing this, making a global wiki built like that and then the inventory would just contain ITEM_NAME and quantity, everytime you open ur inventory/click on an item it would use this to get/display the data 
ITEM_WIKI = {
  ITEM_NAME = {
    Name = "Item Name", 
    CanSell = false,
    CanEquip = true,
    Type = 1,
    CanTrade = true,
    SellingPrice = 0,
    Rarity = 3,
  },
  ITEM_NAME = {...
},
twilit trellis
west cairn
#

I was thinking about caching it into the player game to avoid calls every time you open ur inventory or smth but wouldnt this make it easy for exploiters to modify like SellingPrice and abuse it ?

twilit trellis
#

Well, you would check on the server for anything currency related, as i don’t see a purpose of checking on the client other than for visuals like a buy button turning green, but since its only visuals it doesnt matter.

So as far as i’m aware, it wouldn’t cause any exploiting possibilities.

twilit trellis
west cairn
hard treeBOT
#

studio** You are now Level 2! **studio

twilit trellis
#

After some research, it could also be shared but doing that will result in exploiters being able to acces it unless it is destroyed after requiring by the local script. Generally, exploiters being able to see values isn’t an issue, but them adding tools for example or moving their characters is an issue and can be resolved by simple sanity checks on the server.

west cairn
#

Alright, i will stick to a module in ServerScriptService for the moment, i'm not familiar with fixing/preventix exploits, thank you for your answers

golden haven
#

I recommend you don't have your entire profile template in one spot

west cairn
golden haven