模板:Weapon DPS
出自【暗黑百科】DiabloWiki_凯恩之角
第8行: | 第8行: | ||
</noinclude>{{#var:dpsMin}} {{#ifeq:{{#var:dpsMin}}|{{#var:dpsMax}}| |- {{#var:dpsMax}} }}</includeonly><noinclude> | </noinclude>{{#var:dpsMin}} {{#ifeq:{{#var:dpsMin}}|{{#var:dpsMax}}| |- {{#var:dpsMax}} }}</includeonly><noinclude> | ||
- | + | {{docStart}} | |
- | + | ||
== Usage == | == Usage == | ||
Include the following line to add the DPS calculation to a template. Remember, all the necessary parameters must be available. | Include the following line to add the DPS calculation to a template. Remember, all the necessary parameters must be available. |
在2012年1月14日 (六) 11:32所做的修订版本
目录 |
Usage
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
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.
- 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
Formulas
The formulas used to calculate are detailed below. If you introduce new formulas or adjust the existing ones please update the documentation.
Plus Damage Minimum (plusDamageMin) Calculation:
<Plus Holy Damage Min> + <Plus Fire Damage Min> + <Plus Cold Damage Min> + <Plus Lightning Damage Min> + <Plus Poison Damage Min> + <Plus Arcane Damage Min>
Plus Damage Maximum (plusDamageMax) Calculation:
<Plus Holy Damage Max> + <Plus Fire Damage Max> + <Plus Cold Damage Max> + <Plus Lightning Damage Max> + <Plus Poison Damage Max> + <Plus Arcane Damage Max>
Minimum DPS (dpsMin) Calculation
(<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
(<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
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
- 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
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.