Hi! I'm using Arrays to randomly generate planets in a solar system.
Essentially, it's just a For Each loop that goes through each planet and randomly picks from traits stored in an Array. It'll start by picking the planet type (Ice Planet, Desert Planet, Etc.), then move onto how resource rich it is (Barren, Moderate, Abundant, etc.) and so and so on. To make certain traits more rare, all I've done is added more of the same options to the column (i.e. 'Super-Abundant' appears only once, so the chances of it being picked at random are lower).
It's great fun but very simple and I'd like to be able to affect the probability of outcomes based on previous selections. For example, if it's a Desert Planet, I want the chances of it being resource rich to decrease. If it's has abundant resources, I want it to be more likely to be habited - or for the society to be more wealthy, etc.
It's an interesting challenge and I'm not sure I know what the cleanest solution is. I'd love to hear how others would approach this and how you might solve it.