AnyDice Q & A

This is a collection of questions and answers collected from various places. They come from the blog, the Meebo chat, from forums all over the Internet, and you can add them here directly. I'll answer any open question as soon as I can.

Jasper Flick

Q
Is there a way to enter 1d10-1d10, where the lower roll is always subtracted from the higher roll?
A
You can use |d10 - d10|. This trick can be used for two dice, but not for more.
Q
Is there an expression to roll x many dice, then pick the highest result after summing duplicates? So from 4d6 (3,4,5,6) = 6, (3, 4, 4, 5) = 8, (6, 6, 6, 6) = 24, (1, 1, 1, 4) = 4 (2, 2, 2, 5) = 6, etc.
A
Unfortunately, this is currently not possible. As it's a rather specific operation, I won't be adding support for it in AnyDice anytime soon.
Q
How would you write the dice where you roll 10d10, keep the highest 4, if any of the highest 4 are 10s then they explode. Then you add X to the result.
...
I believe I found it in your complex examples: 10d(1d10e3h)h4+X. However, I do not get a response from the calculator when I enter 10d(1d10e3h)h4+19. I tried a less intense set of dice (3d(1d10eh)h2+19 and it worked. Is there a way to get the 10d version to work?
A
You did find the best possible answer. However, the expression actually explodes first, then picks the highest "explosion runs", instead of picking highest first, then exploding only those. This makes a small difference if the initial roll produces more than four tens.
Taking highest is an expensive operation. Unfortunately the expression with ten dice requires more computation time than allowed by the webserver, so it fails. This is a limitation of the current version of AnyDice.