Hello everyone!
I need some help regarding my game's shop functionality. I have some in-game tokens which I know how to implement with PlayFab.
What I am not sure how to implement is drop tables with a timer. What I mean more exactly:
I have 4 item rarities: common, rare, epic and legendary.
I have 3 item slots which spawn items every 24 hours (for testing purposes I will set this, in the beginning, to 5 minutes).
Each of these 3 item slots spawn an item, and each item slot has different rarity chances for rarities, following these rules:
1st slot - 75% chance of spawning a common item, 15% chance of spawning a rare item, 10% chance of spawning an epic item, 5% chance of spawning a legendary item
2nd slot - 50% chance rare, 50% chance epic
3rd slot - 33% chance rare, 33% chance epic, 33% chance legendary
After the user buys an item, he doesn't get a new one spawned in the store until the timer restarts.
My question is, how do I implement this system more exactly? Do I create 3 drop tables, one for each item slot and in the catalog I set the rarity for each item?
And the second question is, how do I implement the timer?