[RPG] How to examine the distribution of successes-counting mixed dice pools

anydicedicestatisticstools

After looking at AnyDice's Documentation and Function Library, I remain baffled. I know that AnyDice can do this, but I don't know how to tell it to. Scott Gray's Dice Pool Generator is easier to use but doesn't return the results I need, or, at least, I lack arithmetic sufficient to force it to.

The mechanic uses a 6-die pool with a target number of 4. I need to know the percentage chances of rolling a 4 or higher on 1 or more, 2 or more, 3 or more, 4 or more, 5 or more, and all 6 dice in the pool using the following pools of dice:

  • 6d4
  • 5d4 and 1d6
  • 4d4 and 2d6
  • 3d4 and 3d6
  • 2d4 and 4d6
  • 1d4 and 5d6
  • 6d6
  • 5d6 and 1d8
  • 4d6 and 2d8

… and so on until 6d12 becomes 5d12 and 1d20. I can do 6d4 and 6d6 myself, but I wanted the progression to be clear. (I'm skipping d14s and d16, by the way, because I couldn't find d18s, and most folks don't own d14s and d16s anyway.)

Can this be done?

By the way, the results needn't be from AnyDice–that's just frequently mentioned as a good odds generator. Results are the important part not the tool.

Best Answer

Here's the link to the program, and here it is in its entirety:

DICE:{4,6,8,10,12,20}
loop D over {1..(#DICE-1)}{
  loop SECOND over {0..5}{
    FIRST: 6-SECOND
    FIRSTD: D@DICE
    SECONDD: (D+1)@DICE
    output [count {4..20} in FIRSTdFIRSTD] + [count {4..20} in SECONDdSECONDD] named "[FIRST]d[FIRSTD] and [SECOND]d[SECONDD]"
  }
}
Related Topic