Weapon Damage Calculation
#22
lemekim,Apr 1 2003, 04:36 AM Wrote:It seems that if the enhanced damage was not a part of the weapon prefix or suffix, the +1 stated in the guide does not get added when multiplying to get the final damage, even if you add a jewel or rune. So you formula will look actually like this:

[[(2-7) * (1.5)] * 1.25 + 1 max (superior bonus)] = 3-13

[] - rounded down

At least I think this is what happens... I seem to be very prone to confusion myself  :unsure:
Trying to put everything in one master equation is usually the downfall of most attempts at deriving formulas for the game. In the program many of the calculation were being handled over multiple lines of code and passing the results of one line of code to sometimes multiple different lines. A sequential series of equations can frequently yield better results, as this will match more closely what the game is doing internally.

If(ethereal)
{basedamage=basedamage*3/2} [i]integer calculations so there is truncation of any fractions, this will apply through out.

Calculate damage of enhanced damage modifiers that are part of the weapon (these would be prefix and/or suffix on the item OR if a runeword item, the superior ED% (if any) plus the runeword bonus, but not the runes themselves). This is where a +1 to base damage will be used if there are and ED% on the item itself.

Then if there are socketed items in the weapon loop through the socketed items and calculate the damage bonus of each ED% socketable item separately. There is not a +1 to basedamage on these calculations and each will have the truncation handled separately.

Then add damage the weapon to all the sub damages from the socketed items. For display of the weapon itself, only add the +min/max damage that is a part of the weapon or in the sockets. For passing the amount damage to the skill/stat damage step you would add +min/max damage from all items that are on the character.

Then the game will do the skill/stat damage modifications. All the attributes that contribute to this are summed before the calculation is done.

Then some of the special game effects would be handled, like the critical strike modification.

For the example weapon we would have
Ethereal? Yes,
Min damage = 2*3/2 = 3
Max damage = 7*3/2 = 10

First socketed item with +25% enhanced damage
Min damage = 3*25/100 = 0
Max damage = 10*25/100 = 2

And for the final damage showing on the weapon
Min damage = 3 + 0 = 3
Max damage = 10 + 2 + 1 = 13

Now if there had been two jewels socketed in the item, both with +25% Enhanced Damage, we would get
Ethereal? Yes,
Min damage = 2*3/2 = 3
Max damage = 7*3/2 = 10

First socketed item with +25% enhanced damage
Min damage = 3*25/100 = 0
Max damage = 10*25/100 = 2

Second socketed item with +25% enhanced damage
Min damage = 3*25/100 = 0
Max damage = 10*25/100 = 2

And for the final damage showing on the weapon
Min damage = 3 + 0 + 0 = 3
Max damage = 10 + 2 + 2 + 1 = 15
Which is what you would get if you actually had this item.

By the method that lemekim showed, the damage would have come out as 4 to 16; which is too high for what you would really get in the game.
Reply


Messages In This Thread
Weapon Damage Calculation - by Tommi - 03-24-2003, 08:10 PM
Weapon Damage Calculation - by Cartimandua - 03-25-2003, 08:51 PM
Weapon Damage Calculation - by Bolty - 03-26-2003, 12:36 AM
Weapon Damage Calculation - by Taem - 03-26-2003, 05:53 AM
Weapon Damage Calculation - by HunkyDory - 03-26-2003, 10:29 PM
Weapon Damage Calculation - by Tommi - 03-29-2003, 06:23 PM
Weapon Damage Calculation - by AtomicKitKat - 03-29-2003, 09:02 PM
Weapon Damage Calculation - by Ruvanal - 03-29-2003, 09:24 PM
Weapon Damage Calculation - by the Langolier - 03-30-2003, 06:45 AM
Weapon Damage Calculation - by lemekim - 03-30-2003, 07:45 AM
Weapon Damage Calculation - by Tommi - 03-30-2003, 08:29 AM
Weapon Damage Calculation - by Tommi - 03-30-2003, 08:47 AM
Weapon Damage Calculation - by Hammerman - 03-30-2003, 07:26 PM
Weapon Damage Calculation - by Jarulf - 03-30-2003, 07:57 PM
Weapon Damage Calculation - by lemekim - 03-30-2003, 09:55 PM
Weapon Damage Calculation - by Tommi - 03-31-2003, 07:34 AM
Weapon Damage Calculation - by Tommi - 03-31-2003, 07:40 AM
Weapon Damage Calculation - by lemekim - 04-01-2003, 02:40 AM
Weapon Damage Calculation - by FenrisWulf - 04-01-2003, 09:25 AM
Weapon Damage Calculation - by lemekim - 04-01-2003, 09:45 AM
Weapon Damage Calculation - by FenrisWulf - 04-01-2003, 09:48 AM
Weapon Damage Calculation - by Ruvanal - 04-02-2003, 11:18 PM
Weapon Damage Calculation - by FenrisWulf - 04-03-2003, 01:37 AM
Weapon Damage Calculation - by Tommi - 04-05-2003, 01:04 PM

Forum Jump:


Users browsing this thread: 3 Guest(s)