Implemented this debug UI for designers to quickly test randomization logic. Pictures below shows 50 randomized values between 1-20 based on different bias values. Bias value lets the designers have some kind of control over the randomization.
Let’s say player finds an armor that can have between 1 - 20 defense. When the bias is 1 (1 is the default value) the distribution of randomness is equal between all possibilities. Finding an armor that gives 1 or 20 defense has the same chance. When we increase the bias, the distribution shifts to the min side. The last picture shows that when the bias is 5, if the player found the same armor 50 times, only 1 of them would have the max (20) defense and 30 would have the min (1) defense.
This randomization is used in the template for all the item stats.