[RPG] Can AnyDice.com handle weighted dice

anydiceloaded-dice

Is it possible to weight the dice in AnyDice.com and then use like normal?

I'd like to use a standard d6, with values 1-6, but weighted such that the probability for rolling a specific value is as follows.

1: 18%
2: 18%
3: 19%
4: 18%
5: 17%
6: 10%

I'd then like to find the probability of

Xd6
Xd6 +Y
Xd6 +Y dropping lowest N
etc.

Can this be done?

Best Answer

Yes, this can be done. The Anydice documentation details how we can describe arbitrary dice. Functionally with percentages like that, the dice is equivalent to:

  • 18 sides of value 1, 2 and 4.
  • 19 sides of value 3.
  • 17 sides of value 5.
  • 10 sides of value 6.

... So we'll define exactly that die in this Anydice program:

W: {
 1:18,
 2:18,
 3:19,
 4:18,
 5:17,
 6:10
}

output d6 \ for comparison \
output dW

anydice output with correct percentages

The syntax used there is sequences, and we're using it so we don't have to write out {1, 1, 1, 1, 1, 1, 1, 1... and so on eighteen times, and then the same for the five other faces. That's too prone to error and difficult to read. A more normal usage of sequences is writing 1..3:2, which is a sequence from 1 to 3 repeated twice, which is to say it represents 1, 2, 3, 1, 2, 3. We're generating a sequence that contains 1 repeated 18 times. The same goes for the other values.

W is a variable (covered in The Basics in the documentation). Variables must be uppercase, but you can name it whatever you want, including WEIGHTED_DIE if you'd prefer.