Community Outfits

Hi!

I want to create a community outfits system in my game similar to Catalog Avatar Creator - Roblox but I am wondering how they saved their outfits in the datastore. I understood a normal datastore should sync across all servers so I should probably use that but they have different categories. If the player clicks on the most popular it needs to get a list of all the most popular outfits. What would the best way to get such a list with the most popular outfits and how would you think it is saved in the datastore?

Any help is welcome :slight_smile:

2 Likes

You use an OrderedDataStore. It would work just like how a leaderboard would.

https://create.roblox.com/docs/reference/engine/classes/OrderedDataStore

1 Like

I’ve thought about that but then there would be a needed an orderedatastore needed for every dropdown option. Then I suppose the actual outfit would be saved in a normal datastore (not in every orderedDatastore) with an UID but the only issue is then that for every item in the orderedDatastore there needs to be an async call needed to get the actual outfit and there is a limit to how many getAsync calls you can do every minute which would then be easily exceeded.

He might used an external datastore which he hosts himself tho?

1 Like

That’s a good break down for how to make this.

You could host your own datastore. However, the top outfits probably aren’t updating more than every 10 minutes, and every player can use the same results. Say you want 100 outfits for 5 categories. That’s 500 requests. Over 10 minutes, that would be a load of 50 requests per minute. You get 60 requests per minute + 10 additional for each player in the server.

Assuming you don’t need more than 10 per minute for each player, the number of requests should work fine. You can also just decrease the update frequency or only load outfits when a player needs them (e.g. only load the top few outfits fully and load the others when a player scrolls down that far).

You might also just be able to include a full description of the outfit along side the ID, meaning you wouldn’t need to load one for each. I don’t think ordered data stores have any restrictions preventing that.

1 Like

The amount of outfits per category will be between 1000-5000 outfits. Each outfit needs its full information from the database as they will be loaded in a viewport frame within the UI button.

1 Like

You could build that up over time assuming the outfits don’t change very much (e.g. the most popular ones might change in order but the actually set of outfits probably wouldn’t change very much).

I’d look into storing the information in the ordered data store itself, building up the data over time, caching the data on one server (e.g. save a big map of outfit ID to outfit description for popular outfits on one server and use that on other servers), or only getting the data on demand (when players try to look at the outfits).

1 Like