2
\$\begingroup\$

I'm designing a system where overall success is determined using a dice pool where you count the number of max-value faces among dice rolled and compare this number to some difficulty number. In this system, you roll d6s for attributes, and d4s for skill level.

Anydice.com helpfully can find the chances of any given number of successes (number of max-value die shown) with:

output [count 6 in Xd6] + [count 4 in Yd4]

So far, so good.

How do I find the odds that one person will beat (equal or greater number of successes) another person in a contest between two of these rolls with different X and Y values for each person?

Is this doable on anydice.com?

\$\endgroup\$
2
  • \$\begingroup\$ Welcome to RPG.SE! Take the tour if you haven't already, and check out the help center for more guidance. \$\endgroup\$
    – V2Blast
    Commented May 24, 2019 at 21:56
  • \$\begingroup\$ I've found the AnyDice moderators to be incredibly helpful in finding the crunchy points of the code. \$\endgroup\$
    – CatLord
    Commented May 25, 2019 at 1:50

1 Answer 1

3
\$\begingroup\$

Quite easily! You could use the following program:

output ([count 6 in Ad6] + [count 4 in Bd4]) >= ([count 6 in Xd6] + [count 4 in Yd4])

That tells you the odds that first roll meets or exceeds the successes of the second - the result of the >= "at least" comparison is 1 if the left side is at least the right side and 0 if it's not, so a result of 1 means the first side wins.

You might find it helpful to define a function to represent your rolling mechanic rather than typing out the full count syntax every time. For instance, you could use:

function: roll SIX:d FOUR:d {
  result: [count 6 in SIX] + [count 4 in FOUR]
}

Then you could use a simpler output statement like this, for example:

output [roll 4d6 4d4] >= [roll 3d6 5d4]
\$\endgroup\$
2
  • \$\begingroup\$ A couple of efficiency improvements: roll SIX:d FOUR:d is faster than roll SIX:s FOUR:s if you don't need to freeze the dice pools into sequences. Also, relabeling the dice as e.g. 4d{0:5,6} 6d{0:3,4} would make the counting itself faster. And probably the fastest solution would simply be 4d(d6 = 6) + 4d(d4 = 4). \$\endgroup\$ Commented May 25, 2019 at 6:31
  • \$\begingroup\$ @IlmariKaronen good points. I've gotten so used to casting dice to sequences for inspection that I do it automatically now... \$\endgroup\$
    – Carcer
    Commented May 25, 2019 at 7:34

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .