• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Damage Per Second Calculation Mathematical Error

Status
Not open for further replies.
The reason I'm posting this here has absolutely nothing to do with StarCraft II but it still relates as it is an error in math I've seem to run in to, and Sc2 mapmaking has alot to do with variables and math :)

I'm trying to create a spreadsheet as to calculate DPS.
One formula I created myself with a bit of brainstorming,
One I got off a website,
And the third I got off a website as well.

All three lead to the same answer.
However the answer is not correct.
Could it be the right side of all our brains are just duds? Doubtful.
So here I am.
And here's my calculations.

I'll attach 3 spreadsheets, one with my calculation and one with my modified one that contains the one off the website.

The other just got heavily screwed up along the way.. I really don't know how I failed so hard >_>

Though my calculation is done the longer and harder way it still gets the job done in the same fashion.

Now as you can tell when I apply source stats the separation factor (what the spreadsheet tells me is my dps and what diablo does) multiplies by extreme factors.

Attached is a ZIP folder containing everything you'll need.

I need help with this! What am I doing wrong?

(1 + Passive %) * ((Weapon DPS / Weapon APS) + (Bonus Min Wpn Dmg + Bonus Max Wpn Dmg)/2) * (1 + ( Crit Chance % * Crit Dmg %)) * (1 + (Main Attribute Value / 100)) * ((1 + Attack Speed %) * Weapon APS))
 

Attachments

  • Calcs.zip
    5.4 MB · Views: 82
... Where this descrepency comes from will need to be investigated.

>_>

<_<

Try using a 1h wep with an O/H.

It gets very inaccurate at that point... into the thousands.

Maybe it's by the way I'm simply applying the O/H dmg as if it was just +damage to the MH wep?

According to this formula I should have 22.50% more IAS than I have (I have none)
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,199
Try using a 1h wep with an O/H.
I was...

The way you realized the formula was wrong anyway (offhand damage adds to weapon damage so it is either adding averages or adding min and max values), but the "correct" formula is still out.

I suspect it has something to do with attack rate. The game works in frames internally so it is possible that the Blizzard calculation takes into account frame borders (rounding attacks to appropiate frames) rather than the actual formula which assumes an infinite time resolution. This is why the error is so small and probably non-existant for some attack speed configurations.
 
The way you realized the formula was wrong anyway (offhand damage adds to weapon damage so it is either adding averages or adding min and max values), but the "correct" formula is still out.

That's how I calculated it.

If you notice in the spreadsheet it adds the min / max values from the O/H to the overall min / max which the formula then uses as average wep damage.

Edit: oh wait a second.. in these formulas I tried to skip needing to input min / max to avoid wasting the user's time.

Instead of "min + max / 2" I just did "avg / 2 = min" "avg / 2 = max" then "avg wep dmg = min + max".

Adding any small value would drastically increase the dps.

Now I see what I did wrong.

Seems the only immediate way to fix this is to have whoever is using the calculator to actually input their min / max damage.


Nevermind .. that wouldn't make a difference.
 
Last edited:
Status
Not open for further replies.
Top