Overview

This template is used for Total Damage section on skill pages in order to avoid hardcoding mathematical formulas and not pollute the page's code that much with long variables. It simply generates the most generic variables you need based on the arguments provided. Should you need something extra, you can always export it to an external variable.

Parameters

  • dmg[n] - specifies damage value for the nth damage effect
  • pvp_dmg[n] - specifies damage value for the nth damage effect (PvP)
  • awk_dmg[n] - specifies damage value for the nth damage effect in Awakening Mode
  • hits[n] - specifies maximum hit count for the nth damage effect
  • avg_hits[n] - specifies average hit count for the nth damage effect
  • hits_useful[n] - specifies maximum hit count for the nth damage effect with the Useful trait
  • avg_hits_useful[n] - specifies average hit count for the nth damage effect with the Useful trait
  • useful_penalty - specifies damage decrease from the Useful trait in 0.value format, e.g. 0.75
  • awk_hits[n] - specifies maximum hit count for the nth damage effect in Awakening Mode
  • avg_awk_hits[n] - specifies average hit count for the nth damage effect in Awakening Mode
  • heavy - if provided with a value, enables Heavy trait
  • enhanced - if provided with a value, enables Enhanced trait
  • empowered - if true, enables Empowered trait with the standard 1.2x damage increase. It can also take another value that replaces the standard one
  • passive1 - enables first passive variables, please specify with {{#arrayprint:passive_name}} included from the passive's page
  • passive2 - same as above, this will also enable merged variables (passive 1 and passive 2 included)
  • format - enables pretty-printing of the numbers (applies % sign and {{formatnum:}}). Enabled by default, you can provide false to disable it. In order to tamper with single variables, I recommend using Template:Num that converts them back to numbers.

Extra

  • The generated variables always follow this order in their names: damage type → awk if awakening, empty if not → passives → trait → pvp suffix, e.g. {{#var: total_damage_awk_passive1_passive2_empowered_pvp}}
  • When providing Awakening values, the values that don't change in Awakening need to be provided anyway, otherwise the calculation will break.


What works and what doesn't

  • You can provide however many damage parts you want. The {{#var: total_damage}} and {{#var: total_damage_pvp}} variables will be composed automatically.
    • However, you can't specify separate hit counts for PvP. This is a thing for too small amount of skills (e.g. Lightning Shower) and wasn't worth implementing, so in that case, please use external variables for PvP.
  • A maximum of 2 passives can be considered. For the rare cases of a 3rd overlapping passive, just use external variables.
  • No range implemented. Whenever you need to add in some inner skill mechanics with the use of bonus points like Sentimental Points, do it yourself.
  • If the skill has separate values inside Awakening for damage and hit count, Useful trait can't be used (it doesn't even exist in the game at the moment, and if it does, just export to external variables and edit there).
  • This template automatically rounds values to the second decimal place, so no need to worry about it.


Example usage

Code
{{:Dark Force}}
{{Damage
|dmg1=595
|pvp_dmg1=225
|hits1=8
|heavy=true
|passive1={{#arrayprint:dark_force}}
}}
{| cellpadding="5" border="1" style="border-collapse: collapse; text-align: center"
|- style="background:{{ColorSel|CharLight|Elesis}}"
! rowspan=2 | Mode !! colspan=2 | Regular !! colspan=2 | [[Dark Force]] Annihilation Mode
|- style="background:{{ColorSel|CharLight|Elesis}}"
! Normal !! Heavy !! Normal !! Heavy
|- 
! {{PvE}} 
| {{#var: total_damage}}
| {{#var: total_damage_heavy}}
| {{#var: total_damage_passive1}}
| {{#var: total_damage_passive1_heavy}}
|- 
! {{PvP}} 
| {{#var: total_damage_pvp}}
| {{#var: total_damage_heavy_pvp}}
| {{#var: total_damage_passive1_pvp}}
| {{#var: total_damage_passive1_heavy_pvp}}
|}

Result: Lua error in ...ribunto/includes/Engines/LuaCommon/lualib/mwInit.lua at line 23: bad argument #1 to 'old_ipairs' (table expected, got nil).

Mode Regular Dark Force Annihilation Mode
Normal Heavy Normal Heavy
PvE
PvP