How can I influence the probability for choosing random values in the XML file?

Many components - as well as the <random> tag for strings and integers - provide the possibility to specify the list of possible values, one of which is chosen using uniform random distribution. You can influence the random distribution by listing values more than once. For example, if a list of integers to choose from contains "1,2", then 1 and 2 will be chosen with 50% probability each, but if you use "1,1,2,2,2", then 1 will be chosen with 40% probability and 2 will be chosen with 60% probability. There might be a more sophisticated syntax in the future to directly specify a weight for each value.

Add new comment