Die Roll Maths for Tabletop Nerds

2 hours ago 1

This is my first post of what might potentially become a series on designing TTRPGs - with a focus on rules and game mechanics. In this post I’m going to take a deep and close look at die rolls - the most fundamental building block of a TTRPG.

Introduction To The Dice

Dice are typically used to determine outcomes in a non-deterministic fashion. Most other rules and mechanics are about managing the probabilities of achieving certain outcomes - by increasing or decreasing their likelyhood to reflect both the difficulty of the attempt as well as the skill and ability of the player-character in that regard.

A typical die-set consists of seven dice - the five Platonic Solids, and two less regular, ten-sided solids:

  • D4 - four-sided, can roll 1, 2, 3 or 4
  • D6 - six-sided, 1, 2, 3, 4, 5 or 6
  • D8 - eight-sided, 1, 2, 3, 4, 5, 6, 7 or 8
  • D10 - ten-sided, 1, 2, 3, 4, 5, 6, 7, 8, 9 or 0 (which counts as 10)
  • D12 - twelve-sided, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 or 12
  • D20 - twenty-sided, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19 or 20
  • D100 - a second ten-sided one, can roll 10, 20, 30, 40, 50, 60, 70, 80, 90 or 00

To actually roll a D100, you’d throw both ten-sided dice and add them together. Rolling 00 on one and 0 on the other is a special case, as this counts as a result of 100. In all other cases, the zeroes add nothing. (Dice generally never have a result of 0 - if a D10 is rolled individually, a result of 0 would be interpreted as 10 as well). This means a D100 covers all possible results from 1 to 100, which is why it’s also sometimes called the “percentile die”.

Basic Probabilities

We consider all dice to be perfect - i.e. all faces having precisely the same likelyhood of facing up, and no number being printed more or less often than any other. That means each possible result (of a single die) has equal probability. The expectancy value of a die equals the average result you’d expect to get after rolling infinite times.

  • D4 - expectancy value: 2.5, probability of each individual result: 25%
  • D6 - expectancy value: 3.5, probability of each individual result: 16.7%
  • D8 - expectancy value: 4.5, probability of each individual result: 12.5%
  • D10 - expectancy value: 5.5, probability of each individual result: 10%
  • D12 - expectancy value: 6.5, probability of each individual result: 8.3%
  • D20 - expectancy value: 10.5, probability of each individual result: 5%
  • D100 - expectancy value: 50.5, probability of each individual result: 1%

Probability Curves

SINGLE DIE

The probability curve of rolling a single die is constant. That’s the direct result of each individual result having equal probability.

  • Example:
Die123456789101112
1D128.3%8.3%8.3%8.3%8.3%8.3%8.3%8.3%8.3%8.3%8.3%8.3%

1D12 The curve for a single die is a straight, constant line

TWO DICE

If you roll two dice and add them together, some total results can be achieved through more different individual combinations than others:

  • Example: 2D6 - Matrix:
 123456
1234567
2345678
3456789
45678910
567891011
6789101112

As you can see in this example, there’s 6 different ways to get 7 - but both 2 and 12 have only one single occurence each. That makes 7 six times as likely as 2 or 12.

  • Example:
Die123456789101112
1D128.3%8.3%8.3%8.3%8.3%8.3%8.3%8.3%8.3%8.3%8.3%8.3%
2D6-2.8%5.6%8.3%11.1%13.9%16.7%13.9%11.1%8.3%5.6%2.8%

2D6 The curve for two dice is pyramid shaped

If you compare the results of 2D6 to those of 1D12, you will find, that 7 is exactly twice as likely, while 2 and 12 are exactly one third as likely. The distribution is no longer constant, and in this case forms sort of a pyramid-shape - with a point at the top center, and two straight lines leading up to it, and back down from it.

If you want a die roll with a highest possible result of 12, you can use either 1D12 or 2D6 - but they are not the same. 1D12 is truly random, with every outcome being exactly as likely as all the others. 2D6 feels more ‘natural’, with the expected result of 7 happening 6 times as often as the outliers of 2 or 12. That’s because the pyramid-shape of the curve approximates a normal distribution, which is everywhere in nature and thus what we’d expect intuitively.

This works similarily for all die sizes.

THREE DICE

The curve now starts to take on a bell shape, becoming a Gaussian curve - we now get an actual normal distribution.

  • Example:
Die123456789101112
1D128.3%8.3%8.3%8.3%8.3%8.3%8.3%8.3%8.3%8.3%8.3%8.3%
2D6-2.8%5.6%8.3%11.1%13.9%16.7%13.9%11.1%8.3%5.6%2.8%
3D4--1.6%4.7%9.4%15.6%18.8%18.8%15.6%9.4%4.7%1.6%

3D4 The curve for three dice is bell shaped

In the center (which has also become broader) we are now more than twice as likely than a single die would be - but at the extremes we are at less than one fifth. The larger the die size, the steeper and pointier this curve gets. Being only four-sided dice, this is the most normal of them all. But if you got to twelve-sided or even twenty-sided dice, the curve becomes extremely steep and pointy and stops feeling natural. Rolling a 3 comes in at way below 0.1% - making rolling 3D12 feel similar to rolling 1D20+10, just with some super super rare outliers added on top. For tabletop roleplaying purposes, the 1D20+10 would be the better choice.

Dungeons & Dragons uses 1D20 and thus probabilities of 5% for each possible result. They generally use +2 (+10%) bonuses, and not +1 - because a +5% difference doesn’t feel significant in most cases. Going from cricitical hits on 20 to 19-20 is a rare example of a +5% difference that does feel significant - because it actually doubles the crit chance from 5% to 10%.

Conclusion

My recommendations would be:

  • Use one die for any situation where you want true randomness, a fair outcome with perfectly equal distribution.
  • Use two dice for any situation where you want the outcome to feel natural and intuitive (while the math is hard to solve in your head).
  • Don’t use three or even more dice - you are just wasting time on more rolling and adding up numbers, and gain nothing useful in return.
  • Avoid tiny chances. A chance of 5% is just barely noticeable. Anything smaller than 1% is pointless. Smaller than 0.1% is just silly. There is no need for that fine granularity.

Comparison The three dice curve is significantly steeper than the two dice one, and 1 die is just flat

I personally like complexity and depth in gameplay, but simplicity and straightforwardness in rules. To me, a game system is elegant, if it manages to squeeze a lot of real depth out of just a few and simple rules. Any game that throws an ton of overly complex systems and choices at me, only to then have it all boil down to just a single number that actually matters and never varies much from character to character anyway, feels wrong to me. I prefer more complexity in gameplay, less complexity in character creation.

You can always add more depth and complexity by adding more rules. The real art though, lies in increasing depth and complexity through the removal and consolidation of rules. That is the lens, through which I look at this, the angle from which I approach the design of game mechanics.

Methods Of Determining Outcomes

There are many different ways to use these die rolls to determine outcomes. In the simplest form, only two possible outcomes are differentiated: success and failure. In order to determine which, a simple equation like for example 1d20 > 10 has to be solved. The player has to roll a twenty-sided die, and if the result is bigger than 10, it’s a success - otherwise it’s a failure.

In practice there’s also bonuses that get added to each side, turning the equation into the form of 1d20 + a > 10 + b. In the case of an attack, a might represent the skill and power of the attacker, and b might represent the evasion and worn protection of the defender. If the attacker is stronger, then a > b might be the case - or the other way round. But on average - and also in the special case of both sides being exactly equal - we assume that a = b, and thus they cancel out, leaving us with the simplified (but representative) equation of 1d20 > 10.

In general it seems to feel more satisfying though, to be able to differentiate at least a few different tiers of success. Some games achieve that by adding an extra critical success on top, through additional rules. Others use multiple rolls (using a die-pool for example) to get a number of successes that can range from 0 (failure) to N. Each individual roll remains purely success or failure - but in total you get a number - the count of successes you had. Another way to get a number from 0 to N is to take the delta - basically calculating 1d20 - 10 instead of 1d20 > 10. Zero or lower indicates failure - 1 or higher tells you how well you succeeded. In any case you will probably want to cap N to an allowed maximum somewhere in the single digit range.

1d20 > 10 has a perfect 50-50 chance of success and failure. 10 is the expectancy value of 1d20 (which is 10.5) rounded down - representing an average die roll. You’d also get a perfect 50-50 if you used 1d20 >= 11 (rounding up, and using greater-than-or-equal) instead. Dungeons & Dragons uses 1d20 >= 10 which gives them a 55-45 chance and introduces a small bias towards success. Using 1d20 > 11 would flip that bias towards failure, resulting in 45-55 chances. While you are free to introduce whatever bias you want - I will stick to just 1d20 > 10 for this post, for the sake of simplicity. A bias towards success is a good thing though.

All of the following methods theoretically can be used:

  • as just a basic success/failure check - or
  • with some additional critical success rule on top - or
  • as an individual roll out of a pool of multiple rolls, allowing you to count successes - or
  • to determine a delta telling by how much the check was succeeded - or
  • as any combination of the above

… although some of these approaches might be better suited for some methods than others.

Fixed Number Target

1D20 > 10 or 1D20 + a > 10 + b

This is the typical modern D20 method. It uses only one single die and thus follows a constant, flat distribution curve. When a = b we get exactly 50-50 chance of success or failure for one individual roll. But when a > b or b > a we get a flat +5% or respectively -5% success-chance for each point of difference. These +5% steps come from the constant distribution. For a D10 these would be +10% steps, for a D4 these would be +25% steps.

The same 5% steps are also present in the delta approach - when comparing to a fixed number, in this case 10. You have a 50% chance to get a delta of 0 (when treating negative deltas as 0), a 5% chance of it being 1, a 5% chance of it being 2, etc. all the way up to the final 5% chance of delta being 10. Or in cumulative numbers, you have a 50% chance of delta 1 or higher, a 45% chance of delta 2 or higher, a 40% chance of delta 3 or higher and so on - ending with a 10% chance for 9+ and a 5% chance for 10. These again are the same +5% steps from the constant distribution.

The approach of doing multiple rolls and counting number of successes will result in a normal distribution overall, even despite the individual rolls being constant distribution. To get an overall distribution of 50-50 success/failure, everything that has less than half of N successes has to be considered an overall failure. In other words, half of your outcomes have to be failures, the other half have to be successes - you have to have as many tiers of failure as you have tiers of success. It probably might be possible to alternatively make the individual success chance very low, to allow for every result with 1+ successes to count as a success overall - but I have not looked into this, neither into how changing a and b influences the overall distribution.

This table shows how varying values for a and b influence the overall success-chance: (negative numbers work symmetrically)

1D20 > 10a=ba-b=1a-b=2a-b=3a-b=5a-b=10
success50%55%60%65%75%100%
failure50%45%40%35%25%0%

And this next table shows how varying values for a and b influence the delta, with a delta cap of 9: (again, negative numbers work symmetrically)

1D20 - 101234567891011121314151617181920Average Delta
a=b----------12345678992.7
a-b=1---------123456789993.15
a-b=2--------1234567899993.6
a-b=3-------12345678999994.05
a-b=5-----1234567899999994.95
a-b=10123456789999999999997.2

I personally like this method best when being used as the individual roll in the “count successes” approach. It’s simple and quick and thus suited well for doing multiple times. And since the “count successes” approach is a normal distribution anyways - there’s no downside to this individual roll being of completely constant distribution.

Percentile Chance

This a special variant of “fixed number target”, where the number is given as a success-chance in percent. In order to have an actual success-chance that’s identical to the given number, the equation has to be:

1D100 <= X - where X is the given percent chance.

For example, if we assume X to 70, then we get 1D100 <= 70 which actually has a success-chance of exactly 70%. This cannot be combined with an a bonus on the left side without loosing this connection to the number being the actuall success-chance. So you can only have 1D100 <= 70 + b - where b is a (positive or negative) bonus to the success-chance in percent.

I personally really like this method in story-telling tames with less focus on rules and mechanical depth than a full-on roleplaying game - because it doesn’t get any simpler than that, and you immediately know your chances.

Comparative Rolls

This is the method which has a die on each side of the equation:

1D20 > 1D20 or 1D20 + a > 1D20 + b

What I personally like about this method is (among other things) that it makes the defender an active party in combat. Instead of justing waiting for the DM to tell them the damage, they get to roll a dice and actively try to dodge out of the way. Does keep people more involved, when it’s not their turn. When it comes to other things, like for example traps resisting being disarmed - it’s still possible to just default to 10 instead of actually rolling a die for the trap. For a player-set trap, it might be the player doing the roll when setting up the trap - which then serves as a fixed difficulty for that specific trap, instead of 10.

This follows the pyramid shaped distribution curve of two dice. The point of the pyramid would be both die rolling the same number (i.e. a delta of 0) - and is the most likely outcome. The low outer sides of the pyramid represent one die being 19 points lower or higher than the other (delta -19 or +19), which is very rare. That also means if a and b are different, i.e. the attacker or defender have a higher bonus - the most likely outcome is, that the side with the higher bonus wins by exactly that difference in bonus. With a steep bell curve this would feel too deterministic, with a flat constant distribution too random as what “should” happen isn’t more likely to happen, but with the flatter pyramid of two dice this just feels natural, with the expected outcome happening just slightly more often than the random ones.

Regarding the distribution curve it does not matter on which side the dice are, you can basically treat this as a mathematical equation and rearrange it algebraically. If the equation has two dice, it’s outcomes will always have this pyramidal shaped distribution, regardless of whether the dice are both on the left side, both on the right side, or one on each side.

The following matrix shows the delta (capped at 9) for each possible result of the left-hand die (shown in the top column, left to right) combined with each possible result of the right-hand die (shown in the rightmost column, top to bottom). If you think of any delta 1 or larger as success, then you can look at general success/failure disregarding the delta as well.

 123D45D67D89D1011D1213141516171819D20
1-1234567899999999999
2--123456789999999999
3---12345678999999999
D4----1234567899999999
5-----123456789999999
D6------12345678999999
7-------1234567899999
D8--------123456789999
9---------12345678999
D10----------1234567899
11-----------123456789
D12------------12345678
13-------------1234567
14--------------123456
15---------------12345
16----------------1234
17-----------------123
18------------------12
19-------------------1
D20--------------------

This matrix is the basis on which bascially all statistics in this post are based. All the deltas, success-chances, averages and probabilities can be derived from just this one table. Not only for d20s - this matrix can also serve to look at other equations - simply ignore the right-most columns and bottom-most rows, past the die-sizes you want to look at:

Table selections

Taking 1D10 - 1D10 as an example (with nice round numbers), we get deltas ranging from 1 to 9, clearly showing the mentioned pyramid distribution curve mentioned further up. The left half of the pyramid is missing, since we are not showing negative deltas (-1 to -9) in the table. All those get subsumed into Δ0-. Looking at 1D12 - 1D12 and 1D20 - 1D20 as well, we see a similar thing happening in Δ9+ - where all higher deltas get subsumed into that (because we are capping at 9).

EquationΔ0-Δ1Δ2Δ3Δ4Δ5Δ6Δ7Δ8Δ9+avg. Δavg. Δ on success
1D10 - 1D1055%9%8%7%6%5%4%3%2%1%1.653.67
1D12 - 1D1254.2%7.64%6.94%6.25%5.56%4.86%4.17%3.47%2.78%4.17%1.964.27
1D20 - 1D2052.5%4.75%4.5%4.25%4%3.75%3.5%3.25%3%16.5%2.785.84

Deltas Comparative Rolls show a pyramid shaped distribution curve, as expected for two dice (shown with no cap, and including negative deltas)

A few examples to take a closer look at what happens when using different die sizes:

EquationΔ0-Δ1Δ2Δ3Δ4Δ5Δ6Δ7Δ8Δ9+avg. Δavg. Δ on success
1D12 - 1D1254.2%7.64%6.94%6.25%5.56%4.86%4.17%3.47%2.78%4.17%1.964.27
1D12 - 1D1045.8%8.33%8.33%7.5%6.67%5.83%5%4.17%3.33%5%2.344.32
1D12 - 1D837.5%8.33%8.33%8.33%8.33%7.29%6.25%5.2%4.17%6.25%2.834.53
1D12 - 1D629.2%8.33%8.33%8.33%8.33%8.33%8.33%6.94%5.55%8.33%3.434.84
1D12 - 1D420.8%8.33%8.33%8.33%8.33%8.33%8.33%8.33%8.33%12.5%4.135.21

Deltas 2 Comparing against a smaller die results in a pyramid stump shape (again without cap, but including negative deltas)

By using a smaller die on the right side, we are turning the tip of the pyramid from a point into a flat line, resulting in a pyramid stump - i.e. a pyramid with the tip cut off. The line at the top is as wide as the difference in die size. Where for 1D12 - 1D12 a delta of 0 is the most likely outcome - for 1D12 - 1D10 the deltas 0, 1 and 2 are all equally likely. If you then go to 1D12 - 1D8 - the chances of 0, 1 and 2 remain unchanged at max; the chances of 3 and 4 rise substantially, also reaching max; but the chance of getting delta 11 only grows a little.

The cumulative numbers might be more telling, as they show not the probability of exactly that specific delta happening, but instead the probability of the delta being at least this number or higher. That means Δ1+ shows the probability of having any success, Δ2+ shows the probability of having 2 successes or more, and so on - and these numbers hold true regardless of where you put the cap.

EquationΔ0-Δ1+Δ2+Δ3+Δ4+Δ5+Δ6+Δ7+Δ8+Δ9+
1D12 - 1D1254.2%45.8%38.2%31.1%25%19.4%14.6%10.4%6.94%4.17%
1D12 - 1D1045.8%54.2%45.8%37.5%30%23.3%17.5%12.5%8.33%5%
1D12 - 1D837.5%62.5%54.2%45.8%37.5%29.2%21.9%15.6%10.4%6.25%
1D12 - 1D629.2%70.8%62.5%54.2%45.8%37.5%29.2%20.8%13.9%8.33%
1D12 - 1D420.8%79.2%70.8%62.5%54.2%45.8%37.5%29.2%20.8%12.5%

Cumulative Deltas Cumulative Deltas, capped at 9 and not showing the negative side

This is where I think that things get really interesting. We now have comparative rolls, resulting in a delta that signifies how “good” the success was, and we can cap that delta wherever we want.

Where Dungeons and Dragons (and many similar games) rolls a D20 to determine hit or miss, and then another damage die (for example D8 for longsword) to determine how hard you hit (for how much damage) - you could instead use the delta (cap it to 8 for longsword) to signify damage. Just one possibility.

Where Dungeons and Dragons (in certain versions) gives up to 5 attacks to a character and rolls a D20 five times in a row - you could instead use the delta (capped to 5) to signify how many successful hits the attacker landed. And since you already get damage variability through number of hits - you could make weapons simply do fixed damage, removing the need for extra damage rolls. But you do sacrifice the ability to attack multiple different enemies - to do it in a single roll, all attacks have to be on the same target.

Either way, the total damage dealt is less random (than it is with extra damage rolls), and far less die rolls are required. The outcome (damage dealt) is more directly dependent on the quality of the attack (how good you rolled + your attack bonus), and the distribution curve of both your chance to hit and the damage done on a hit feels natural and corresponds to how much stronger or weaker you are than your opponent.

I personally really like the depth and versatility available here. Taken by itself, the comparative rolls method may not look like much - but with the deltas there’s a lot you can do - if you are cleverly building on top of that. You can always increase depth by adding more rules and die rolls. And you can always streamline things by sacrificing depth. To me personally this here seems like a perfect sweet spot with just the right balance of depth and simplicity. But where that sweet spot lies for you, depends entirely on how much value you personally assign to depth and simplicity and what trade-offs you are willing to make for the sake of one or the other.

Other Methods

It’s theoretically possible to put two dice on the attackers side and make the defender a fixed number:

  • 2D20 > 21
  • 2D12 > 13
  • 2D10 > 11

… but I don’t see the benefit in doing that? Making the attacker a fixed number (and roll the defender only) seems super weird and off the wall, but it could be done. Not sure if that would be fun though. Two dice on the attacker side versus just one die on the defender side is thinkable as well - but is probably just a worse rendition of comparative rolls.

I can’t think of another main method (i.e. simplified equation) that would be interesting to try - but there’s definitely a lot that can be done on the approach side, like adding additional rules (critical success for example), or tweaking the a and b parts (and their composition) of the full equation. But that’s outside the scope of this post.

Conclusion

  • there’s a wide range of options and possible combinations of method, equation and approach
  • some combinations are better suited for some styles of games than others and vice versa
  • the distribution curve is a major contributor to how the die rolls actually feel in play
  • understanding the probabilities’ and distribution curves’ impact helps to avoid having to rely solely on blind trial and error
  • more nuanced outcomes than just success or failure, can be achieved through die pools or deltas
  • nothing can beat d100 percentile chance checks in sheer simplicity
  • die pools and success counting go well with fixed number target
  • deltas go well with comparative rolls
  • no method offers inherently better depth or elegance - it’s all about making good use of their specific capabilities, and using them according to their strengths

Advantage and Disadvantage

‘Advantage’ means to throw two dice instead of one, and use the better result. I use 1D20⁺ as notation for that. ‘Disadvantage’ is the same, but with using the worse result (1D20⁻). This can be used to situationally increase or decrease the probabilities in - or against - the players favor. The difference it makes is noticable, but not as big as you might think.

If a player rolls two D20, resulting in 1 and 20 - they feel like the advantage has saved them - disregarding the fact that there’s a 50% chance that the 20 would have been their regular roll, had they not had advantage. Combined with the fact that statistically smaller improvements happen a lot more often than bigger ones - this leads to players often vastly overestimating the effectiveness of advantage.

Comparing two die rolls and looking at how much higher the second die rolled than the first one, is actually exactly the same thing as calculating the delta - as we already did earlier on - just without the cap. The first column (top to bottom) shows the first die - if that die is 20, the improvement always is 0 - you already rolled the highest possible result. The second die is shown in the top row, from left to right. If that second die is 20, then the improvement ranges from +0 to +19, depending on what the first die rolled. An improvement of +1 is 19 times as likely to happen as an improvement of +19. On average, the benefit is significant but not huge - a D20 roll with advantage is comparable to a regular D20 roll with a bonus of roughly +3. On a D12 advantage is near precisely equivalent to a +2 bonus.

rolled die1D20⁺1D12⁺1D10⁺1D8⁺1D6⁺1D4⁺
avg. improvement+3.3+2.0+1.7+1.3+1.0+0.6
+ success chance16.7%16.6%16.5%16.4%16.2%15.6%

Disadvantage looks exactly the same, just with negative numbers.

Taking a closer look at how this affects deltas, we see the following:

EquationΔ0-Δ1+Δ2+Δ3+Δ4+Δ5+Δ6+Δ7+Δ8+Δ9+
1D12⁺ - 1D1237.6%62.4%54.1%46%38.2%30.8%23.9%17.7%12.2%7.52%
1D12 - 1D12⁻37.6%62.4%54.1%46%38.2%30.8%23.9%17.7%12.2%7.52%
1D12 - 1D1254.2%45.8%38.2%31.1%25%19.4%14.6%10.4%6.94%4.17%
1D12 - 1D12⁺70.7%29.3%22.3%16.5%11.8%8.1%5.27%3.18%1.73%0.81%
1D12⁻ - 1D1270.7%29.3%22.3%16.5%11.8%8.1%5.27%3.18%1.73%0.81%

Advantage and Disadvantage 1D12 - 1D12

1D12⁺ - 1D12 is of course identical to 1D12 - 1D12⁻, as is 1D12⁻ - 1D12 to 1D12 - 1D12⁺. But, due to the different die-sizes, this is not true for the other equations, with advantage/disadvantage on the smaller die having less overall effect than on the larger one:

EquationΔ0-Δ1+Δ2+Δ3+Δ4+Δ5+Δ6+Δ7+Δ8+Δ9+
1D12⁺ - 1D1026.7%73.3%64.9%55.2%45.8%36.9%28.7%21.2%14.6%9.03%
1D12 - 1D10⁻32.1%67.9%59.6%51.3%43%35%27.4%20.4%14.2%8.83%
1D12 - 1D1045.8%54.2%45.8%37.5%30%23.3%17.5%12.5%8.33%5%
1D12 - 1D10⁺59.6%40.4%32.1%23.8%17%11.7%7.58%4.58%2.5%1.17%
1D12⁻ - 1D1064.9%35.0%26.7%19.8%14.2%9.72%6.32%3.82%2.08%0.97%

Advantage and Disadvantage 1D12 - 1D10

EquationΔ0-Δ1+Δ2+Δ3+Δ4+Δ5+Δ6+Δ7+Δ8+Δ9+
1D12⁺ - 1D817.7%82.3%75.3%67%57.3%46.2%35.9%26.5%18.2%11.3%
1D12 - 1D8⁻26.6%73.4%65.1%56.7%48.4%40.1%31.9%24.1%16.9%10.7%
1D12 - 1D837.5%62.5%54.2%45.8%37.5%29.2%21.9%15.6%10.4%6.25%
1D12 - 1D8⁺48.4%51.6%43.2%34.9%26.6%18.2%11.8%7.16%3.91%1.82%
1D12⁻ - 1D857.3%42.7%33%24.7%17.7%12.2%7.9%4.77%2.6%1.22%

Advantage and Disadvantage 1D12 - 1D8

EquationΔ0-Δ1+Δ2+Δ3+Δ4+Δ5+Δ6+Δ7+Δ8+Δ9+
1D12⁺ - 1D610.5%89.4%83.9%77%68.6%58.9%47.8%35.3%24.3%15%
1D12 - 1D6⁻21.1%78.9%70.6%62.3%53.9%45.6%37.3%28.9%20.8%13.4%
1D12 - 1D629.2%70.8%62.5%54.2%45.8%37.5%29.2%20.8%13.9%8.33%
1D12 - 1D6⁺37.3%62.7%54.4%46.1%37.7%29.4%21.1%12.7%6.94%3.24%
1D12⁻ - 1D647.8%52.2%41.1%31.4%23%16.1%10.5%6.37%3.47%1.62%

Advantage and Disadvantage 1D12 - 1D6

EquationΔ0-Δ1+Δ2+Δ3+Δ4+Δ5+Δ6+Δ7+Δ8+Δ9+
1D12⁺ - 1D45.21%94.8%90.6%85.1%78.1%69.8%60.1%49%36.5%22.6%
1D12 - 1D4⁻15.6%84.4%76.0%67.7%59.4%51%42.7%34.4%26%17.7%
1D12 - 1D420.8%79.2%70.8%62.5%54.2%45.8%37.5%29.2%20.8%12.5%
1D12 - 1D4⁺26%74%65.6%57.3%49%40.6%32.3%24%15.6%7.29%
1D12⁻ - 1D436.5%63.5%51%39.9%30.2%21.9%14.9%9.38%5.21%2.43%

Advantage and Disadvantage 1D12 - 1D4

How To Recreate These Numbers

In A Spreadsheet

I’m using LibreOffice Calc - but to my best knowledge it should work just the same in both MS Excel and Google Sheets. Start by first putting the numbers 1 to 20 in both the first column and the top row, like this:

Step 1

Into the A1 cell, enter your desired cap - I’m using 9 here:

Step 2

Then enter this formula into the cell B2: =MIN($A$1, MAX(0, B$1-$A2))

Step 3

You can then copy paste that formula across the entire table:

Step 4

To get the average delta, prepare another, quite similar table, just below:

Step 5

And this time use the formula: =AVERAGE($B$2:B2)

Step 6

To get the average delta for successes only, another table, even further below:

Step 7

But this time, use the formula: =SUM($B$2:B2)/COUNTIF($B$2:B2, ">0"). This will result in the first column getting division by zero errors - just ignore those. We are only interested in the green cells, which correspond to actual die sizes, anyway.

Step 8

To get the cumulative probabilities of deltas, we prepare another table to the right of our initial matrix. And we put the number of our desired main die in the corner (in this case we want a D20 - this can later be changed at will). 0 stands for Δ0-, 1 stands for Δ1+, 2 for Δ2+ and so on.

Step 9

Then into cell X2 (careful - not W2, we leave a gap there for now) we put the following formula: =COUNTIF($B$2:OFFSET($A2, 0, $V$1), ">=" & X$1)/($V$1 * $V2). I also had to remove the letter “D” from the first column, to make the number more easily accessible. You could strip off the D in the formula, but that would just needlessly complicate the formula. You will also have to use ‘Format Cells’ and set them to ‘Percentage’.

Step 10

In the above image, the line 4 is the equation 1D20 - 1D4, the line 6 is 1D20 - 1D6 and so on. You can just change the number in V1 to go from 1D20 to any other die size you’d like to look at.

And to get the column for Δ0- we can simply put this formula in W2: =1-X2 and then copy paste it all the way down.

Step 11

You can download the resulting sheet if you want - but if you want to really understand what’s happening there, I recommend doing it step-by-step and actually figuring out what each formula does.

When it comes to advantage and disadvantage - I never calculated those in a spreadsheet. Which brings us to the second method:

In A Scripting Language

I’m using PHP-CLI here, but should be easy enough to port these code snippets to Python or Lua or whatever language you prefer. The benefit of using a scripting language, is that you can do a lot more complicated things, than can be easily done with a spreadsheet. You could add an extra rule for critical hits and see how that affects average damage, etc.; All those things are theoretically possible with a spreadsheet as well - but if you go past a certain point of complexity, the spreadsheet might struggle to update and calculate everything and get sluggish and slow - or even crash the application. I would know - been there, done that.

With a scripting language, you can brute force your way through billions and billions of possible combinations, and with a little bit of clever caching even more. I would know - been there, done that.

The basic matrix that underlies everything, can be gotten like this:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 function baseMatrix($attacker = 20, $defender = 20, $cap = 9): array { $result = []; for ($d = 1; $d <= $defender; $d++) { $result[$d] = []; for ($a = 1; $a <= $attacker; $a++) { $result[$d][$a] = min($cap, max(0, $a - $d)); } } return $result; } $first = true; foreach (baseMatrix() as $d => $row) { if ($first) { echo ',D' . implode(',D', array_keys($row)) . PHP_EOL; $first = false; } echo 'D'.$d . ',' . implode(',', $row) . PHP_EOL; }

The bottom part just dumps the array onto STDOUT in CSV format. You can of course replace that with better looking, more fancy output methods as desired.

And this function will turn the base matrix into cumulative deltas:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 function cumulativeDeltas($attacker = 20, $defender = 20, $cap = 9): array { $result = []; foreach ([4, 6, 8, 10, 12, 20] as $die) { if ($die > $defender) break; $result[$die] = [0 => null]; $data = baseMatrix($attacker, $die, $cap); $sum = 0; $successes = 0; for ($i = 1; $i <= $cap; $i++) { $count = 0; foreach ($data as $d => $row) { foreach ($row as $a => $delta) { if ($delta >= $i) $count++; if ($i == 1) $sum += $delta; } } $result[$die][$i] = $count / (count($row) * $die); if ($i == 1) $successes = $count; } $result[$die][0] = 1 - $result[$die][1]; $result[$die]['average delta'] = $sum / (count($row) * $die); $result[$die]['average delta on success'] = $sum / $successes; } return $result; }

In the code the echos out the results, you might want to remove the ‘D’ in the top row with a ‘Δ’ - and of course use cumulativeDeltas() instead of baseMatrix().

Now we can take the baseMatrix function, and extend it to be able to deal with advantage and disadvantage as well.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 function baseMatrix(int $attacker = 20, int $defender = 20, int $cap = 9, int $advantage = 0): array { $result = []; for ($d = 1; $d <= $defender; $d++) { $result[$d] = []; for ($a1 = 1; $a1 <= $attacker; $a1++) { for ($a2 = 1; $a2 <= $attacker; $a2++) { $a = match($advantage) { -1 => min($a1, $a2), 0 => $a1, 1 => max($a1, $a2) }; $result[$d][$a1 . '.' . $a2] = min($cap, max(0, $a - $d)); } } } return $result; }

And there you have it - some simple, quick’n’dirty code that ‘calculates’ these probabilities by simply iterating through every possible option.

As with everything else on this blog, this post is CC BY 4.0 - which covers all the written explanations. The math and formulas are not copyrightable in the first place, and thus completely free to use anyways.

Read Entire Article