This is almost certainly a very novice question, but being as I am a complete novice, I'm fine with that.
To put it simply, I'd like to know how to make a loot drop system in a simple game, where when you achieve a certain objective, you have a chance of getting certain objects more than others. If there are any open-source python games that have this, please refer me to them.
Here is what I know how to do: given a sample [A,B,C,D,E,F], select 3 items.
This is really simple and easy, however, what do I do when I would like to have somethings from the sample be selected more often than others, ie: given sample [A,B,C,D,E,F] have 3 be selected, without repeats, but have A be selected 30% of the time, B 25%, C 20%, D 15%, E 5%, F 5%.
Or, perhaps even better, have no limit (or a ranged limit, eg. 3-5 items) on the amount selected, but have each item in the sample be selected at a different rate and without repeats, so that I could do A 20%, B 20%, C 15%, D 10%, E 2%, F 1%.
Hope this makes sense.