MaximumADHD / Super-Nostalgia-Zone

Source code for Super Nostalgia Zone.
https://www.roblox.com/games/998374377/Super-Nostalgia-Zone
Mozilla Public License 2.0
53 stars 9 forks source link

Can you talk about how to access datastores? I would LOVE it if i could add player custimization to the game #6

Open Zagmeeboi opened 5 months ago

Zagmeeboi commented 5 months ago

Please!

MaximumADHD commented 5 months ago

iirc the character data is formatted something like this:

DataStore:GetAsync(`PlayerList${userId}`) -> {
    BodyColors: {
        Head: number,
        Torso: number,
        LeftArm: number,
        LeftLeg: number,
        RightArm: number,
        RightLeg: number,
    },

    Loadout: {
        Hat: number,
        Face: number,
        Shirt: number,
        Pants: number,
        TShirt: number,
    }
}

Where DataStore is the store defined in PlayerDataStore.lua: https://github.com/MaximumADHD/Super-Nostalgia-Zone/blob/main/Server/Resources/PlayerDataStore.lua

Hat, Face, Shirt, and Pants map to indices in their corresponding asset lookup tables: https://github.com/MaximumADHD/Super-Nostalgia-Zone/tree/main/Shared/ItemData

TShirt can be any AssetId that has a resolvable thumbnail.

BodyColors use the numerical values defined for BrickColors: https://create.roblox.com/docs/reference/engine/datatypes/BrickColor

This data is all defined and managed in the hub place of SNZ, which I haven’t open sourced yet.

Zagmeeboi commented 5 months ago

Thanks for giving me info about it! I'll figure out how to use what you gave me

Zagmeeboi commented 5 months ago

Im gonna reopen this if you want to tell me anything else