PDA

View Full Version : Optimization Comprehensive DPR Calculator



LudicSavant
2017-03-04, 01:14 PM
Edit: Mathematician AureusFulgens and I have updated the sheet to v2.0, with additional features! Please use the new version, HERE (http://www.giantitp.com/forums/showthread.php?582779-Comprehensive-DPR-Calculator-(v2-0))

https://s8.postimg.cc/p1hv6fntx/DPRCalculator.png (http://www.giantitp.com/forums/showthread.php?582779-Comprehensive-DPR-Calculator-(v2-0))
An example of what you can do with this sheet.

I have created a DPR calculator. It factors in a a wide variety of things that many DPR formulas posted here do not, such as advantage/disadvantage, great weapon fighting, elemental adept, riders, DoTs, rounding effects, critical hit chance / damage, when you should power attack (such as with Heavy Weapon Master or Sharpshooter), and so forth. It also will produce a chart showing DPR against enemies of every AC value. Two sheets are currently included; one for attack rolls, and one for saving throw effects.

Just make a copy, enter your basic information like attack bonus and damage dice, and get all the information you want printed out.

Please let me know if you find this useful, if there is anything even slightly inaccurate, or if there is additional functionality you would like to see provided.

-Ludic

Edit: Mathematician AureusFulgens and I have updated the sheet to v2.0, with additional features! Please use the new version, HERE (http://www.giantitp.com/forums/showthread.php?582779-Comprehensive-DPR-Calculator-(v2-0))

Level2intern
2017-03-04, 01:28 PM
Sweet! Nice job

LudicSavant
2017-03-06, 11:54 PM
Also, since I'm sure some will find this useful, here's some formulas for things!

Legend:
Hit% = normal chance to hit (no advantage/disadvantage)
Crit% = normal chance to crit (no advantage/disadvantage)
Save% = normal chance to fail a save
DPR = Damage Per Round
DPH = average damage on hit
DPC = average damage on crit
#attacks = number of attacks
AC = Armor Class
AB = Attack Bonus
DS = Die Size

Formulas:
- Hit% (Normal) = (21-AC+AB)/20, Min 0.05 Max 0.95
- Hit% (Advantage) = Hit% + (1-Hit%)*Hit%
- Hit% (Disadvantage) = Hit%^2

- DPR (attacks) = ((Hit%-Crit%)*DPH + Crit%*DPC )*#attacks. This formula can be repeated and added together for multiple types of attacks. This formula works for advantage and disadvantage as well; just replace Hit% with advantage or disadvantage Hit%, and Crit% with advantage or disadvantage Crit%. The chance to hit of Sneak Attack (and similar riders) is your chance of at least one hit (see below).
- DPR (save for half effects) = ((1-Save%)*(DPH/2-0.25)+Save%*DPH)*#Attacks. As the previous DPR formula, this also works for advantage and disadvantage (just replacing Save% with Advantage Save% or Disadvantage Save%).
- DPR (save negates effects) = (Save%*DPH)*#Attacks. As the previous DPR formula, this also works for advantage and disadvantage (just replacing Save% with Advantage Save% or Disadvantage Save%).

- Crit% (Advantage) = Crit% + (1-Crit%)*Crit%. So, for a typical 5% base crit chance, you have a 9.75% chance to crit with advantage.
- Crit% (Disadvantage) = Crit%^2. So, for a typical 5% base crit chance, you have a 0.25% chance to crit with disadvantage.

- Save% = 1-(21-DC+SB)/20
- Save% (Advantage) = 1-(Save%+(1-Save%)*Save%)
- Save% (Disadvantage) = 1-(Save%^2)

- Chance of at least one crit = 1-(1-crit%)^#attacks.
- Chance of at least one crit (advantage) = 1-(1-crit%)^(#attacks*2)
- Chance of at least one crit (disdadvantage) = 1-(1-crit%^2)^(#attacks)

- Chance of at least one hit = 1-(1-hit%)^#attacks
- Chance of at least one hit (advantage) = 1-(1-hit%)^(#attacks*2)
- Chance of at least one hit (disadvantage) = 1-(1-hit%^2)^(#attacks)

- Damage Dice Averages (any type) = Add each possible result, then divide by the number of possible results. So, for example, a normal d6 would be (1+2+3+4+5+6)/6 (3.5). A Great Weapon Fighting d6 would be (3.5+3.5+3+4+5+6)/6 (4.16 repeating).
- Extra damage (Great Weapon Fighting) = (DS/2-1)/(DS/2) per die rolled. So, for example, GWF style adds 2/3 to the average damage of every d6, 3/4 to every d8, 4/5 to every d10, etc.
- Extra Damage (Elemental Adept) = 1/DS per die rolled. So, for example, a d6 adds 1/6, a d8 adds 1/8, etc.

- Dividing Damage by 2 (such as for resistance, or save for half, etc) = (Full damage)/2 - 0.25.
NOTE: This is one that a lot of people get wrong when calculating DPR, because it's not just your normal damage divided by two, thanks to the fact that D&D rounds down when dividing. Ergo, the average of 1d6/2 isn't 1.75 (3.5/2). Instead, it's (0+1+1+2+2+3)/6 = 1.5. In fact, this pattern holds true for all combinations of dice, since half of all die results will be rounded down by 0.5. Half of 0.5 averages out to 0.25, so we subtract that from the average.

- Average number of rounds for one successful save (for "save every round" effects) = 1/save%. Proof: http://www.cut-the-knot.org/Probability/LengthToFirstSuccess.shtml . Note that this only applies if there is no maximum duration limit, such as in the case of, say, Sword of Wounding. The average number of rounds for one successful save is slightly lower for effects with a lower maximum duration.

Dice Average Improvements:
Normal: d4 = 2.5, d6 = 3.5, d8= 4.5, d10=5.5, d12=6.5
Great Weapon Fighting: d4 = 3 (+20%), d6 = 4.16 repeating (+19%), d8 = 5.25 (+16.7%), d10 = 6.3 (+14.5%), d12 = 7.3 repeating (+12.8%)
Elemental Adept: d4 = 2.75 (+10%), d6= 3.6 repeating (+4.8%), d8 = 4.625 (+2.8%), d10 = 5.6 (+1.8%), d12 = 6.583 repeating (+1.3%)

joaber
2017-03-07, 11:16 AM
just great, thanks!

Foxhound438
2017-03-07, 12:58 PM
Sweet. I think the only thing you left out is colossus slayer/divine strike, which work similar to sneak attack but use d8's.

LudicSavant
2017-03-07, 08:12 PM
Sweet. I think the only thing you left out is colossus slayer/divine strike, which work similar to sneak attack but use d8's.

The Sneak Attack section also works for Colossus Slayer and Divine Strike.

If it works the same as sneak attack, you can just enter it in the sneak attack field (Just enter "d8" instead of "d6"). That said, I could add the option to input more than one variable of that type.

bid
2017-03-08, 12:03 AM
That's pretty neat.

The only thing missing is the bonus attack, no?
TWF, PAM, GWM, war magic, et al.

LudicSavant
2017-03-08, 01:17 AM
That's pretty neat.

The only thing missing is the bonus attack, no?
TWF, PAM, GWM, war magic, et al.

You can currently calculate dissimilar types of attacks and effects used during a round separately and add them together, of course.

My first draft of the sheet actually let you do it all at once, but I was afraid it made the interface look too crowded. Maybe I'll add it as a third "multisource calculator" sheet.

Markoff Chainey
2017-03-08, 03:47 AM
That's pretty neat.

The only thing missing is the bonus attack, no?
TWF, PAM, GWM, war magic, et al.

I also think its sweet, but honestly do not see what it might be useful for.

The only thing I would use this sheet for, is to test and calculate house rules and home brew classes. - For those use cases, bonus attack, TWF, PAM and the other fiddly stuff are actually mandatory, because those things are hard to calculate and to compare.

tomato
2017-03-08, 09:30 AM
It does add in GWF calculations, and bonus action attacks (such as those gained from TWF and elsewhere) can be factored in with this calculator by simply increasing the quantity of attacks. It's a great tool, honestly. Good job OP.

LudicSavant
2017-03-08, 09:39 AM
For those use cases, bonus attack, TWF, PAM and the other fiddly stuff are actually mandatory

Actually, it can calculate those things already.

One of the very few things it doesn't calculate, however, is Bless / Inspiration type effects that add a die to your to-hit bonus. I'm not actually sure what the formula is for these things, including advantage and disadvantage (no, Bless is not mathematically equivalent to a +2.5 to-hit). If anyone knows it, I'll add it.

Another thing it doesn't cover is Empower Spell. I already know how to derive the formula for Empowered Spells when Charisma >= the number of dice rolled. However, I'm not sure what the formula is when the number of dice rolled is greater than your charisma modifier.

bid
2017-03-08, 10:38 AM
One of the very few things it doesn't calculate, however, is Bless / Inspiration type effects that add a die to your to-hit bonus. I'm not actually sure what the formula is for these things, including advantage and disadvantage (no, Bless is not mathematically equivalent to a +2.5 to-hit). If anyone knows it, I'll add it.
I'm not sure why it's not. Is that because the naive algorithm would roll it twice for adv/disadv?

You could always apply it as a reduction to AC/DC.

LudicSavant
2017-03-08, 01:11 PM
I'm not sure why it's not. Is that because the naive algorithm would roll it twice for adv/disadv?

Very simple example of why it's different:

Enemy has AC 26.
Case A: Attack bonus 3 + 2.5: You hit only on a 20. Your chance to hit is 5%.
Case B: Attack bonus 3 + Bless: You hit on 25% of your 19s (4s on Bless), and on 20s. Your chance to hit is 6.25%.

Here's another example:

Enemy has AC 11
Case A: Attack bonus 7 + 2.5: You miss only on a 1. Your chance to hit is 95%.
Case B: Attack bonus is 7 + Bless: You miss on a 1 or 25% of your 2s (1s on Bless). Your hit chance is 93.75%.

bid
2017-03-08, 06:17 PM
Enemy has AC 11
Case A: Attack bonus 7 + 2.5: You miss only on a 1. Your chance to hit is 95%.
Case B: Attack bonus is 7 + Bless: You miss on a 1 or 25% of your 2s (1s on Bless). Your hit chance is 93.75%.
Ah, true.

So the only way is to add up the 4 AC. AC20 + bless = (AC16 + AC17 + AC18 + AC19)/4

Kornaki
2017-03-08, 06:36 PM
Yes the right way to do the calculation is to just calculate the probability of every sum of die roll. So for d20+d4, instead of 1-20 all having equal probabilities, 2 has probability 1/80 (the d20 and d4 both have to show up on 1, out of 80 possible combinations of rolls), 3 has probability 2/80 since you can roll a 1 and a 2 or a 2 and a 1, 4 has 3/80, 5 has 4/80, 6 has 4/80, and then everything is 4/80 until you reach 21 which has 4/80, then 22 is 3/80, 23 is 2/80, 24 is 1/80 again, and then you can calculate the hit chance from these probabilities.

LudicSavant
2017-03-08, 06:57 PM
Yes the right way to do the calculation is to just calculate the probability of every sum of die roll. So for d20+d4, instead of 1-20 all having equal probabilities, 2 has probability 1/80 (the d20 and d4 both have to show up on 1, out of 80 possible combinations of rolls), 3 has probability 2/80 since you can roll a 1 and a 2 or a 2 and a 1, 4 has 3/80, 5 has 4/80, 6 has 4/80, and then everything is 4/80 until you reach 21 which has 4/80, then 22 is 3/80, 23 is 2/80, 24 is 1/80 again, and then you can calculate the hit chance from these probabilities.

Alright. Can you translate this into a concise, generalized formula which can be punched into a spreadsheet cell and plays nice with all other mechanics?

For example, you should be able to have Bless and Inspiration at the same time.

I've worked out how to do it for Bless alone (not Bless and Inspiration simultaneously) and am adding it to the sheet now.

Edit: BLESS function added to sheet!

bid
2017-03-08, 10:23 PM
Edit: BLESS function added to sheet!
Simpler bless:

Move your headers higher
Make I124 to I127 "=I128"
Make an intermediary cell P128=if(bless,SUM(I124:I127)/4,I128)
Modify your Y128 to use P128 instead of I128

Do the same for K -> R -> AB and M -> T -> AD. This way your adv/disadv are also adjusted.



For bard inspiration, you'll need another set of intermediary value. But you cannot hard-code range P124:P127 and must build it with ADDRESS(ROW()-bard_die, COLUMN()-7) & ":" & p127 or something like that. Instead of 4 I124...I127, you'll need 12 P114...P127. You'll have 4 sets of value, flowing from one to the other:
hit(col I) -> blessed hit(col P) -> BI hit(col BA I guess) -> normal DPR(col Y)



EDIT: heck, you have the space above, no need to add rows...

LudicSavant
2017-03-08, 11:03 PM
Simpler bless:

Move your headers higher
Make I124 to I127 "=I128"
Make an intermediary cell P128=if(bless,SUM(I124:I127)/4,I128)
Modify your Y128 to use P128 instead of I128

Do the same for K -> R -> AB and M -> T -> AD. This way your adv/disadv are also adjusted.



For bard inspiration, you'll need another set of intermediary value. But you cannot hard-code range P124:P127 and must build it with ADDRESS(ROW()-bard_die, COLUMN()-7) & ":" & p127 or something like that. Instead of 4 I124...I127, you'll need 12 P114...P127. You'll have 4 sets of value, flowing from one to the other:
hit(col I) -> blessed hit(col P) -> BI hit(col BA I guess) -> normal DPR(col Y)



EDIT: heck, you have the space above, no need to add rows...

I'm not sure I follow your suggestion. What would the formula for doing inspiration and bless simultaneously be?

LudicSavant
2017-03-09, 11:33 AM
Added a function for the Heavy Weapon Master bonus attack that triggers on critical hits.

joaber
2017-03-09, 02:10 PM
I see you add bless function.

bardic inspiration and precision strike is the same function? In those case you could add more than one.

for hex and hunter's mark I need to use the "damage" field and put the weapon in "Additional Damage Dice", right?

bid
2017-03-09, 08:03 PM
I'm not sure I follow your suggestion. What would the formula for doing inspiration and bless simultaneously be?
Separate steps

I is hit
P is hit, adding bless to I if active { =if(bless,SUM(I124:I127)/4,I128) }
BA is hit, adding BI to P if active { =if(bard_inspiration=6,SUM(P122:P127)/6,P128) }
Y is DPR. { =BA128 * ... }
So BA has both bless and bard's, since it builds over the other.

Now, the only tricky bit here is SUM(I124:I127)/4...
- if you base hit is 75%, it becomes (.95 + .90 + .85 + .80)/4 {that's row 132 I think}
- if you base hit is 80%, it becomes ("hit" + .95 + .90 + .85)/4 because of the header, you'd want a .95 there to use the same formula...
So you want 4 rows with .95 above I128, because adjusting the top rows formula is a pain.

I124 = .95
I125 = .95
I126 = .95
I127 = .95
I128 = .95 P128 = .95
I129 = .90 P129 = .90 without bless, .95 with it
I130 = .85 P130 = .85 without bless, .9375 with it
...

Now you have to repeat the same idea for bard's, to make SUM(P122:P127)/6 return .95, but you get the picture.

LudicSavant
2017-03-09, 08:13 PM
for hex and hunter's mark I need to use the "damage" field and put the weapon in "Additional Damage Dice", right?

Between the "additional damage dice" and "damage" field you can enter any combination of damage dice from any number of sources (e.g. Xd4+Xd6+Xd8+Xd10+Xd12+Mod can cover any combination of damage dice). The order you enter the abilities doesn't matter, just the total damage dice.

joaber
2017-03-09, 08:25 PM
Between the "additional damage dice" and "damage" field you can enter any combination of damage dice from any number of sources (e.g. Xd4+Xd6+Xd8+Xd10+Xd12+Mod can cover any combination of damage dice).

yeah, I see that now, just me being stupid, lol.

great tool, I was checking some DPR for all day long of some classes.
Funny how a sorlock with EB and Hex quicking EB every turn is dangerous (and boring).

Specter
2017-03-09, 08:45 PM
Nice work, man.

Also keep up that gods series you're working on, solid stuff.

LudicSavant
2017-03-13, 02:39 PM
Planning to add the following functions (e.g. I know how to do it, I just have to do the work):
- Multiple sources of Bless / Inspiration / Precision Attack type bonuses (rather than just Bless).
- Multiple sources of Sneak-Attack-like damage (rather than just one).
- Designating an attack as a bonus action (so that you lose it if Heavy Weapon Master's Crit Rider triggers).

Stuff I could still add:
- Formula for Empowered Spell when dice rolled > Cha mod.
- Formula for DoTs with limited durations.
- Formula for the Lucky trait of halflings (including advantage/disadvantage).

Any help on those would be welcome.

Nobear
2017-09-21, 12:21 AM
Hello all,

First off, great DPR calculator so far, LudicSavant. Now a bit of background.

It's my first time posting here. My weekly board game group of five players just took it up a notch and started D&D (5e). I've been introduced to previous editions of D&D before, but never had a group stick together socially long enough to get past level 2 lol. None of the others have played D&D before, including our DM. We are starting with the Starter Set, but the DM and I have both become inspired to read the PH, MM, and parts of the DMG. I've become particularly interested in applying math to help optimize myself and my party members (if they choose; I realize it's a roleplaying game first). I'm playing a halfling rogue, and we also have a dwarf fighter, a human cleric, and an elf wizard.

Right now, I'm using this DPR calculator to understand what % of my damage as a rogue comes from my main/offhand weapons, Dex mod (+4 atm), having advantage, and sneak attack. One request I have is to allow separate entries for multiple attacks, e.g. to run the numbers with a short sword in the main hand and a dagger in the offhand.

I also believe I found an error in the sneak attack calculation. Sneak attack's hit chance makes sense to me, but its crit chance does not. When in doubt, I break down the various possibilities into exhaustive and mutually exclusive events, with their respective probabilities. So what events could cause sneak attack to crit with two attacks?

Case 1: If the first attack crits, the second attack could do anything (crit/hit/miss: combined probability of 1), and sneak attack still crits. Multiplying the probabilities for both weapon attacks, sneak attack has a crit% * 1 = crit% chance to crit this way. But that's not the only way sneak attack could crit.

Case 2: If the first attack misses, and the second attack crits, sneak attack will likewise crit. Multiplying the probabilities for both weapon attacks, sneak attack has a (1 - hit%) * crit% chance to crit this way.

These two cases are the exhaustive and mutually exclusive ways for sneak attack to crit, as far as I can tell, so sneak attack's chance to crit is their sum: crit% + (1 - hit%) * crit%.

For example, if my lvl 1 rogue has a +6 attack bonus to both main and offhand weapons, and is attacking an enemy with 17 AC, resulting in a 50% hit chance, his sneak attack's chance to crit is .05 + (1 - .5) * .05 = .075. I like to balance my decisions on relatively well-armored enemies for my level, so assuming a 50% hit chance seems reasonable, even if it will often be higher. Under this assumption, you can see that two-weapon fighting increases both sneak attack's hit and crit chance by 50%.

Kane0
2017-09-21, 12:49 AM
Sweet, gonna need this soon. Good work mate!

Edit: Not sure if this has been answered, but is additional damage dice applied per hit? Is there an option to apply a once-per-round bonus to damage?

Nobear
2017-09-21, 05:36 AM
Sweet, gonna need this soon. Good work mate!

Edit: Not sure if this has been answered, but is additional damage dice applied per hit? Is there an option to apply a once-per-round bonus to damage?

The Additional Damage Dice section is applied per hit. What kind of once-per-round damage bonus are you thinking of?

Kane0
2017-09-21, 06:07 AM
Sneak attack is one example, but also magic items and custom stuff. Maybe savage attacker and stuff could be included too?

Nobear
2017-09-21, 06:20 AM
Above, based on two attacks (two-weapon fighting), I derived a formula for sneak attack's crit chance. To generalize this formula to any number of attacks, let's look for a pattern. With a hypothetical three attacks, we have three ways for sneak attack to crit.

Case 1: If attack 1 crits, attacks 2 and 3 could do anything and sneak attack still crits, so sneak attack has a crit% * 1 * 1 = crit% chance to crit this way.

Case 2: If attack 1 misses and attack 2 crits, attack 3 could do anything and sneak attack still crits, so sneak attack has a (1 - hit%) * crit% * 1 = crit% * (1 - hit%) chance to crit this way.

Case 3: If attacks 1 and 2 miss and attack 3 crits, sneak attack crits, so sneak attack has a (1 - hit%)2 * crit% chance to crit this way.

Adding these three mutually exclusive and exhaustive ways for sneak attack to crit, sneak attack's crit chance with a hypothetical three attacks is: crit% + crit% * (1 - hit%) + crit% * (1 - hit%)2.

Recall and compare sneak attack's crit chance for 1, 2, and 3 attacks.
1 attack: crit%
2 attacks: crit% + crit% * (1 - hit%)
3 attacks: crit% + crit% * (1 - hit%) + crit% * (1 - hit%)2

This pattern can be concisely expressed in the following summation formula:
Sneak Attack crit chance = SUM (n = 1 to #attacks) crit% * (1 - hit%)n - 1

Nobear
2017-09-21, 07:02 AM
Sneak attack is one example, but also magic items and custom stuff. Maybe savage attacker and stuff could be included too?

Scroll down in the calculator. Sneak Attack is included. But if you read my posts just above and below yours, I think Sneak Attack's calculation is a bit off because it assumes Sneak Attack's crit chance is just your base crit chance, and I derived a summation formula for Sneak Attack's true crit chance. Can anyone confirm or refute my logic and math?

You could tweak your own copy of the calculator by choosing View > Show formulas, but it'd be better to have the master updated ofc. Sneak Attack's DPR calculations are hidden way down in row 108, just below this warning: "Don't touch any of this stuff or the universe will explode (or at least produce incorrect math)." lol I think it needs to be touched. It's currently taking crit chance inputs from row 18. It needs to instead take them from a new row that calculates the crit chance of effectively 1x/round* hit riders like Sneak Attack.

*I know Sneak Attack is technically 1x/turn, but I understand these DPR calculations don't factor in possible second uses per round by taking an opportunity attack on someone else's turn. You probably wouldn't be able to pull that off reliably, although it might be fun to try!

Nobear
2017-09-21, 11:07 AM
Sneak attack is one example, but also magic items and custom stuff. Maybe savage attacker and stuff could be included too?

Which magic items?

Savage Attacker looks interesting. I'm a relatively new player and I haven't played with feats yet, but I've been reading up like crazy and I like math lol.

Ok, you inspired me to hunt down the solution to Savage Attacker. I noticed it's basically Advantage, except for damage instead of attack rolls. But in this DPR calculator so far, whether Advantage is used to determine hit or crit chance, for attacks or saves, you are asking the same basic question: What's the chance that the better of two rolls is this number or higher? For Savage Attacker, we want to answer a fundamentally different question: What's the average value of a roll made with Advantage?

I don't have 10 posts yet, so I can't post a link, but I found a great explanation by someone who went about answering that question. He ultimately derived the latter two of these formulas, which work with any die of size dx:

The average of a normal roll is (x+1)/2.
The average roll with Advantage is (4x-1)(x+1)/6x.
The average roll with Disadvantage is (2x+1)(x+1)/6x.

He concluded that Advantage/Disadvantage add/subtract 33.3...% to your average roll, but this would be with an infinitely-sided die. The actual difference is given here:

Advantage multiplies your average roll by (4x-1)/3x
Disadvantage multiplies your average roll by (2x+1)/3x

These approach 4/3 and 2/3, respectively, as x approaches infinity. Advantage with a d20 actually multiplies your average roll by (4*20-1)/(3*20) = 79/60 = 1.316..., which is the same as adding 31.6...%. Since the normal average d20 roll is (20+1)/2 = 10.5, Advantage brings that average up to 10.5*1.316... = 13.825, an increase of 3.325. But Advantage doesn't affect the minimum or maximum, only the shape of the curve as you see on the DPR calculator, so it's not directly comparable to an attack/skill/save bonus.

On the other hand, Savage Attacker uses the Advantage mechanic to boost your average damage (DPH and DPC, not including your ability mod). So let's get some specific numbers for various damage dies.

1d4 w/o Savage: (4+1)/2 = 2.5 DPH
w/Savage: (4*4-1)(4+1)/(6*4) = 15*5/24 = 3.125 DPH (+.625 DPH, a 25% increase)

1d6 w/o Savage: (6+1)/2 = 3.5 DPH
w/Savage: (4*6-1)(6+1)/(6*6) = 23*7/36 = 4.472... DPH (+.972... DPH, a 27.7...% increase)

1d8 w/o Savage: (8+1)/2 = 4.5 DPH
w/Savage: (4*8-1)(8+1)/(6*8) = 31*9/48 = 5.8125 DPH (+1.3125 DPH, a 29.16...% increase)

1d10 w/o Savage: (10+1)/2 = 5.5 DPH
w/Savage: (4*10-1)(10+1)/(6*10) = 39*11/60 = 7.15 DPH (+1.65 DPH, a 30% increase)

1d12 w/o Savage: (12+1)/2 = 6.5 DPH
w/Savage: (4*12-1)(12+1)/(6*12) = 47*13/72 = 8.4861... DPH (+1.986.1... DPH, a 30.5...% increase)

Nobear
2017-09-21, 11:47 AM
Compare Savage Attacker to Great Weapon Fighting. GWF favors small damage dice, adding 20% to a d4 but only 12.8% to a d12. This exaggerates the natural advantage of a 2d6 weapon over a 1d12 weapon. Savage Attacker adds 25% to a d4 and 30.5...% to a d12. Savage would make more of a difference than GWF on any weapon, but one is a feat and the other is a class feature.

Interestingly, a 2d6 weapon would still do more DPH than a 1d12 weapon with Savage Attack, despite its preference for larger damage dice. From some playing with the DPR calculator, it looks like a berserker's rank 2 (lvl 13) Brutal Critical is just enough to give a 1d12 weapon the edge. Maybe Savage Attack on a lvl 9 berserker would alternately be enough.

Kane0
2017-09-27, 07:50 PM
I don't have nearly the grasp of excel and math needed for this but I do homebrew a bit so I was looking to compare the damage of my ranger and invoker to standard fighters, barbarians, rogues, warlocks, etc. So I needed the once per round factor for things like Spellstrike whereas per-hit additions work fine for skirmish and the like.

Not the initial design goal I realise, but hopefully other such inputs can be done for per-round to mirror the per-hit extras.

Silkensword
2017-09-28, 10:40 AM
any reason for there not being d6 in the additional damage dice category?

Nobear
2017-09-28, 05:59 PM
I don't have nearly the grasp of excel and math needed for this but I do homebrew a bit so I was looking to compare the damage of my ranger and invoker to standard fighters, barbarians, rogues, warlocks, etc. So I needed the once per round factor for things like Spellstrike whereas per-hit additions work fine for skirmish and the like.

Not the initial design goal I realise, but hopefully other such inputs can be done for per-round to mirror the per-hit extras.

Is the Spellstrike you're talking about the one from the Invoker link in your signature? For some clarification: Is the spell limited to the one target of your weapon attack, regardless of the area or number of creatures it could normally affect? How do you handle spells like Magic Missiles, that normally let you focus multiple instances of damage on one target? Is the spell's effect guaranteed on a hit, regardless of whether it normally requires a ranged/melee attack or a save? And is there any possible way to use Spellstrike with a reaction?

If it works the way I think it does, it should follow the same rules as Sneak Attack. Keep in mind, if you're only making one weapon attack per round (not factoring in reaction attacks if you assume they're rare/unpredictable), you could just use the Additional Damage Dice section of the DPR calculator for Sneak Attack or Spellstrike. If the spell you're using adds a flat damage modifier (a fixed number, or your spell casting mod), you could just add that to the damage mod of your melee attack, and you'd get accurate results as long as the damage type of your weapon and spell weren't subject to different resistances/immunities/vulnerabilities.

The Sneak Attack section was made specifically to model two-weapon fighting, where you assume you will use the Sneak Attack on the first attack that hits. (In practice, for instance if you think an enemy is close enough to death that you'll surely kill him with the first attack, you may choose not to Sneak Attack on the first attack, but the DPR calculator doesn't consider those tactical decisions.) If I read and interpret correctly, you should be able to model Improved Spellstrike accurately by using the Sneak Attack section, as long as a) you're not trying to model mixed resistances etc. and b) the spell you're using doesn't add a flat damage mod.


any reason for there not being d6 in the additional damage dice category?

You can change any and all die sizes. Those are just default values.

Kane0
2017-09-28, 06:39 PM
Is the Spellstrike you're talking about the one from the Invoker link in your signature? For some clarification: Is the spell limited to the one target of your weapon attack, regardless of the area or number of creatures it could normally affect? How do you handle spells like Magic Missiles, that normally let you focus multiple instances of damage on one target? Is the spell's effect guaranteed on a hit, regardless of whether it normally requires a ranged/melee attack or a save? And is there any possible way to use Spellstrike with a reaction?

If it works the way I think it does, it should follow the same rules as Sneak Attack. Keep in mind, if you're only making one weapon attack per round (not factoring in reaction attacks if you assume they're rare/unpredictable), you could just use the Additional Damage Dice section of the DPR calculator for Sneak Attack or Spellstrike. If the spell you're using adds a flat damage modifier (a fixed number, or your spell casting mod), you could just add that to the damage mod of your melee attack, and you'd get accurate results as long as the damage type of your weapon and spell weren't subject to different resistances/immunities/vulnerabilities.

The Sneak Attack section was made specifically to model two-weapon fighting, where you assume you will use the Sneak Attack on the first attack that hits. (In practice, for instance if you think an enemy is close enough to death that you'll surely kill him with the first attack, you may choose not to Sneak Attack on the first attack, but the DPR calculator doesn't consider those tactical decisions.) If I read and interpret correctly, you should be able to model Improved Spellstrike accurately by using the Sneak Attack section, as long as a) you're not trying to model mixed resistances etc. and b) the spell you're using doesn't add a flat damage mod.


Yes that's the one. You make an attack as part of casting the spell, which happens before the spell's effect and replacing one attack roll if the spell normally gives one. Multiple targets, AoE effects, etc are still a possibility, the target of your weapon attack is the first/primary target in such cases. If you hit with the weapon attack that is treated as if you hit with an attack required as part of the spell, saves happen normally. It's possible to SS on a reaction using the Warcaster feat, similar to how one can use Booming Blade or Green Flame Blade in such a way.
Using SS means you must hit with your weapon for the spell to take effect though, so by using Magic Missile, Burning Hands or whatever via SS you have to hit or the spell is wasted.

Yes it appears you are right, I should be able to use a combination of static mods and sneak attack to get close enough for it to work. Cheers!

Nobear
2017-09-29, 05:16 PM
Using SS means you must hit with your weapon for the spell to take effect though, so by using Magic Missile, Burning Hands or whatever via SS you have to hit or the spell is wasted.

Yes it appears you are right, I should be able to use a combination of static mods and sneak attack to get close enough for it to work. Cheers!

I see. So SS is optimized for attack-based spells, and Magic Missiles would be a bad choice, since its lower damage is meant to compensate for the fact it's guaranteed to hit when cast normally. I made a guide to help you make accurate calculations for your Invoker.

Attack-based spells: Use only the Attack tab

-One attack: Use either Additional Damage Dice or Sneak Attack for the spell's damage dice
• with spell damage mod: Add the spell's damage mod to the mod in the main Damage section

-Two attacks (Improved SS): Use only Sneak Attack for the spell's damage dice*
• with spell damage mod: Multiply the spell's damage mod by the chance of at least one hit, then add the result to the mod in the main Damage section*

Save-based spells: Multiply the spell's DPR from the Save tab by the chance of at least one hit from the Attack tab, then add the result to the DPR from the Attack tab. Save-based spells can't crit, so this calculation will be accurate.

*As I pointed out before, the Sneak Attack calculation is slightly off in this DPR calculator when using more than one attack. Without getting into math, you can understand the basic idea that you've got two chances for the effect/spell to hit with SA/SS when you use two attacks? That's factored in correctly. But you also have two chances to crit, which is not accounted for in this calculator. That said, unless you have special feats/features that improve crit chance or mechanics, crits make up a pretty small percent of overall DPR. Your base crit chance is 5%, and normally your DPC is less than double your DPH, since you are only rolling double your damage dice and not doubling your mod. Consequently, crits normally make up less than 5% of your DPR. I would estimate that, on average, correcting the Sneak Attack calculation would reflect about a 2% increase in DPR. The calculation I suggested above to estimate the effect of a spell damage mod with two attacks will be a slight underestimate as well, for similar reasons and by a similar percent.

Kane0
2017-09-29, 05:24 PM
Nah the crit part doesn't bother me, our table houserules crits to be double damage anyways.

Nobear
2017-09-29, 05:50 PM
Nah the crit part doesn't bother me, our table houserules crits to be double damage anyways.

Fair enough. Even with your house rules, unless you have special crit feats/features, using this calculator as I suggest for your Invoker will certainly get you within 5% of the true DPR. Cheers!

LibraryOgre
2018-06-11, 10:16 AM
NUCM: Necromancy Under Consent of the Mods.

LudicSavant
2018-06-11, 10:53 AM
So it's no secret that I've been away from forums for quite a while now for undisclosed IRL reasons, so this sort of fell onto the backburner. However in the interim it appears to have become the top google hit for "5e DPR Calculator" and I'm still not aware of a better one available, despite this one being incomplete (some of the spreadsheets I've seen linked even had pretty blatant errors. Most were simply woefully oversimplified and couldn't account for even common factors like advantage, disadvantage, crits, or whatever). Or at least, incomplete according to the standard of "cover basically every function possible in 5e D&D." So I figure I should probably get around to completing it. To that end I could use the help of anyone well-versed in mathematics and/or spreadsheets to help me with the following:

Stuff I could use help with / want to add:
- Identifying any mechanics present in D&D 5e that the sheet does not already have the ability to solve
- Identifying any features that you'd like to see added.
- Identifying if there are any errors of any kind. No nitpick is too small when it comes to math.
- If it's unclear how to use anything in the sheet, or you have any suggestions on how to make it more user-friendly, let me know.
- Getting a formula for how the halfling's "Lucky" trait would affect to-hit chance (including with disadvantage and advantage).
- Getting a formula for how the Sorcerer's Empower Spell metamagic would affect damage.
- Adding multiple dice as bonuses to-hit simultaneously (such as Bless and Bardic Inspiration simultaneously).
- Elven Accuracy
- Gloomstalker's "Stalker's Flurry"
- Designating an attack as a bonus action

If someone would like to help more directly I can also be reached by PM to set up a chat on Discord or something. I could always stand to have more mathematically-inclined folks on my contact list.

Amdy_vill
2018-06-11, 11:02 AM
Edit/Update: See the post here (http://www.giantitp.com/forums/showsinglepost.php?p=23142120&postcount=42).

http://i.imgur.com/HfAx49t.png (https://docs.google.com/spreadsheets/d/1Qv3skx5dwgq1piGZq6gzfZb6N6XRj99CEto2MAXrWEk/edit#gid=309497876)
An example of what you can do with this sheet.

I have created a DPR calculator. It factors in a a wide variety of things that many DPR formulas posted here do not, such as advantage/disadvantage, great weapon fighting, elemental adept, riders, DoTs, rounding effects, critical hit chance / damage, when you should power attack (such as with Heavy Weapon Master or Sharpshooter), and so forth. It also will produce a chart showing DPR against enemies of every AC value. Two sheets are currently included; one for attack rolls, and one for saving throw effects.

https://docs.google.com/spreadsheets/d/1Qv3skx5dwgq1piGZq6gzfZb6N6XRj99CEto2MAXrWEk/edit#gid=309497876

Just make a copy, enter your basic information like attack bonus and damage dice, and get all the information you want printed out.

Please let me know if you find this useful, if there is anything even slightly inaccurate, or if there is additional functionality you would like to see provided.

-Ludic

the only thing i think is missing is a chance to hit. but this is great i think i will use it when making builds

LudicSavant
2018-06-11, 10:13 PM
the only thing i think is missing is a chance to hit. but this is great i think i will use it when making builds

https://i.imgur.com/YiEjcMI.png

Pex
2018-06-11, 10:21 PM
Missing d6 for additional damage dice. Hex and Hunter's Mark casters are glaring.

LudicSavant
2018-06-11, 11:36 PM
Missing d6 for additional damage dice.



You can change any and all die sizes. Those are just default values.

As Nobear noted, that's already a feature. You can change any and all die sizes, and the ones you're seeing are just default values. It's intended for you to edit any of the white fields under "Inputs." Like, just type in a "6" after the "d" to roll 6 sided dice. Or anything after the d to roll any-sided dice.

But thanks, this helps me know what could use more documentation so that people know how to actually use the tool. Edited the tooltip to make this more clear.

Actually, any suggestions on how I could help explain how to use the sheet (or otherwise make it more user-friendly) would be good. Maybe I should add that to the list (edit: Added that to the to-do list).

https://i.imgur.com/1DbS4lK.png

Coidzor
2018-06-13, 09:41 AM
Wouldn't Lucky basically be a 5% chance of proccing your % chance of a normal hit and a 5% chance of proccing your % chance of a critical hit plus the baseline chance of a normal hit and critical hit?

Say you hit 60% of the time and 10% of that is a crit due to having a 19-20 threat range. That's .50 + .10 + 0.05 * .50 + 0.05*0.10, right?

So then DPR would be .5 * average result + .1 * average crit result + 0.025 * average result + 0.005 * average crit result?



Still looking forward to getting the Bonus Action Attack and the ability to take Bardic Inspiration into account finished, can't think of anything else needed.

Armored Walrus
2018-06-13, 10:15 AM
Stuff to add: "Super Advantage" ie. Elven Accuracy and Luck.

LudicSavant
2018-06-13, 10:59 AM
Wouldn't Lucky basically be a 5% chance of proccing your % chance of a normal hit and a 5% chance of proccing your % chance of a critical hit plus the baseline chance of a normal hit and critical hit?

Say you hit 60% of the time and 10% of that is a crit due to having a 19-20 threat range. That's .50 + .10 + 0.05 * .50 + 0.05*0.10, right?

So then DPR would be .5 * average result + .1 * average crit result + 0.025 * average result + 0.005 * average crit result?



Still looking forward to getting the Bonus Action Attack and the ability to take Bardic Inspiration into account finished, can't think of anything else needed.

Regarding Lucky, I managed to find this: https://rpg.stackexchange.com/questions/100035/how-does-halfling-luck-re-rolling-my-nat-1s-affect-my-dice-outcome/100051

Notable bit would be the "probabilities for exact rolls" response, not the most upvoted post. Have to check to confirm the answer is in fact correct and then figure out how to make it play nice with the spreadsheet, but looks promising. Will check to see if your method works, too.


Stuff to add: "Super Advantage" ie. Elven Accuracy and Luck.

Good call. Elven Accuracy wasn't a thing when I first made this and it should definitely be on there. The Lucky feat is tricky since it's an elective reroll; I would have to make some assumptions about the player's prioritization when using it.

Armored Walrus
2018-06-13, 11:28 AM
Good call. Elven Accuracy wasn't a thing when I first made this and it should definitely be on there. The Lucky feat is tricky since it's an elective reroll; I would have to make some assumptions about the player's prioritization when using it.

Lucky is probably a less important consideration for what this tool is likely to be used for, IMO. I don't think anyone is using it's impact on DPR to determine whether or not to take it. So it could probably be left out. But a hard number for the impact of Elven Accuracy on DPR would be very useful.

bid
2018-06-13, 06:23 PM
Notable bit would be the "probabilities for exact rolls" response, not the most upvoted post. Have to check to confirm the answer is in fact correct and then figure out how to make it play nice with the spreadsheet, but looks promising. Will check to see if your method works, too.
I'm pretty sure you don't need a table to get that, a simple equation works.

Normally, the chance of not rolling 1 is:
- normal = 19/20 = .95
- disadvantage = .95 * .95 ~ .9025
- advantage = 1 - (.05 * .05) ~ .9975
Not rolling 2 3 4... becomes 18/20 17/20 16/20

For halflings, it becomes:
- normal = 399/400 = .9975
- disadvantage = . 9975 * . 9975 ~ .995
- advantage = 1 - (.0025 * .0025) ~ .9999
Not rolling 2 3 4... becomes .945 .8925 .84...
Or (399 - 21*k)/400
{21 * 19 = 399, for those who wonder}

MightyK
2018-06-14, 03:07 AM
Hi LudicSavant, great tool!


- Identifying any mechanics present in D&D 5e that the sheet does not already have the ability to solve

Adding a second "once per turn rider" row. I might have sneak attack AND another effect. Also the second row could have a more generic title, it is not that uncommon anymore. Horizon Walker and Zealot Barbarian for example (although this one also needs a "static" +x modifier).


- Identifying any features that you'd like to see added.

The biggest for me is that I use this sheet to compare builds. How does my strange MC hold up to a generic fighter? Should I take these feats, or those? and so on ...
Right now I have to copy the values into another sheet to compare.

Would it be possible to maybe have an extra sheet where I can input 2 builds at once and the graph shows multiple builds against just a few key AC points?
I am not really interested how a build fares against all ACs from 1 to 30. I want to know which build is generally how strong.

Actually, instead of having a curve across the ACs I would love a curve of expected damage from lvl 1 to 20, but that is quite another task I guess.


- If it's unclear how to use anything in the sheet, or you have any suggestions on how to make it more user-friendly, let me know.

I like to have all cells that should be tampered with a light green and all cells that should not be touched a light red background and results a light blue, but that would mean a complete color overhaul.
Right now Maybe add an extra row of d6 to the additional damage die, as that seems to be the only part where people get confused.

Google sheets supports checkboxes now, so, you can very easily change those 1/0 options into boxes you can tick on or off.


Select the cells you want to have checkboxes.
In the menu at the top, click Data and then Data validation.
Next to "Criteria," choose Checkboxes.
Click Use custom cell values.
Next to "Checked," enter a value.
Optional: Next to "Unchecked," enter a value.
Click Save.



keep up the good work!

LudicSavant
2018-06-16, 03:04 PM
Adding a second "once per turn rider" row. I might have sneak attack AND another effect. Also the second row could have a more generic title, it is not that uncommon anymore. Horizon Walker and Zealot Barbarian for example (although this one also needs a "static" +x modifier). Okay, I'll add that to the to-do list.


The biggest for me is that I use this sheet to compare builds. How does my strange MC hold up to a generic fighter? Should I take these feats, or those? and so on ...
Right now I have to copy the values into another sheet to compare. It's notable that, technically, the sheet (and indeed any DPR calculator) doesn't calculate the DPR output of "builds." It compares attack routines, because that's what actually produces a single DPR output. Pretty much any given build can potentially produce a wide variety of attack routines which would all produce a different DPR. That said, it would be possible to implement a feature that compares different attack routines.



Google sheets supports checkboxes now, so, you can very easily change those 1/0 options into boxes you can tick on or off.


Select the cells you want to have checkboxes.
In the menu at the top, click Data and then Data validation.
Next to "Criteria," choose Checkboxes.
Click Use custom cell values.
Next to "Checked," enter a value.
Optional: Next to "Unchecked," enter a value.
Click Save.



keep up the good work!

Nice! I didn't know about that new feature. I'll look into implementing it.

Coidzor
2018-06-17, 01:40 AM
It would certainly be nice to be able to chart two different attack routines against one another to see if one of them becomes superior against enemies of certain armor classes.

SpoCk0nd0pe
2018-06-20, 06:39 AM
Stuff I could use help with / want to add:
- Identifying any mechanics present in D&D 5e that the sheet does not already have the ability to solve
- Identifying any features that you'd like to see added.

The Gloomstalker's Stalker's Flurry ability (extra attack if any attack misses) and the Elven Accuracy feat :)

Roaka
2018-06-29, 01:40 AM
I made an account just to post on this thread :)

I found this calculator in a google search, and I've been using it to answer questions about DPR optimization in melee classes while I procrastinate folding my laundry.

Specifically: which does better dps: a pure lvl 20 barbarian, or a 17 barbarian/3champion? What about a 17 barbarian/3 assassin? Dual wielding or heavy weapons? Is there a monk build (monk main, with dip or dips into other classes) that does comparable DPR to the pure fighter or barbarian/fighter? Is there a comparable melee ranger or rogue build? Etc.

LudicSavant
2018-07-07, 06:16 AM
So a couple of the math questions are still unanswered (http://www.giantitp.com/forums/showsinglepost.php?p=23142120&postcount=42), such as for Empower Spell. I'm kinda holding off on doing piecemeal updates until I get all of those formulas together since I kinda wanna do it in one swoop if possible. Maybe I should try asking on a math-dedicated forum. Anyone know a good one?


I made an account just to post on this thread :)

I found this calculator in a google search, and I've been using it to answer questions about DPR optimization in melee classes while I procrastinate folding my laundry.

Thanks. I'm glad you're finding it useful! :smallsmile:

bid
2018-07-07, 11:24 AM
So a couple of the math questions are still unanswered (http://www.giantitp.com/forums/showsinglepost.php?p=23142120&postcount=42), such as for Empower Spell.
Doing it once, only when rolling a 1 is easy.
Assuming 4d6, you will get at least one 1 (1-5/6^4) ~ 51%
And this will replace 1 by the average, adding (3.5 - 1) = 2.5
Or 2.5 * 51% ~ 1.3 damage

Now, how many SP do you have to waste?
You need some human intelligence to make that decision because it depends if it's overkill or necessary.


If you have 3 SP and will reroll 1-2 but still using d6, it's a different ball game.
You'll have to use https://en.wikipedia.org/wiki/Combination formula to find how many cases of 1-1-1, 1-1-2, 1-2-2, 2-2-2 and add them (1-1-1)% * (2.5+2.5+2.5) + (1-1-2)% * (2.5+2.5+1.5) + (1-2-2)% * (2.5+1.5+1.5) + (2-2-2)% * (1.5+1.5+1.5).

As you can see, you're hitting on the limit of what you can do with a spreadsheet.