Take the 2-minute tour ×
Arqade is a question and answer site for passionate videogamers on all platforms. It's 100% free, no registration required.

I am building a Diablo III calculator that will have API importing & also user data entry with validation. My issue lies with the latter part since I'm having a lot of trouble reassembling items with physical damage affixes.

Here's data for a problematic item: http://us.battle.net/api/d3/data/item/skorn

The goal I've set is to recalculate the maximum possible damage value using the attributes. The value we want to see is 1762.5 as it is given in the API, and I've verified through looking in-game that items can roll a damage value that high (see: http://i.imgur.com/WQ9k9.jpg).

What I know:

The damage range is only affected by these attribute types:

  • Damage_Weapon_Bonus_Delta#Element
  • Damage_Weapon_Delta#Physical
  • Damage_Weapon_Bonus_Min#Element
  • Damage_Weapon_Min#Physical
  • Damage_Weapon_Percent_Bonus#Physical

Where #Element is the type of bonus damage (Physical, Fire, Cold, Lightning, Arcane, Holy)

The Formula:

My calculations work perfectly if the bonus damage type is anything other than physical. The 2 types (physical and elemental) also display differently like so:

+200-450 Fire Damage

and

+200 Minimum Damage +250 Maximum Damage

If we were to calculate the Skorn example as elemental, we'd do it like so:

((507 + 106) * 1.5) + 381 + 286 = 1586.5

Which looks like this with attributes instead:

((Damage_Weapon_Min#Physical + Damage_Weapon_Delta#Physical) * (1 + Damage_Weapon_Percent_Bonus#Physical) + Damage_Weapon_Bonus_Delta#Physical + Damage_Weapon_Bonus_Min#Physical

The Problem:

Unfortunately, this just doesn't work since it's way off of what the actual maximum value should be. I just don't know where to go from here, so any assistance would be greatly appreciated.

share|improve this question
    
That Skorn you're linking to has a max damage of 1744; how does that verify that the maximum is 1762? –  Frank Oct 24 '12 at 20:18
    
Sorry, what I meant with the example is that it can roll a maximum damage of much higher than what my standard formula produces, giving credence to the 1762.5 cap. –  Matt Oct 24 '12 at 20:21
    
One thing to make note of is that Minimum Damage is added first; if that pushes it above the base rolled Maximum Damage, Maximum automatically becomes Minimum + 1, and then the Maximum bonus is added to it. It doesn't look like that's happening here, though. –  Frank Oct 24 '12 at 20:25
    
Where'd the 507 in your example come from? Looks like it should be 515 with a delta of 114. us.battle.net/d3/en/item/decapitator –  bwarner Oct 24 '12 at 22:01
    
Data is from the API link I gave. The base item range is really not a factor at this point since adding that in doesn't fix it (8 min 16 max difference). –  Matt Oct 24 '12 at 22:11
add comment

1 Answer 1

up vote 1 down vote accepted

I think you have your order of operations wrong. The 50% bonus should be applied last. Take a look at the image you linked. The base damage possible for the axe is 507. If you multiply that by 1.5 and then add 282, you're still well short of the minimum damage displayed on the weapon. But if you instead take 507 and add 282, then multiply by 1.5, you end up at 1183.5, rounded up to the 1184 displayed on the weapon. 1185 + (373 * 1.5) gives you the 1744 top end.

So (507 + 286) * 1.5 = 1189.5 as the min damage. That gets rounded up to 1190, and the max damage has to be higher, so it starts at 1191. 1191 + (381 * 1.5) = 1762.5. Note that the delta is meaningless here, because it is lower than the min damage boost anyway.

share|improve this answer
    
Thanks for this, I'll plug it into my app and see if it solves the issue on all the affected items (which I'm sure it will). I'll be doing this in a few hours and when I come back I'll make sure to mark the answer. –  Matt Oct 25 '12 at 1:19
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.