You can use the same solution(s) as for your previous question, but wrap the rolls you want to explode with the [explode DIE]
function from AnyDice's built-in Function Library, e.g. like this:
function: sign of N:n {
if N < 0 { result: -1 }
if N > 0 { result: 1 }
result: 0
}
SKILL_A: d4
SKILL_B: d8
DIFF: d6
output [sign of [highest of SKILL_A and SKILL_B] - DIFF] named "no explode (-1 = failure, 0 = tie, 1 = success)"
SKILL_A: [explode d4]
SKILL_B: [explode d8]
output [sign of [highest of SKILL_A and SKILL_B] - DIFF] named "only skill dice explode (-1 = failure, 0 = tie, 1 = success)"
DIFF: [explode d6]
output [sign of [highest of SKILL_A and SKILL_B] - DIFF] named "all dice explode (-1 = failure, 0 = tie, 1 = success)"
The [explode DIE]
function takes any die and returns an exploding version of that die. So, for example, [explode d6]
is an exploding d6. It does have a few notable quirks that should be kept in mind:
[explode 2d6]
is a single 2d6 roll that explodes (i.e. gets another 2d6 roll added to it) on a roll of 12 (the maximum possible result). If you instead want to roll two d6's that each explode on a roll of 6, you need to write that as 2d[explode d6]
.
To keep the range of possible results limited, AnyDice by default only lets dice explode at most twice. You can adjust this limit with set "explode depth" to N
, where N
is some number (the default value being 2) if you want.
The [explode DIE]
function always produces dice that explode on the highest possible roll, adding a reroll of the same die to the original roll. If you'd prefer to use some other explosion rule, you need to write your own custom function. There's an AnyDice blog post about exploding dice that goes into this in more detail.