Hello developers, again, hope your day is going well, night, whatever
So I have a game where you have a startercharacter, which looks exactly like the lab experiment default skin, grey person
I was wondering how to make a simple accessory shop for that character, like Lab experiment
Not copying though, It has minor changes
Changes
All it should have is one crate giving items
The customization only lets you wear the items you have
No color change
Only hats and faces being given
If you could recommend anything, I would be happy to hear
There are a few things involved.
- Having the list of items available. This could be in the form of asset ids and you then load the assets in manually when equipped, or you can put all the hats in the game prior and just put them on the character that way.
- Saving what you own, and what is equipped. This information needs to be stored somewhere and visible to the client. This is so you can make a UI to send server updates to what you want to equip, unequip, delete, sell, or whatever.
- Interface. As mentioned in step #2, you need a way to update and interact with your data.
- Once you have a way to update your data (including saving when you leave the game), you can then use changes in the data to update your character model. This can be done using the methods in step #1.
- There are a few things to look for when updating your character: Deleting/Selling an item you are wearing, unequipping the item, equipping a different item (and thus unequipping what was equipped previously, like a face), and of course when your character spawns into the game it should have the items equip automatically.
Once you get these squared away you should have most of what you need. Obviously a shop or loot crate system would just add the ID of the item to your inventory; so how you organize your data is important if you want to have categories or sorting options.
1 Like
Woah, its the head of lab experiment himself!
What do you recommend, Datastore, Datastore2 or ProfileService
Thanks for the informative explanation, I can try to manage it
I personally like using profileservice but wrapped in a helper module that I wrote for some extra handy functions.
1 Like