# Rarity/Luck System

Heyo!

As some of you may know, there have been a lot of “rarity” games popping up lately (i.e. the games in the attached picture). I’ve been curious on how they have been scripted.

Using a regular weighted luck system does not seem to be a possibility, because Lua can only store such small/big quantities.

The only solution I see is to have a range of rarities that a player can get, and then “sliding” that range to higher rarities based on a player’s luck value.

Let me know your thoughts/ways to go about making one of these rarity/luck systems!

2 Likes

Why is a regular weighted luck system not possible? Not sure I understand because lots of people (including myself) have made them

If you’ve ever played one of those games, you’ll realize that there are rarities that are incredibly hard to get (i.e. 1 in 3 tsTG, or 1 in 3e102 chance).

Obviously Lua can only handle such big numbers, and I see some workarounds but I’m sure there’s a simpler solution.

Probabilities can be played around with, think permutations and combinations

1 Like

I feel like it’s likely to be something similar to what you said. I doubt probabilities like 1 in 1x10^100 or whatever are ever actually calculated. The luck level is probably just a value added onto probabilities. For example:

I have luck level of 1, and the probability of me going from stage 1 to stage 2 is 1/2.

When I reach luck level of 100, the probability of going from stage 1 to 2 is just 0, and I can instantly roll to a higher stage such as 100 where the probability of me going from stage 100 to stage 101 is 1/2

2 Likes

I suspected that this was how these games did it. Thank you for your insight!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.