Wednesday, October 28, 2009

Hackmaster / Exploding Dice Analysis


Back when reviewing Hackmaster I wondered about the penetration (exploding) dice. I worried that a d4 would be better than d6 as the d4 was more likely to roll it's max value and explode than the d6. Being a programmer dude I wrote code and ran some tests.

The results of "throwing" each type of die 100,000 times.
die   avg    max
d4p 3.01 24
d6p 3.99 37
d8p 5.00 49
d12p 7.00 55
As you can see, exploding only increases the avg by about .5 and max values ramp up nicely. If you roll 100,000 times you can get some impressive max rolls. But, super high explosions are rare. Here are the details on d4, d6, and d12 (chosen cause of this) rolled "only" 12,000 times each. Results are value rolled, number of times it was rolled, % chance of rolling that value, % chance of rolling that value or higher.
d4p count chance cumulative
1 2954 24.62% 100.00%
2 3060 25.50% 75.38%
3 2991 24.93% 49.88%
4 756 6.30% 24.96%
5 796 6.63% 18.66%
6 740 6.17% 12.02%
7 177 1.47% 5.86%
8 184 1.53% 4.38%
9 181 1.51% 2.85%
10 43 0.36% 1.34%
11 43 0.36% 0.98%
12 42 0.35% 0.62%
13 11 0.09% 0.27%
14 3 0.03% 0.18%
15 10 0.08% 0.16%
16 5 0.04% 0.07%
17 not rolled
18 3 0.03% 0.03%
19 1 0.01% 0.01%
20 not rolled
21 1 0.01% -0.00%

d6p count chance cumulative
1 1951 16.26% 100.00%
2 2064 17.20% 83.74%
3 1922 16.02% 66.54%
4 1993 16.61% 50.53%
5 1992 16.60% 33.92%
6 334 2.78% 17.32%
7 347 2.89% 14.53%
8 331 2.76% 11.64%
9 370 3.08% 8.88%
10 322 2.68% 5.80%
11 60 0.50% 3.12%
12 68 0.57% 2.62%
13 43 0.36% 2.05%
14 75 0.62% 1.69%
15 64 0.53% 1.07%
16 7 0.06% 0.53%
17 11 0.09% 0.48%
18 9 0.07% 0.38%
19 12 0.10% 0.31%
20 16 0.13% 0.21%
21 not rolled
22 not rolled
23 4 0.03% 0.08%
24 2 0.02% 0.04%
25 1 0.01% 0.03%
26 not rolled
27 not rolled
28 2 0.02% 0.02%
29 1 0.01% 0.00%

d12p count chance cumulative
1 968 8.07% 100.00%
2 978 8.15% 91.93%
3 991 8.26% 83.78%
4 1004 8.37% 75.53%
5 987 8.22% 67.16%
6 996 8.30% 58.93%
7 980 8.17% 50.63%
8 982 8.18% 42.47%
9 1006 8.38% 34.28%
10 1025 8.54% 25.90%
11 1057 8.81% 17.36%
12 87 0.73% 8.55%
13 78 0.65% 7.83%
14 74 0.62% 7.18%
15 80 0.67% 6.56%
16 88 0.73% 5.89%
17 99 0.83% 5.16%
18 82 0.68% 4.33%
19 93 0.78% 3.65%
20 95 0.79% 2.87%
21 83 0.69% 2.08%
22 84 0.70% 1.39%
23 6 0.05% 0.69%
24 8 0.07% 0.64%
25 7 0.06% 0.57%
26 5 0.04% 0.52%
27 10 0.08% 0.47%
28 7 0.06% 0.39%
29 8 0.07% 0.33%
30 5 0.04% 0.27%
31 8 0.07% 0.22%
32 7 0.06% 0.16%
33 5 0.04% 0.10%
34 not rolled
35 3 0.03% 0.06%
36 not rolled
37 2 0.02% 0.03%
38 not rolled
39 not rolled
40 not rolled
41 not rolled
42 not rolled
43 not rolled
44 1 0.01% 0.02%
45 not rolled
46 not rolled
47 1 0.01% 0.01%
48 not rolled
49 1 0.01% -0.00%
5% chance for 17+ damage is a little high (2d12 avg=13). Seems not too out of whack for "critical hit" system. Still might change 2-hand damage to d10p.

In my Post on Weapon Damage a comment was made that exploding dice combined with my house rule, pure fighters get to roll damage twice and take the higher result, is too much of a damage escalation. An unmentioned tweak is fighters get to take the higher of the initial non-exploded roll, they don't roll exploded dice twice. Mostly cause I don't want to deal with insane amount of dice rolling / tracking.

So, modifying my program... Here are 2d10 and 2d12 rolled 12000 times, highest initial roll taken, and then exploded as appropriate.
d10p count chance cumulative
1 131 1.09% 100.00%
2 351 2.93% 98.91%
3 565 4.71% 95.98%
4 867 7.22% 91.28%
5 1082 9.02% 84.05%
6 1278 10.65% 75.03%
7 1600 13.33% 64.38%
8 1763 14.69% 51.05%
9 2072 17.27% 36.36%
10 232 1.93% 19.09%
11 241 2.01% 17.16%
12 233 1.94% 15.15%
13 218 1.82% 13.21%
14 213 1.77% 11.39%
15 243 2.02% 9.62%
16 226 1.88% 7.59%
17 207 1.73% 5.71%
18 234 1.95% 3.98%
19 26 0.22% 2.03%
20 23 0.19% 1.82%
21 24 0.20% 1.63%
22 13 0.11% 1.43%
23 28 0.23% 1.32%
24 27 0.22% 1.08%
25 33 0.27% 0.86%
26 19 0.16% 0.58%
27 23 0.19% 0.43%
28 5 0.04% 0.23%
29 2 0.02% 0.19%
30 1 0.01% 0.18%
31 6 0.05% 0.17%
32 2 0.02% 0.12%
33 3 0.03% 0.10%
34 2 0.02% 0.08%
35 1 0.01% 0.06%
36 7 0.06% 0.05%

d12p count chance cumulative
1 83 0.69% 100.00%
2 227 1.89% 99.31%
3 416 3.47% 97.42%
4 573 4.78% 93.95%
5 767 6.39% 89.17%
6 885 7.38% 82.78%
7 1067 8.89% 75.41%
8 1291 10.76% 66.52%
9 1366 11.38% 55.76%
10 1590 13.25% 44.38%
11 1813 15.11% 31.12%
12 148 1.23% 16.02%
13 149 1.24% 14.78%
14 182 1.52% 13.54%
15 163 1.36% 12.02%
16 141 1.18% 10.67%
17 159 1.32% 9.49%
18 153 1.27% 8.17%
19 181 1.51% 6.89%
20 154 1.28% 5.38%
21 148 1.23% 4.10%
22 182 1.52% 2.87%
23 13 0.11% 1.35%
24 13 0.11% 1.24%
25 20 0.17% 1.13%
26 14 0.12% 0.97%
27 11 0.09% 0.85%
28 19 0.16% 0.76%
29 7 0.06% 0.60%
30 10 0.08% 0.54%
31 10 0.08% 0.46%
32 18 0.15% 0.37%
33 19 0.16% 0.22%
34 1 0.01% 0.07%
35 1 0.01% 0.06%
36 1 0.01% 0.05%
37 not rolled
38 not rolled
39 not rolled
40 2 0.02% 0.04%
41 1 0.01% 0.02%
42 2 0.02% 0.02%
43 1 0.01% -0.00%
Chance of exploding is 2x normal what I'd expected. Did not realize "rolling twice taking best" would produce such high results. 55% chance of 9 or higher on d12.


For completeness here's d6p as rolled by fighter.
d6p  count chance cumulative
1 328 2.73% 100.00%
2 1016 8.47% 97.27%
3 1727 14.39% 88.80%
4 2322 19.35% 74.41%
5 2937 24.47% 55.06%
6 620 5.17% 30.58%
7 589 4.91% 25.42%
8 580 4.83% 20.51%
9 632 5.27% 15.68%
10 612 5.10% 10.41%
11 104 0.87% 5.31%
12 101 0.84% 4.44%
13 104 0.87% 3.60%
14 107 0.89% 2.73%
15 102 0.85% 1.84%
16 18 0.15% 0.99%
17 21 0.18% 0.84%
18 18 0.15% 0.67%
19 23 0.19% 0.52%
20 22 0.18% 0.33%
21 1 0.01% 0.14%
22 3 0.03% 0.13%
23 2 0.02% 0.11%
24 2 0.02% 0.09%
25 5 0.04% 0.08%
26 not rolled
27 not rolled
28 not rolled
29 1 0.01% 0.03%
30 1 0.01% 0.03%
31 1 0.01% 0.02%
32 not rolled
33 not rolled
34 not rolled
35 2 0.02% 0.01%

12 comments:

  1. With fighters re-rolling damage I stick that to specialization with a weapon. When combined with repeating dice, I count them as getting two rolls, not two rolls per "explosion".

    So if I roll 2d8, and get an 8 and a 4, I choose the 8 and roll it out (one die)

    If I roll double 8's, then I keep going with 2 more d8's until one of them (or both) stop exploding and pick the higher number.

    ReplyDelete
  2. That is some hardcore math. One of the reasons I like Hackmaster, and likewise one of the reasons I'd not want to play it (or at least, run it - maybe I'd play it with a good GM).

    ReplyDelete
  3. I have a question, and I am sure this comes out of ignorance of how Hackmaster's exploding dice work on my part, how do you get any result of 4 on a 1d4 (or 6 on a 1d6 etc.)? If I am understanding it correctly, if you roll a 4 you roll again and add the second die in. So your set of possible numbers would be {1,2,3,5...}.

    Initially I thought that your program was counting the die roll of 4 and then also counting the final tally after the reroll. But when I added up your numbers I got 100.2%, which is clearly within the rounding error introduced by having only 2 decimal places.

    The only way I could see for those results to be possible would be for the secod die roll to be a 1d4-1 that allows for a 0 result. This would allow for the results you got. I have only played the game once at GenCon along with a million other demos so I have no idea if that is true.

    As an engineer I would find the idea of rolling 1d4-1 on the second die pretty satisfying because it keeps there from being a gap in the original die's range. However this kind of thought is not something you see often in an RPG's mechanics. The trade off is that for many people this will mechanically be a pain in the butt. Is it possible that Kenzer and Co. is actually filled with non-English majors?

    ReplyDelete
  4. @mckee78
    Be satisfied! Hackmaster penetrating die is indeed dX-1. d4p possible values are 1,2,3,4,5,...

    The program is doing actual rolls with pseuudorandom generator so numbers won't always add up exactly.


    @zzarchov
    Interesting alternative.

    ReplyDelete
  5. The d4, then d4-1 used to be the mechanic for grevious wounds in hackmaster as I recall, don't know about currently.

    ReplyDelete
  6. That's really cool. I have been thinking about grabbing this. I will have to now

    ReplyDelete
  7. Man, that's some in-depth analysis!

    Thanks for sharing!

    ReplyDelete
  8. > Man, that's some in-depth analysis!

    Ah, actually that was just a quick knock-off. Was curious about effect of shield/armor/weapon and how it seemed it was foolish to ever use two-handed weapon over sword and board. So, I made a HackMaster Basic Combat simulator. The summary output of a couple matchups is below. Detailed output is more... I'm not too much of a nerd am I?


    Fight Silent
    The Dude(33) in scalemail with longsword and medium shield
    vs
    Hammertime(33) in scalemail with warhammer and medium shield

    The Dude 598(59.8%) wins(48.7% by death, 51.3% by ko), killed 173 and ko'd 229 times. hit/miss: 2725/2331 (53.9%), 231/48hp crits/max, 202/277 a/d fumbles, 270/215 p/n defences, 229/0/60 k/r/l

    Hammertime 402(40.2%) wins(43.0% by death, 57.0% by ko), killed 291 and ko'd 307 times. hit/miss: 2912/2660 (52.3%), 262/39hp crits/max, 267/251 a/d fumbles, 241/213 p/n defences, 308/0/60 k/r/l



    Fight Silent
    The Dude(33) in scalemail with longsword and medium shield
    vs
    Compensator(33) in scalemail with two-handsword and no shield

    The Dude 540(54.0%) wins(46.7% by death, 53.3% by ko), killed 146 and ko'd 314 times. hit/miss: 2824/386 (88.0%), 159/44hp crits/max, 74/109 a/d fumbles, 105/80 p/n defences, 318/0/60 k/r/l

    Compensator 460(46.0%) wins(31.7% by death, 68.3% by ko), killed 252 and ko'd 288 times. hit/miss: 1196/994 (54.6%), 109/68hp crits/max, 89/164 a/d fumbles, 82/57 p/n defences, 290/0/60 k/r/l

    ReplyDelete
  9. I've been looking for information on the math of exploding dice from Hackmaster and this post was very informative, thanks! I have a question about the math for exploding versus penetrating dice, which was mentioned in an above comment.

    I understand the desire for a flatter range of damage values (the d4-1 penetrating) and I would assume that without that, the change in average damage from using exploding dice increases from 0.5 to 1.5.

    Given bonuses from classes, feats, ability scores, and whathaveyou, the "missing" numbers from the range of potential damage results seems... "trifling?" I realize that means without the -1 you would never actually deal 6 damage from rolling a d6, but is that really worth the conflation of addition and subtraction when determining damage?

    Thanks!
    --Dither

    ReplyDelete
    Replies
    1. @dither I don't think it's worth it / never bother having players subtract 1 from exploded dice in *my houserules*. But, HackMaster / Kenzer & Co are sticklers for accuracy and what they think of as "realism". So, running HM I do the -1.

      btw the average increases by much less than 1. 'p'enetration dice are math correct (subtract 1), 'x'ploding dice don't subtract 1

      d4p 3.00 27
      d6p 3.99 25
      d8p 5.05 35
      d12p 6.97 55
      d20p 10.68 38
      d100p 50.10 135

      d4x 3.34 30
      d6x 4.18 35
      d8x 5.15 36
      d12x 7.07 55
      d20x 11.14 72
      d100x 51.32 243

      Delete
  10. The closed formula for the average roll on an n-sided exploding die is n/(n-1) + n/2. I reduced the problem to an infinite series and then put the series into Wolfram Alpha. This assumes of course that n>1.

    ReplyDelete
  11. The average roll for an exploding n-sided die (with n>1) is n/(n-1) + n/2. I reduced the problem to an infinite series and reduced it using Wolfram Alpha.

    ReplyDelete

All Time Most Popular Posts