Role playing games often use lots of dice. Especially those game that are in the D&D family tree. They use lots of different types of dice and lots of different combinations of dice.
When designing your own rules, it is useful to know the distribution of values produced by certain combinations of dice. That way you can decide what to use.
For example, do you use a 20 sided die, or two ten sided dice to work out if an attack succeeds? The answer depends on what kind of probability distribution you want.
One twenty sided die will mean that each die roll is equally likely. This means that a player who needs to roll a 19 to hit, is 5% more likely to hit then a player who need to roll a 20 to hit.
Two ten sided dice will mean give a rounder distribution. This means that a player who needs to roll a 19 to hit, is 1% more likely to hit then a player who needs to roll a 20 to hit.
To help in this analysis I wrote a small perl module to calculate these distributions. It is not very smart, and I'm sure does not use the most efficient algorithm around. In fact it doesn't use any statistical algorithms at all, resorting to a brute force approach.
Currently there is no documentation, but that will come soon, along with some tools that use this to work out more useful things.
You can download the module. It used the Parse::RecDescent module by Damain Conway which you can download from CPAN. There is also a simple example of how to use the module.
I've also used a modified version of the module (that bails out if the calculation would take too long for this web server) to create a simple CGI script which you can access below.