[RPG] Odds for dice pool with exploding dice

anydicedice

I'm designing a tabletop game with dice pool mechanic for combat resolution. You roll some d6 and each die that rolled at least 3 counts as a SUCCESS:

  • If you roll more 1s than 6s, it's a fumble
  • One or two SUCCESSES is a light wound
  • Three SUCCESSES in one roll is a severe wound
  • Six SUCCESSES is a critical wound
  • For each 6 you roll you get a SUCCESS. Also, add another d6 to the pool for each 6 you rolled. Count each of these die as a SUCCESS regardless of the number thrown. Each of these can also explode on 6.

I have all but last point covered in the below function (direct link to AnyDice function). But I'm struggling with the last part, the exploding dice mechanic.

That is critical to evaluating the system, as without exploding dice fumble chances increase, and are nearly 1/3 which is way too high. Exploding dice will limit the likelihood of fumbles. [edit: no, it won't]

Any idea how to write this function?

FUMBLE: -1
MISS: 0
WOUND: 1
SEVERE: 2
CRITICAL: 3

function: evaluate ROLL:s {
 SUCCESSES: ROLL >= 3
 if [count 1 in ROLL] > [count 6 in ROLL] { result: FUMBLE }
 if SUCCESSES = 0 { result: MISS }
 if SUCCESSES = {1..2} { result: WOUND }
 if SUCCESSES = {3..5} { result: SEVERE }
 if SUCCESSES >= 6 { result: CRITICAL }
}

loop DICE over {1..6} {
 output [evaluate DICE d6] named "[DICE]d6"
}

Best Answer

There's a built-in explode function, but you have to use it before doing your other processing. Specifically, use FOOdBAR to have BAR evaluated as a sequence and used to generate FOO "dice" with arbitrary side counts and values. Here, DICEd([explode d6]) does the job, turning an exploded d6 into the base for the actual roll. (explode doesn't separate dice that you give it — you have to do that, or you'll get a 5d6 roll that only explodes, once, on 30.)

You can't compare sequences to a threshold to get a list or sum of values against that threshold — you'll just get the sequence summed and checked against the threshold. Instead, use [count VALUES in SEQUENCE] for each of the valid values (3-6). And as it turns out, since every 6 triggers a new die and all those dice count, you can just double-count 6s once exploded. So really that should be [count {3..6, 6} in ROLL].

The results, as best I can manage, aren't pretty. Each explosion will either fumble harder (1), make no progress against fumbling (2-5), or break even and get a new chance to do the same thing (6), and the more dice you start with, the more chances for explosions. There is no provision for fumbles to peter out in explosions, as one would expect from a great success; the only question is whether the chain ends with a 1 or not.

Related Topic