Luck Based Table Resorting

I would like to achieve a table that Resorts itself so a “Common” pet number would be a bit lower while a “Legendary Pet” number would be a bit higher. These values would get closer together as the value being “Luck” would increase. For example, I would turn

Local Table = {
       {"Dog", 100},
       {"Dog", 50},
       {"Dog", 1},
}
--Into this
Local Table = {
       {"Dog", 90},
       {"Dog", 50},
       {"Dog", 10},
}

I have tried to change the lower values correlated to the percentage but it didn’t really turn out good.
My only problem is this as I already have a RNG system that selects the pets but I just need a more balanced luck system.
Any help is greatly appreciated!

1 Like

This Tutorial should be a great help to you. It goes over a weighted chance system . For what you’re looking for specifically with common, rare, and legendary pets I reccommend This Video by alvinblox which goes over a pet system with different rarities.

3 Likes

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