I'm working on designing an RNG loot table for something a friend is running, and the obvious solution given the nature of the loot table (its for a foraging system) is to use a weighted RNG method. That's easy enough to implement, but I'm worried that a standard weighted system will cause problems as its scaled up due to the fact there is effectively a floor to how rare an item can be weight wise. To illustrate: Say we have 3 items with the following weights A: weight 50, B: weight 10, C: weight 1 And then as the system is expanded we want to create item D that is even rarer than C... We now have to completely shift all the other weights around to make item D have weight 1. What I'd therefore like to do instead is do some sort of "reversed" weighting, where instead of rare items in the RNG having a lower number they instead have higher numbers. The idea I have is to divide the total sum of weights by the weight of the individual item and then feed that into the RNG (done in the program because not all items in the table will be valid to obtain at the same time, so the total sum weight will change) but it feels clunky. Is there a more elegant/efficient way to do it than the method I've come up with? Or am I missing something obvious about weighting that means that this reversal process isn't even required? Continue reading...