# What is the average outcome of this opposed roll resolution mechanic?

Trying to work out the average number of successes for an opposed roll using the following system but can't quite seem to get it to work in Anydice

• Roll (3d6-5)+Stat+Skill+Modifier
• 3 6s = crit, roll 3d6-5 again
• 3 1s = fumble = autofail
• Base difficulty 9, extra success for every 2 over (e.g. 11 is 2 successes), max number of successes = skill+1.

Attack is an opposed roll, no. of successes on attack − no. of successes on defence. So if two average combatants (stat 2, skill 2) are fighting one another, I'm trying to work out the chances of various number of successes occurring.

Edit: Thanks for the help, to try and clarify on crits and fumbles:

A basic roll consists of rolling 3d6, the result of the three dice is totalled, then five is subtracted from that total, then the sum of (Stat+Skill+Modifier) is added.

If the initial 3d6 roll is 1,1,1 then the roll is a fumble. It automatically fails even if the modifier would still result in a 9+ result. In an opposed roll your opponent gains an extra success.

If the initial 3d6 roll is 6,6,6 then the result is totaled and five is subtracted (so it counts as 13) then 3d6 is rolled again, totalled, has five subtracted and is added to the initial total. As long as 6,6,6 keeps getting rolled this process continues. "Exploded" rolls dont count as a fumble even if you roll 1,1,1.

Edit: Thanks for all the help, regarding skill caps and how they interact with crits. Skill caps are the final step in the process, dice are rolled, modifiers applied, the number of successes calculated and then the skill cap is applied. If the roll crits then this final step is excluded e.g. Character with Stat 2, Skill 2, modifier 0:

1. Rolls 3d6 - Gets 16
2. 16 - 5 - 11
3. 11 + Stat (2) + Skill (2) + Modifier (0) - 15
4. Calculate successes (15 - 1 for 9, 1 for 11, 1 for 13, 1 for 15) - 4 successes
5. Apply skill cap, Skill (2) + 1, so the 4 rolled successes become 3. Thats the final result.

If it critted step five wouldnt have been applied.

Though the criticals are really statistically insignificant, maybe having them trigger on 2d6 or on any triple would have a little more impact.

• What successes do you mean? Successful attacks? Successful defenses? Successful attacks that get through successful defenses? Sep 20, 2014 at 23:53
• If max successes is 3 (skill of 2 + 1), do crits even matter? Crit = 3d6 - 5 = 13, which is 3 successes. Sep 21, 2014 at 0:07
• Also with skill of 2, a fumble seems not to matter as well (any roll on 3d6-1 below 9 would score 0 anyway). Removing both the crits and fumbles should make a first look a the dice roll mechanic in AnyDice more feasible. Sep 21, 2014 at 8:02
• Sorry should have been clearer, by successes I meant that if I roll, say 3d6-5 it will return 1 success for 9, 2 for 11, etc. Should included that crits can go above the success limit, though as pointed out for certain skill levels having a fumble = autofail doesnt really have any effect, maybe some kind of critical faiure instead (-1 success on your next roll or such) I think this correctly calculates successes and accounts for crits but doesnt take into account skill limits or fumbles - anydice.com/program/46dd Sep 21, 2014 at 16:31
• When I try to input an opposed roll - anydice.com/program/46de it suggests the chance of one aggregate success is ~2% which seems fairly low, I get the feeling Im making a mistake or overlooking something here Sep 21, 2014 at 16:34

With the clarifications you posted, here's an AnyDice program that should match your spec:

function: test ROLL:n against TARGET:n with skill SKILL:n stat STAT:n mod MOD:n {
SCORE: ROLL + SKILL + STAT + MOD
if ROLL = 3*1 - 5 { result: 0 }    \ fumble   \
if ROLL = 3*6 - 5 {                \ critical \
SCORE: SCORE + [explode 3d6 - 5]
result: [highest of 0 and (SCORE - TARGET + 2) / 2]
}
result: [lowest of SKILL + 1 and [highest of 0 and (SCORE - TARGET + 2) / 2]]
}
output [test 3d6 - 5 against 9 with skill 2 stat 2 mod 0] named "# of successes"


Here's the output for Skill 2, Stat 2, Mod 0:

# of successes   |  probability (%)
-----------------+-----------------
0                |  37.5
1                |  25
2                |  21.2962962963
3                |  15.7407407407
4                |   0.0085733882
5                |   0.0342935528
6                |   0.0771604938
7                |   0.1114540466
8                |   0.1114540466
9                |   0.0771604938
10               |   0.0343034757


The steep drop between 3 and 4 successes is because of the Skill+1 cap for non-critical rolls. Outcomes with more than 10 successes are possible for crits, but have a total probability of less than 0.01%.

The crit and fumble mechanics have very little statistical effect, since both trigger so rarely. (Specifically, each happens with a probability of just 1 / 6³ = 1 / 216 ≈ 0.463%.) In fact, for low Skill / Stat / Mod values like those above, the fumbles have no effect at all, since a fumbled roll would fail anyway, and the only effect the crits have is a tiny (< 0.5%) chance of bypassing the Skill+1 success cap.

I think I got everything with Anydice... I just Molded all the stat+skill+modifier into one variable called SKILL but everything else should work.

function: test ROLL:n with skill SKILL:n vs DIFFICULTY:n {
SCORE: ROLL - 5 + SKILL
if ROLL = 3 { result: 0 }
if ROLL = 18 { SCORE: SCORE + 3d6 - 5 }
result: [ successes for SCORE vs DIFFICULTY ]
}

function: successes for SCORE:n vs DIFFICULTY:n {
if SCORE < DIFFICULTY { result: 0 }
result: ( SCORE - DIFFICULTY ) / 2 + 1
}

ATTACK: [ test 3d6 with skill 4 vs 9 ]
DEFENSE: [ test 3d6 with skill 4 vs 9 ]
output ATTACK - DEFENSE

• That looks good, but I think you'll probably want if SCORE < DIFFICULTY { result: 0 } and result: ( SCORE - DIFFICULTY ) / 2 + 1 in your second function, so that a score of 9 or 10 vs 9 will yield one success instead of zero. Sep 22, 2014 at 10:07
• @IlmariKaronen Thank you! I added your suggestions - the first success is at 9 not at 11 :-) Now everything should be right Sep 22, 2014 at 13:35

Are you asking because you want to learn how to use manydice? Or you want a tool that can produce the answer?

The following formulas should be pasted into Excel, you can then tinker with what happens if you give one person extra skill etc.

This first paragraph are your headings. Note that I have left spaces in columns J and T for separation, so A1 should read Dice 1 and U1 should read opposedSuccesses Dice 1 Dice 2 Dice 3 Stat Skill Modifier isCrit? isFumble? Successes Dice 1 Dice 2 Dice 3 Stat Skill Modifier isCrit? isFumble? Successes OpposedSuccesses

This paragraph is your formula. So A2 should be randbetween(1,6) and U2 should be = I2-S2

=RANDBETWEEN(1,6) =RANDBETWEEN(1,6) =RANDBETWEEN(1,6) 2 2 0 =IF(SUM(A2:C2)=18,1,0) =IF(SUM(A2:C2)=3,1,0) =MIN(MAX(ROUNDDOWN((SUM(A2:F2)-5-7)/2,0),0),E2+1) =RANDBETWEEN(1,6) =RANDBETWEEN(1,6) =RANDBETWEEN(1,6) 2 2 0 =IF(SUM(K2:M2)=18,1,0) =IF(SUM(K2:M2)=3,1,0) =MIN(MAX(ROUNDDOWN((SUM(K2:P2)-5-7)/2,0),0),O2+1) =I2-S2

Then, you will want to select A2-U2 and drag the formula down. I was running with 10000 rows, more makes it run slower but more accurate.

Results are shown below. You can see there is still some randomness in there - crits and fumbles range from 0.4-0.7% when they should be 0.463%

Attacker fumbles defender crits 0.0%

Attacker fumbles 0.5%

Defender Crits 0.4%

-3 6.7%

-2 12.7%

-1 17.9%

0 25.6%

1 18.1%

2 12.5%

3 6.5%

Attacker crits 0.7%

Defender fumbles 0.4%

Attacker crits, defender fumbles 0.0%

To see these results in your Excel, paste the following in anywhere out of the way. This is 2 columns worth of data pasted as one, so everything including the rightmost + sign and further right is column 2.

Attacker fumbles defender crits =COUNTIFS($H:$H,1,$Q:$Q,1)/COUNT($Q:$Q)

Attacker fumbles =COUNTIFS($H:$H,1)/COUNT($Q:$Q)

Defender Crits =COUNTIFS($Q:$Q,1)/COUNT($Q:$Q)

-3 =COUNTIF(U:U,X35)/COUNT(U:U)

=1+X35 =COUNTIF(U:U,X36)/COUNT(U:U)

=1+X36 =COUNTIF(U:U,X37)/COUNT(U:U)

=1+X37 =COUNTIF(U:U,X38)/COUNT(U:U)

=1+X38 =COUNTIF(U:U,X39)/COUNT(U:U)

=1+X39 =COUNTIF(U:U,X40)/COUNT(U:U)

=1+X40 =COUNTIF(U:U,X41)/COUNT(U:U)

Attacker crits =COUNTIFS($G:$G,1)/COUNT($R:$R)

Defender fumbles =COUNTIFS($R:$R,1)/COUNT($R:$R)

Attacker crits, defender fumbles =COUNTIFS($G:$G,1,$R:$R,1)/COUNT($R:$R)

Hope that helps, any questions? let me know.

And if you were actually wanting to learn how to use ManyDice, sorry, I can't help you.

as others have pointed out, it's a little unclear how the crits/fumbles work. So I just reported them as crits/fumbles. If you explain in mroe detail how they work (do crits allow you to get a total number of success equal to 4+2*skill? i.e. each seperate set of dice rolls has a cap?

What happens if the defender fumbles?

• Your answer is presently a little difficult to parse. I suspect certain sections of this should be using code blocks, and other parts would benefit from lists and possibly headings. Watch you insert a double line when you want a new paragraph (including for code markup), your third paragraph probably needs one. Sep 22, 2014 at 2:59
• Sorry... I think Anydice is by far the better tool for the job, because the Exel-formular is hardly readable Sep 22, 2014 at 8:21