How would I make this type of system?

I want to create a chance system, but I need it to basically edit the % chance depending on certain factors, and then this needs to be updated cross-server.

I want to make a character card opening RNG type of game, however I want a “wish list / like list” as well, and the way I’d want this to work is the more users that have a specific character on their wish/like list, the lower chance of pulling that character, but this would then be updated to all servers, that way it creates a whole trading system/economy between players, finding others that have cards that they want etc, each card would only have roughly 5,000-10,000 unique holders, so then that would also need to be posted across each server. The % chance could also be effected by how many people hold the card already, and probably some other factors that I can’t think of currently, (suggestions are appreciated if you have any)

I’ve looked at some other threads already, talking about using off-platform databases to achieve this, or using things like MessagingService, and even MemoryStores.

One thread caught my attention though, which is making a “master server” that would handle everything to do with calculating percentages etc and then saving & pushing to every other server. It seems like the best option.

What I need help with is just more insight, other peoples opinions, what others think may work best that would keep everything updated. If a “master server” is the best option (which I’m thinking) how would I go about achieving this?

For reference on the “master server” I was looking at the following threads;

The Master Server is the best way to control and update chances for all players in real-time, using MessagingService and MemoryStore to send updates between servers.

Yeah, I had a feeling it would be. I’m not fully sure how I’ll pull it off exactly, so I need to research a lot more into making/using a Master Server, I think to keep datastores pulls down so much I will most likely make a big dictionary of every character I add, with their roll %, how many people actually own that specific character etc,

Since I need to update the % depending on the card (if the user takes it or not), do you think it’s best to send every person (that is ingame) cards every roughly 5-10 minutes to the “Master Server”, and just have the calculations happen&save&push once each server has sent their data?

Yeah, sending data every 5-10 minutes sounds like a good plan. The Master Server can process and update the chances based on everyone’s data, then push the updates to all servers. This way, you keep things in order and reduce the strain on datastores.

1 Like

Okay that sounds good.

I’m also debating on how I should do the percentages. Because I feel like I need to “categorize” each character into like {Common, Uncommon, Rare, Legendary, Mythical} and base it off how many people hold that card, how many people have the card in their wish/like list, etc I think the percentage to pull one of the “categories” I’ll hard code, for example;

Common - 50%
Uncommon - 35%
Rare - 12%
Legendary - 2.5%
Mythical - 0.5%

and then depending on how much the character is wishlisted, like lets say theirs 100 users, and if 80% of them have the same card on a wishlist, it’ll go into like legendary or mythical, if that makes sense? (each category would then roll 0-100)

I’m just not sure how I would work out what the card % would be after going into the category, do you have any suggestions?