PDA

View Full Version : CR formula math



Yakk
2019-10-29, 12:13 PM
CR =~ 1/4 ( HP/15 + ATK*2.5 + AC*3 + DPR/6 -50 )

Save DCs are about ATK+10.

This generates reasonable CR approximations for:
HP 50-355
ATK 3 to 10
DPR 6 to 122
AC 13 to 19
which is basically CR 0.5 to 19.

You can extend this a bit to under CR 0.5 and over CR 19:

If CR >19, instead use (CR-19)/2+19 (ie, CR 20 is 2 steps from 19, and 21 is 2 steps from 20)

If CR < 0.5:

Use 1/4 if calculated CR is 0.1 or so
Use 1/8 if calculated CR is -0.3 or so
Use 0 if calculated CR is -0.6 or so

Within the range 0.5 to 19, the CR calculation is surprisingly linear.

MaxWilson
2019-10-29, 12:44 PM
Interesting.

Does your formula work for monsters whose offensive and defensive CRs are very different? Glass cannons like liches and beefy tanks like Stone Golems?

I.e. does this replicate the variability in the DMG table, or just the mean for each CR?

Sir_Solifuge
2019-10-29, 12:59 PM
CR =~ 1/4 ( HP/15 + ATK*2.5 + AC*3 + DPR/6 -50 )

Save DCs are about ATK+10.

This generates reasonable CR approximations for:
HP 50-355
ATK 3 to 10
DPR 6 to 122
AC 13 to 19
which is basically CR 0.5 to 19.

You can extend this a bit to under CR 0.5 and over CR 19:

If CR >19, instead use (CR-19)/2+19 (ie, CR 20 is 2 steps from 19, and 21 is 2 steps from 20)

If CR < 0.5:

Use 1/4 if calculated CR is 0.1 or so
Use 1/8 if calculated CR is -0.3 or so
Use 0 if calculated CR is -0.6 or so

Within the range 0.5 to 19, the CR calculation is surprisingly linear.
Would you mind laying out a few example encounter's that you see exemplifying this formula's use?

MaxWilson
2019-10-29, 01:26 PM
Would you mind laying out a few example encounter's that you see exemplifying this formula's use?

I'll supply one, on the assumption that the formula is accurate:

If CR ~= 1/4 ( HP/15 + ATK*2.5 + AC*3 + DPR/6 -50 ), then if I want to take a standard Ogre and turn it into an Ogre Mage by giving it the ability to cast Cone of Cold, Hold Person and Shield, among other spells, then instead of recomputing the whole CR from scratch I can just compute the deltas: I'm replacing a 13 HP attack each round with an 8d8 AoE attack on one round (call it 72 HP of damage on average to two targets), an upcast Hold Person IV on rounds two and three (per Jeremy Crawford's remarks here (http://blogofholding.com/?p=7357) it's probably fine to treat this as a Fireball IV for 9d6, 63 HP to two targets), and I'm increasing effective AC from 11 to 16... so CR should have increased by 1/4 (additional AC * 3 + additional DPR/6) = 1/4 (5 * 3 + (72 + 63*2 - 3*13)/3) = +17, so my new Ogre should be CR 19, if the formula is correct and if I am understanding the formula correctly. Edit: see Yakk's correction below.

Having worked this example, I'm pretty sure the formula is not correct or I am not understanding it correctly. DMG tables say that Ogre Mage should only be CR 4. But, in theory, having a formula would be useful for these kinds of on-the-spot tweaks. Ditto if I want to upscale a CR 5 elemental to CR 7 from upcasting.

Yakk
2019-10-29, 02:35 PM
Max, you missed a /6 on DPR.

1/4 (5 * 3 + (72 + 63*2 - 3*13)/3) should be 1/4 * (5 * 3 + (72 + 63*2 - 3*13)/3/6) so +6 CR.

The ogre in my math is a CR 1, so the ogre magi ends up being CR 7 - or 8 if you use the deltas.

I tried to use DMG data. From http://blogofholding.com/?p=7283 I probably shouldn't.

Also, I think I got the AC/ATK values wrong when they differ from DMG/ATK; I think my error might over value them.

I should use http://blogofholding.com/?p=7338 instead of the DMG guidelines, as they reflect actual 5e monsters.

MaxWilson
2019-10-29, 02:38 PM
Max, you missed a /6 on DPR.

Aha, so I did! Thanks for the correction.

Did I guess right about why you'd want to have a formula? The idea of computing deltas instead of full CRs is rather attractive to me, especially for spellcasting monsters that are a pain to recompute from scratch.


The ogre in my math is a CR 1, so the ogre magi ends up being CR 7 - or 8 if you use the deltas.

I still get only CR 4 using DMG tables though. I wonder what happens if I plug a CR 4 Flameskull into your formula... hmmm, approximately 6 not counting Magic Resistance (AFB so I couldn't remember how that affects AC) if I count Shield for AC, only 2.3 if I don't count Shield... my memory of DMG math is that +4 AC should only shift CR by 1, not 4.


Also, I think I got the AC/ATK values wrong when they differ from DMG/ATK; I think my error might over value them.

Yeah, that seems likely.


I should use http://blogofholding.com/?p=7338 instead of the DMG guidelines, as they reflect actual 5e monsters.

Er, maybe. There's a question of whether MM monsters are too weak or DMG-created monsters are too strong, although in most cases when I've done the math, MM monsters come out as legal by DMG guidelines but on the weak side (e.g. CR 8.5 rounded up to 9 instead of a "proper" CR 9).

Personally I would trust the DMG formulas over BlogOfHolding's attempts at reverse-engineering. There's too much noise in the reverse-engineering. But really I would not trust CR at all for anything except computing XP awards.

Yakk
2019-10-29, 02:53 PM
So I'm going to double check my assumptions. This will involve talking about math. Please ignore if that hurts you.

First, I treated ATK/AC/HP and Damage as linear (well affine) properties of CR. I didn't get this from nowhere -- I did some regressions of the DMG stats, and the http://blogofholding.com/?p=7338 article that actually looked at 5e monsters found similar results.

Second, I think they are all roughly as important (especially if you treat AC as both a save and AC value).

Third, their effectiveness multiplies. Increase ATK so your accuracy doubles? That makes your damage worth twice as much. But the same is true if your *durability* doubles (from either high defence or HP), because you last twice as long so you deal twice as much damage.

This talks about multiplying; the beauty of logarithms is that if something is true of ordering (A*B*C*D) it is also true of (A+B+C+D).

So I break monsters down into 4 contributions -- ATK, AC, HP and DPR. Then I average them. Then I threw in a factor to slide everything over so we hit CR 1 and 19.

...

I don't see any fundamental flaws there.

One problem may be that ATK might be "steeper" than DPR or vice versa tho in how monsters are built.

...

Taking a stab at using http://blogofholding.com/?p=7338 "MM3" math and using equal-weight to AC/ATK/HP/DPR.

(DPR/5 + HP/15 + ATK*2 + AC*3)/4
is our incremental average.

(If using DCs, the effective ATK=DC-7)

Plugging in for CR 1 we get

(10/5 + 30/15 + 4*2 + 13*3)/4 = 12.75
So subtract 47.

(DPR/5 + HP/15 + ATK*2 + AC*3 - 47)/4

now this doesn't take into accounts saving throws. And it might over-value AC; on the other hand, high AC is one of the few ways not to instant-splat and low AC is a great way to be instant-splated against a typical party.


f I count Shield for AC, only 2.3 if I don't count Shield... my memory of DMG math is that +4 AC should only shift CR by 1, not 4.
Yes, I am pretty sure my plan of "average" works reasonably (for sane stat ranges), but it should be *weighted average* and I need to work out weights better.

If I'm over-weighting AC by a factor of 2, and ATK/AC have the same value, and (c) blog of holding's values have a 10% drop at level 10, we get:

(DPR/5 + HP/15 + ATK*1.5 + AC*1.5)/3

Then solving for CR 1 we get:

(DPR/5 + HP/15 + ATK*1.5 + AC*1.5 - 27)/3

With DC =~ ATK+7 and Good Save :=~ ATK-1.

(The "-27" comes from 12 "free" AC, 4 "free" ATK, 5 "free" DPR 15 "free" HP.)

Blog of Holding has a good point that "real" monsters have more ATK and less Damage than the DMG says they should. The graphs are pretty convincing.

MaxWilson
2019-10-29, 03:26 PM
First, I treated ATK/AC/HP and Damage as linear (well affine) properties of CR. I didn't get this from nowhere -- I did some regressions of the DMG stats, and the http://blogofholding.com/?p=7338 article that actually looked at 5e monsters found similar results.

Second, I think they are all roughly as important (especially if you treat AC as both a save and AC value).

Third, their effectiveness multiplies. Increase ATK so your accuracy doubles? That makes your damage worth twice as much. But the same is true if your *durability* doubles (from either high defence or HP), because you last twice as long so you deal twice as much damage.

This talks about multiplying; the beauty of logarithms is that if something is true of ordering (A*B*C*D) it is also true of (A+B+C+D).

So I break monsters down into 4 contributions -- ATK, AC, HP and DPR. Then I average them. Then I threw in a factor to slide everything over so we hit CR 1 and 19.


This in bold here is why I was so surprised to see that there wasn't any logarithm in your formula. Instead of looking for a linear solution why not look for something of the form CR = log(durability) + log(DPR), which is equivalent to log(durability * DPR)? That's basically what the DMG appears to be doing, from my rough eyeballing of it. How can you hope to recreate the DMG formulas or WotC's internal spreadsheet without using logarithms in your CR formula?


Blog of Holding has a good point that "real" monsters have more ATK and less Damage than the DMG says they should. The graphs are pretty convincing.

I've never found Blog of Holding's methodology very convincing. I see a whole lot of (linear!) curve fitting at the level of individual attributes like to-hit and damage and not very model testing at the level of individual monsters: are the blog of holding formulas capable of accurately predicting the CR of a given MM monster with accuracy better than the DMG tables? In fact I've never seen Blogofholding even attempt to address this question, which leaves me wondering what exactly it thinks it's trying to accomplish.

See for instance this post: http://blogofholding.com/?p=7283

Blogofholding misses the crucial step, which is take a bunch of monsters from the MM, compute the CR per DMG guidelines, and then graph how well that tracks the MM CR. Instead blog of holding just graphs a bunch of independent inputs to CR, which proves exactly nothing interesting.

Yakk
2019-10-29, 05:45 PM
This in bold here is why I was so surprised to see that there wasn't any exponentiation (logarithm = fractional exponent) in your formula. Instead of looking for a linear solution why not look for something of the form CR = log(durability) + log(DPR), which is equivalent to log(durability * DPR)? That's basically what the DMG appears to be doing, from my rough eyeballing of it. How can you hope to recreate the DMG formulas or WotC's internal spreadsheet without using logarithms in your CR formula?
The effectiveness of a monster is (Defence * Offence). The fact that Defence is (HP * Mitigation) and Offence is (Accuracy * Damage) is somewhat secondary.

(A monster's effectiveness is the product of defence and offence because monsters that last 2x as long deal 2x the damage, basically.)

We can swap all of those * for + within a reasonable domain, especially because the units of accuracy/mitigation are *not* ATK and AC, but rather "chance to hit/be hit".

I've never found Blog of Holding's methodology very convincing. I see a whole lot of (linear!) curve fitting at the level of individual attributes like to-hit and damage and not very model testing at the level of individual monsters: are the blog of holding formulas capable of accurately predicting the CR of a given MM monster with accuracy better than the DMG tables? In fact I've never seen Blogofholding even attempt to address this question, which leaves me wondering what exactly it thinks it's trying to accomplish.Curve fitting is prediction, backwards.

Even if the DMG system worked, it is also complex and takes time. If you can generate results that are close to as good without having to go through the DMG system you have a win.

See for instance this post: http://blogofholding.com/?p=7283

Blogofholding misses the crucial step, which is take a bunch of monsters from the MM, compute the CR per DMG guidelines, and then graph how well that tracks the MM CR. Instead blog of holding just graphs a bunch of independent inputs to CR, which proves exactly nothing interesting.

I don't see how that is useful.

The MM monsters are the real standard of CR. If you want to homebrew a monster, you want them to look like a MM monster. The DMG guidelines are some kind of simplification of whatever process WotC uses to make monster CRs.

Of more interest to me would be if he took each monster and calculated how it differed from his predicted value, and see if *those differences* had any correlations.

AdAstra
2019-10-29, 05:56 PM
Shouldn't save DCs usually be ATK+8 or even less (since not all DCs are based on a monster's attack stat)? Since attack bonus is prof. bonus+modifier and Save DC is 8+prof.+mod., and all.

The only monsters I could think of that have save DCs that are higher than ATK+8 are spellcasters, and that doesn't really count since those casters usually have ways of attacking using their casting stat.

MaxWilson
2019-10-29, 06:01 PM
The effectiveness of a monster is (Defence * Offence). The fact that Defence is (HP * Mitigation) and Offence is (Accuracy * Damage) is somewhat secondary.

(A monster's effectiveness is the product of defence and offence because monsters that last 2x as long deal 2x the damage, basically.)

We can swap all of those * for + within a reasonable domain, especially because the units of accuracy/mitigation are *not* ATK and AC, but rather "chance to hit/be hit".

This sentence here about swapping * for + is Greek to me, care to rephrase? It would make sense if you were going from a linear domain to a logarithmic domain, but clearly offense is linear in accuracy, not logarithmic, so I don't know what you're saying.


Curve fitting is prediction, backwards.

Yes... but what I said is that those predictions then need to be checked. I.e. you can't claim that your model is better than the DMG model unless you actually, you know, check your model, and Blog of Holding doesn't even bother to do that, so I'm skeptical of it. Before adopting your method I'd also want to check it and see how well it works. Wouldn't you?


Even if the DMG system worked, it is also complex and takes time. If you can generate results that are close to as good without having to go through the DMG system you have a win.

If they are close to as good then yes. How will you go about proving that they are close to as good if you don't check your predictions against the MM? When I checked Flameskull using your formula it was immediately obvious that it didn't predict the correct CR. The DMG does.

I think your formula needs a log term.

Besides, most of the complexity in the DMG system is in the special abilities anyway, trying to convert them to effective AC/HP/attack bonuses. I think Blog of Holding outright ignores those, which is obviously incorrect. (Yep, it does--see the post comparing Geryon to Ancient Green Dragon, which BTW also gets the dragon's AC wrong.)

I'm not defending the DMG system BTW. It ignores lots of things which are very tactically relevant, which is bad. It's oversensitive to small DPR variations in the upper -teens, which makes no sense for something built on crude approximations like "assume two PCs will be hit," and it gives an overall impression of more precision than it actually has. It's bad in a number of ways, but Blog of Holding's method is bad in all those ways and then some.

AdAstra
2019-10-29, 11:05 PM
The problem with many special abilities is that they are inherently pretty resistant to formula. For even something as simple as Parry, the effective damage reduction it provides depends heavily on the opposition. High damage low-volume attacks will be impacted more than the inverse. And that's a tame example. How does one evaluate the offensive/defensive impact of a control spell/ability? What about a buff aura? Even if one could create a formula for these things, it would be an approximation at best, like for damage resistances.

However, these formula still have significant use, because it gives you a baseline from which to estimate the CR once you add those other abilities. Plus it helps with making more generic monsters.

Yakk
2019-10-31, 11:04 AM
So, instead of messing with the tables, I went back to the DMG. And in it +2 ATK or +2 AC (if you aren't in the sub-1 CR area) is worth 0.5 CR.

Ie, if you take any monster and give it +4 ATK (and DCs) or +4 AC, it gains 1 CR (well, up to rounding). And ditto for -4.

15 HP might give you a defensive CR but it in effect also grants a bit of "free AC". On average, 1/3rd of an AC in the 1-20 level range. Similarly, +6 damage grants 2/5s of an ATK (and close to that in Spell DC).

So 15 HP is worth 0.5 CR, minus 1/12 from the free AC.
6 Damage is worth 0.5 CR, minus 1/10 from the free ATK.

dCR = dAC/4 + dATK/4 + dHP/15*(1/2 - 1/12) + dDPR/6 * (1/2 - 1/10)

So the change in CR is then:
dCR = dAC/4 + dATK/4 + dHP/36 + dDPR/15
where dX is the "change in X".

That is surprisingly clean.

As this is linear, we can just apply a baseline, say at CR 1:

CR 1 has 13 AC, 3 ATK, 78 HP, 11.5 DPR

13/4 + 3/4 + 78/36 + 11.5/15 = 6.9333333333

So my latest attempt:

CR = AC/4 + ATK/4 + HP/36 + DPR/15 - 6

I need to do some verification.

Step 1: check against DMG table and Blog of Holding formulas.

Step 2: spot check multiple MM monsters

Step 3: see if I can find a monster database to do whole-MM analysis against

---

Now, a fun side effect of this is that as monsters are mostly built using simulationist ATK/DC, we can work out the impact of a primary attack attribute has on CR instead of using ATK/DC. This is because proficiency is a function of CR and each point of proficiency adds 1/4 CR from bumping ATK/DCs.

Instead of zeroing out the "HP/DPR contribution to ATK", we could zero out the "DPR/HP/AC contribution to proficiency", and have the 4th term be the "Primary attribute modifier" instead of ATK.

Then we'd get a formula that maps DPR, HP, AC and Primary Attribute modifier to CR. ATK and Save DCs would then be calculated from Proficiency and Primary Attribute Modifier.

Edit: Math error found by trying to work on a Samurai.

Edit:
Step 1: check against DMG table

Complete. If we divide CR-past-20 by 2.5 we get value every monster CR from 1 to 30 accurate within 0.5.

AdAstra
2019-11-02, 10:02 PM
Not sure if you saw the thing I posted earlier about save DCs, but it seems like a massive oversight for something so simple and should definitely be addressed.

Yakk
2019-11-06, 11:58 AM
I forgot to respond to it.

From the DMG chart -- https://5e.tools/crcalculator.html#0,13,1,3,false,Medium,1,10,false ,0,false,0, -- no, the spell save DC is supposed to be 10+ATK not 8+ATK.

This is interesting.

AdAstra
2019-11-30, 08:53 AM
As far as I can tell, the only reason why this would be true on average would be due to spellcasters, who typically don't have their cantrips listed in their attacks, and typically have their spellcasting stat higher than their physical attack stat. But those would be outliers, and in practice their attacks would usually be cantrips, and thus obey the standard 8+mod+proficiency.

A lot of monsters have save DCs notably lower than the DMG guidelines, and some go even lower than the "standard" player formula, like the Triceratops, which has a +9 to attack rolls but imposes a DC 13 save for its trampling charge (equivalent to 4+mod+proficiency!).