(Keeps Hive Alive)
The Hive Workshop
 Remember Me?
 Register FAQ Members List Calendar Mark Forums Read

 Diablo Discussion Following the unveiling of Diablo III at the Blizzard Entertainment Worldwide Invitational, we've launched this forum to work as a temporary replacement to discuss the Diablo series until we get the entire section up and running.

06-23-2012, 05:19 AM   #1 (permalink)
Rispetto

Join Date: Jul 2009
Posts: 1,118
Damage Per Second Calculation Mathematical Error

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?

Formula
(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))
Attached Files
 Calcs.zip (5.38 MB, 22 views)

 06-23-2012, 06:27 AM #2 (permalink) Dr Super Good Imperial Good     Join Date: Jan 2005 Posts: 15,194 The formula seems to give a good approximation. It was out by less than +/- 50 of the ingame value. Where this descrepency comes from will need to be investigated.
06-23-2012, 07:29 AM   #3 (permalink)
Rispetto

Join Date: Jul 2009
Posts: 1,118
Quote:
 Originally Posted by dr super good ... 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)

06-23-2012, 02:02 PM   #4 (permalink)
Dr Super Good
Imperial Good

Join Date: Jan 2005
Posts: 15,194

Quote:
 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.

06-23-2012, 05:18 PM   #5 (permalink)
Rispetto

Join Date: Jul 2009
Posts: 1,118
Quote:
 Originally Posted by Dr Super Good 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 by Rispetto; 06-24-2012 at 05:48 AM.

 Bookmarks

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is On HTML code is OffTrackbacks are Off Pingbacks are Off Refbacks are Off Forum Rules

All times are GMT. The time now is 10:13 PM.

 -- Low Graphics ---- Night Elf ---- Terran (Beta) Contact Us - The Hive Workshop - The Warcraft 3 Modding Site - Archive - Top