Prize weights are proportional not inversely proportional. If you choose to use the table method, it would work like this. Say there are only 2 prizes (12 and 15), and their weights are 3 and 5. Make the table like this: 12 12 12 15 15 15 15 15 Choose a random number from 0 to 7, and lookup in the table to get the prize. Note that with this method, the table could get really big, and would probably have to be dynamically allocated, and rebuilt every time you get a new settings update.