I know what ya’ll really want: an arbitrary discrete probability distribution function map.
https://github.com/roquendm/JGO-Grabbag/blob/master/src/roquen/math/rng/RandomSelect.java
[start of google translate]
A fixed list of entries each of which has a fixed probability of occurring. You pass it a pseudo or quasi random number and it selects a matching entry.
[end of translation]
Example usage: single item drop list or population, fluff text from a unit/NPC, etc.
During the building process instead of providing the extra probabilities you provide “weight” values which indicate relative probabilities. Example you enter (rock,5) (lint,1) (thing,2). You’re 5 times as likely to get “rock” as a result when compared to “lint” and 2x as likely to get “thing” compared to “lint”. The exact numbers have no meaning.