0
I've searched around but can't find a post laying out the exact order in which things like dodge, resistance, dmg reduction, etc., factor into the damage calculation formula. I'm likely just a poor reader. That said, if you know it, please either link or list here!
Also, if this is something we simply don't know yet, that'd be good to learn too.
Well if you think about it you can mostly figure it out logically. Plus, because most of the damage reduction sources act in a very similar way, order doesn't matter too much. How I think it works is:
- Calculate dodge (this has to be first for efficiency sake; if you dodge the attack then nothing further has to be calculated)
- Calculate resistance from skills, int, armor, individual resistances (the order of these doesn't matter, you just multiply them all together)
- Calculate block (has to be near the end because if it's calculated earlier then block sucks)
- Calculate damage converted to health (this has to be at the end because otherwise you could heal more than the damage you took)
So if you took 1000 damage from a level 40 monster it would work like this:
- Calculate if you dodge, if so, you take 0 damage.
- Calculate all the applicable damage reductions such as int. (For example, if you have 200 int then your damage reduction would be (200 * .1) / [5*40 + (200 * .1)] = 9% then combine them multiplicatively like this: 1 - [(1 - x) * (1 - y) ...].
- Now determine if you blocked and apply the damage reduction.
- Now apply your %damage converted to health on the remaining damage.
Does that make sense?
very informative post, thanks.
Many of these formulas have been datamined from some of the fine folks working on DiabloNut and the Hero Planner - I'll try to get some documentation together for a number of mechanics questions, this included.
Jom,
If you could include weapon damage formulas, that'd be amazing! I'm looking at:
- how +raw dmg, +%dmg, and int combine for a hit
- how +%crit damage calculates into a crit
- how +raw APS and +%aps combine into final weapon speed.
Keep it up!For the most part are all the formulas that d3nut uses, datamined?
You guys do realize that the order in which you multiply stuff has zero significance, and thus the order in which multiplicative bonuses are applied is of zero significance as well, right?
what does matter is where the additive bonuses land in the process.
Existence of block/absorb makes this all meaningful.
Well, for flat damage stuff, I think anything that was actually tested so far showed to be calculated after %-based damage reductions.
If it didn't, it would suck that it doesn't scale with gear (and thus either overpowered at the early parts of the game you'd play at level 60, or underpowered when you get further in inferno). When it applies at the end it gets stronger the more damage reduction you have, which makes a lot more sense.
Anyway, dodge, resistance and damage reduction (at least from armor) are all multiplicative bonuses, and those were the ones listed in the OP and their order indeed doesn't matter.
We have not produced an official breakdown of the game code yet.
However, most of it can be figured out by understanding the game's systems. It's the same as posted above. The major changes are to blocking, elimination of defense, and the addition of armor. So I think it works like this:
1. Dodge check: if successful, no damage is taken and there is no hit recovery.
2. Resistances applied. Note that physical damage is treated as a damage type, with resistance.
3. Armor reduction applied. This reduces all damage as far as I know.
4. Block is checked. Blocking no longer "blocks" the attack, but instead operates like the damage reduced affix from Diablo 2. Shields seem to have 20% blocking and there are +% modifiers. I do not know if there is a blocking cap, but I think there is hit recovery for blocking.
5. Any conversion or absorption effects have to be calculated last.
The double reduction from "physical resistance" and "armor" seems a little strange to me. Also, I am not sure how I feel about the weakening of the blocking system; it will depend on what kind of unique items are put into the game.
Bookmarks