We have begun migration of most wikis to our new host, Amazon Web Services. All but the top 100 wikis are in read-only mode until the migration is complete. Estimated completion: TBD -- Update: Fri 10/20 11pm UTC - We have encountered some unexpected issues. Our staff is working around the clock to complete this process as quickly as possible. Thank you for your patience.

Template:Weapon DPS

From Diablo Wiki
Jump to: navigation, search


Documentation

Usage[edit source]

Include the following line to add the DPS calculation to a template. Remember, all the necessary parameters must be available.

Note: Use triple click to select the whole thing, it is long.

{{Weapon Dps|{{{item_damage_min|}}}|{{{item_damage_max|}}}|{{{item_damage_min_min|}}}|{{{item_damage_max_min|}}}|{{{item_damage_min_max|}}}|{{{item_damage_max_max|}}}|{{{item_speed|}}}|{{{item_speed_min|}}}|{{{item_speed_max|}}}|{{{item_holy_damage_min|}}}|{{{item_holy_damage_max|}}}|{{{item_fire_damage_min|}}}|{{{item_fire_damage_max|}}}|{{{item_cold_damage_min|}}}|{{{item_cold_damage_max|}}}|{{{item_lightning_damage_min|}}}|{{{item_lightning_damage_max|}}}|{{{item_poison_damage_min|}}}|{{{item_poison_damage_max|}}}|{{{item_arcane_damage_min|}}}|{{{item_arcane_damage_max|}}}|{{{item_property1|}}}|{{{item_property1_desc|}}}|{{{item_property2|}}}|{{{item_property2_desc|}}}|{{{item_property3|}}}|{{{item_property3_desc|}}}|{{{item_property4|}}}|{{{item_property4_desc|}}}|{{{item_property5|}}}|{{{item_property5_desc|}}}|{{{item_property6|}}}|{{{item_property6_desc|}}}|{{{item_property7|}}}|{{{item_property7_desc|}}} }}

Parameters[edit source]

In order to keep the include generic but not gigantic (yeah, it's huge anyway) named parameters are not used. This means the order of parameters is very important. While the average editor will never care I have listed out the order below. This will be very useful to anyone trying to adjust/update the formulas. If you make any additions to the parameters used, add them to the list.

  1. item_damage_min
  2. item_damage_max
  3. item_damage_min_min
  4. item_damage_max_min
  5. item_damage_min_max
  6. item_damage_max_max
  7. item_speed
  8. item_speed_min
  9. item_speed_max
  10. item_property1_desc
  11. item_property2_desc
  12. item_property3_desc
  13. item_property4_desc
  14. item_property5_desc
  15. item_property6_desc
  16. item_property7_desc
  17. item_property8_desc

Formulas[edit source]

The formulas used to calculate are detailed below. If you introduce new formulas or adjust the existing ones please update the documentation.

Property lookup[edit source]

This template no longer looks at the individual elemental damage as input. Instead it parses the properties and determines if it needs to add it to the DPS calculation.

Minimum DPS (dpsMin) Calculation[edit source]

(<Damage Min Min|Damage Min|0> + <Plus Damage Min> + <Damage Max Min|Damage Max|0> + <Plus Damage Max>)/2 * <Weapon Speed Min|Weapon Speed|0>

Note: Rounded to 2 decimal places.
Maximum DPS (dpsMax) Calculation[edit source]

(<Damage Min Max|Damage Min|0> + <Plus Damage Min> + <Damage Max Max|Damage Max|0> + <Plus Damage Max>)/2 * <Weapon Speed Max|Weapon Speed|0>

Note: Rounded to 2 decimal places.

Display[edit source]

If their is a max and min DPS value they are both displayed separated by a hyphen ( - ), otherwise a single value is displayed.

Known Issues[edit source]

  • In some cases the current formulas give a slightly different value (<1% variation) than what is listed on Blizzard's site. I have a strong feeling that variable +damage% is factored into DPS but not into their listed damage values. Since we use the listed damage values we can't 100% accurately implement their formula. As time moves forward and their full calculation is understood this template should be updated to reflect that knowledge.

Comments[edit source]

In case anyone was wondering, the properties are included for possible future use. Right now everything used in the calculation comes from explicit parameters. However, it is possible to envision a template that pulls all pertinent adds from the properties without requiring that info to have its own parameter.