Here is how
we did it some years ago - This was for a game with lots of items
We had a Webinterface on which we could add items to a Boss / Mob. The Lootable could be exported and looked kind of like this:
[bossID].table
tdID | lnItemID | tdDropChance |
0 | 1262 | 0.01 |
1 | 1337 | 0.50 |
Every time a boss was loaded (start of level) , a random number between 1 and 100 was drawn for each item on the list.
DropChance was multiplied by the random number. If it was >= 1 we added it to a Collection.
Every Boss/Mobb had a chance to drop say 3 -6 items.
We would than randomly pick (random.nextInt(3) + 3) items from that Collection and wait for the boss to go down.
In the loottable were always enough
dropChance = 1.0 items to guarantee something would drop.
Crazy times...
