Template:Damage/doc: Difference between revisions

From Elwiki
mNo edit summary
 
(28 intermediate revisions by 3 users not shown)
Line 2: Line 2:
== Overview ==
== Overview ==
This template is used for the '''Total Damage''' section on skill pages in order to avoid hardcoding mathematical formulas and make variables shorter, simply composing them based on the arguments provided. You can also easily edit the generated variables afterwards.
This template is used for the '''Total Damage''' section on skill pages in order to avoid hardcoding mathematical formulas and make variables shorter, simply composing them based on the arguments provided. You can also easily edit the generated variables afterwards.
If wanted, it can also generate the whole table, depending on how complicated the skill's structure is.


== Parameters ==
== Parameters ==
*'''dmg''', '''pvp_dmg''' - specifies damage values
{{InfoBanner|text=<br/>
*'''awk_dmg''', '''pvp_awk_dmg''' - in [[Awakening Mode]]
*For damage and hit count values, prefix the parameter with "pvp_".
**You can also generate [[Ara]]'s cancel skills by prefixing them with "cancel_" (for PvP, its prefix comes first, e.g. ''pvp_cancel_avg_hits'').
*For min/max values of damage and hits, suffix the parameter with "_min" or "_max" (e.g. ''avg_hits_max'').|imagesize=30}}
*'''dmg''' - specifies damage values
*'''awk_dmg''' - in [[Awakening Mode]]
*'''hits''' - specifies maximum hit counts. If not provided, defaults to 1 for all damage effects.
*'''hits''' - specifies maximum hit counts. If not provided, defaults to 1 for all damage effects.
*'''count''' - used for skills like [[Clementine]] or [[Enough Mineral]]. Generates 2 variable types: ''each_damage'' and ''total_damage''
**'''count_extra''', '''count_extra_hits''', '''count_extra_pvp''' - adds another damage effect(s) to ''total_damage''
*'''awk_hits''' - in [[Awakening Mode]]
*'''awk_hits''' - in [[Awakening Mode]]
*'''avg_hits''' - specifies average hit counts
*'''avg_hits''' - specifies average hit counts
Line 23: Line 26:
*'''format''' - enables pretty-printing of the numbers (applies % sign and ''<nowiki>{{formatnum:}}</nowiki>''). 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.
*'''format''' - enables pretty-printing of the numbers (applies % sign and ''<nowiki>{{formatnum:}}</nowiki>''). 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.
*'''dump''' - if '''true''', write out the generated variables. Useful when debugging, off by default. ''Warning'': disables the variables from generating.
*'''dump''' - if '''true''', write out the generated variables. Useful when debugging, off by default. ''Warning'': disables the variables from generating.
*'''prefix''' - if specified, appends the provided string to every output variable. Useful when dealing with skills like [[Heaven's Fist - Pressure#Total Damage|Heaven's Fist - Pressure]] or [[Ex-S Viper#Total_Damage|Ex-S Viper]].
*'''prefix''' - if specified, appends the provided string to every output variable. Useful when dealing with skills like [[Heaven's Fist - Pressure#Total Damage|Heaven's Fist - Pressure]] or [[EX-S Viper#Total_Damage|EX-S Viper]].
*'''range_min''', '''range_max''' - applies a damage increase to all values and moves them to separate variables. If the value is different between PvE and PvP, provide the PvP value after a comma. If '''range_min''' not specified, the minimum value will be the base total damage.
*'''range_min''', '''range_max''' - applies a damage increase to all values and moves them to separate variables. If the value is different between PvE and PvP, provide the PvP value after a comma. If '''range_min''' not specified, the minimum value will be the base total damage.
**Variables created:
**Variables created:
***''min_''total_damage[...]
***''max_''total_damage[...]
***''range_''total_damage[...] - displays both minimum and maximum total damage separated with a "~", ex. 17,342% ~ 23,234%
***''range_''total_damage[...] - displays both minimum and maximum total damage separated with a "~", ex. 17,342% ~ 23,234%
**Can behave in two different ways.
**Can behave in two different ways.
***By default, it's considered that only numbers are provided. This will work exactly as expected (damage value multiplied by min/max damage increase).
***By default, it's considered that only numbers are provided. This will work exactly as expected (damage value multiplied by min/max damage increase).
***With '''range_min_count''' or '''range_max_count''' specified. Value provided for this parameter is the damage increase per stage. This is intended for things like [[Sentimental Point System]], where the character increases their damage depending on points consumed. The value of this parameter needs to have 100% subtracted to work as intended (ex. 15%/1.15x damage increase per stage = the value should be 0.15).
***With '''range_min_count''' or '''range_max_count''' specified. Value provided for this parameter is the damage increase per stage. This is intended for things like [[Sentimental Point System]], where the character increases their damage depending on points consumed.
****The helping parameters specify how many available points should be used.
****The helping parameters specify how many available points should be used.
**This argument is separated to min/max due to some skills being able to recover points on cast, and then consume them immediately, making some of the damage buff unavoidable.
**This argument is separated to min/max due to some skills being able to recover points on cast, and then consume them immediately, making some of the damage buff unavoidable.
=== I18n ===
*'''lang''' - is used for multi-language support. The following changes will apply if this is set.
**Passive names are collected from translated pages' '''<nowiki>{{DISPLAYTITLE}}</nowiki>''' if exists. This acts like ''alias'' but can still be overwriten by ''alias''.
**Links will be linked to ''[page]/[lang]'' instead of ''[page]''.
**Translations will be fetched from ''Template:Damage/[lang]'' (i.e. ''Template:Damage/zh-hans'') and applied to table. Text will be unchanged if no translated text found.
**To define your translation, you should add the following to ''Template:Damage/[lang]''. <syntaxhighlight>
{{#arraydefine:$t|
original text 1 (key1)=translated text 1(value1),
original text 2 (key2)=translated text 2(value2),
...,
}}
</syntaxhighlight>
**Notable information in translations:
***''PvP'' and ''PvE'' are templates ''<nowiki>{{PvE}}</nowiki>'' and ''<nowiki>{{PvP}}</nowiki>'', translate them with key ''PvP'' and ''PvE'' and values with corresponding template title.
***Some translations do not act entirely. They are formatted with some words replaced. In such cases, translations for pattern and static words should be given. Use ''{n}'' in pattern to indicate where to substitute words. ''{n}'' starts from 1.
****''Per Group'' and ''Per {count_name}'' → Translations ''Per {1}'' and ''Group'' needed.
****''({dmp} DMP)'' → Translation ''({1} DMP)'' needed.


=== Extra ===
=== Extra ===
*The generated variables always follow this order in their names: prefix → range/min/max → damage type → awk if awakening (empty if not) → trait → passives → game mode (empty if dungeon), e.g. ''<nowiki>{{#var: range_total_damage_awk_empowered_passive1_passive2_pvp}}</nowiki>''
*The generated variables always follow this order in their names: prefix → range → damage type → awk if awakening (empty if not) → trait → passives → game mode (empty if dungeon), e.g. ''<nowiki>{{#var: range_total_damage_awk_empowered_passive1_passive2_pvp}}</nowiki>''
*When providing ''Useful'' trait and Awakening values, the values that don't change in relation to the '''hits''' or '''avg_hits''' parameter can be provided as empty, i.e. ''<nowiki>|hits=3, 10, 2|awk_hits=5,, 3</nowiki>'' resulting in the same output as typing ''<nowiki>|hits=3, 10, 2|awk_hits=5, 10, 3</nowiki>''.
<br/>
<br/>


== What works and what doesn't ==
== Tips ==
*You can provide however many damage parts you want. The ''<nowiki>{{#var: total_damage}}</nowiki>'' and ''<nowiki>{{#var: total_damage_pvp}}</nowiki>'' variables will be composed automatically.
*You can provide however many damage parts you want. The ''<nowiki>{{#var: total_damage}}</nowiki>'' and ''<nowiki>{{#var: total_damage_pvp}}</nowiki>'' variables will be composed automatically.
**'''Count''' will not work with '''Useful''' or [[Awakening Mode]].
**Using ranges stops regular variables from generating.
**You can't specify separate hit counts for PvP in one template call. This is a thing for too small amount of skills (e.g. [[Lightning Shower]]) and wasn't worth implementing. Can get around it using the '''prefix''' argument.
*Damage range only works with damage buffs, not when hit counts are changed.
**Check '''[[Phoenix Wings#Total Damage|this page]]''' for hints.
*This template automatically rounds values to the second decimal place, so no need to worry about it.
*This template automatically rounds values to the second decimal place, so no need to worry about it.
*Certain values are inherited, either when they are empty or contain "i" in them (handy when you want to perform math operations on the numbers). ''Dev tip: to see the exact order, check DAMAGE_CONFIG each damage_numbers and hit_counts fields. The first value in each is the one that inherits from the rest if they exist.''
<br/>
<br/>


Line 96: Line 112:
"params": {
"params": {
"1": {
"1": {
"aliases": [
"table"
],
"label": "Generate Table",
"label": "Generate Table",
"description": "If true, attemps to generate a table out of the variables automatically.",
"description": "If true, attemps to generate a table out of the variables automatically.",
Line 146: Line 159:
},
},
"hits": {
"hits": {
"label": "Hits",
"label": "Hits (PvE)",
"description": "Hit counts for each damage effect, separated by commas. Different hit counts for PvP not supported.",
"description": "Hit counts for each damage effect, separated by commas. If not provided, it will equal to 1 for all values provided with 'dmg'.",
"example": "13, 23",
"example": "13, 23",
"type": "string",
"type": "string",
"default": "1 (for all damage effects)",
"default": "1",
"autovalue": "0",
"autovalue": "0",
"suggested": true
"suggested": true
Line 199: Line 212:
"description": "Provided as a fraction lower than 1.",
"description": "Provided as a fraction lower than 1.",
"example": "0.75",
"example": "0.75",
"type": "number"
"type": "number",
"aliases": [
"useful"
]
},
},
"heavy": {
"heavy": {
Line 222: Line 238:
"passive1": {
"passive1": {
"label": "Passive 1",
"label": "Passive 1",
"description": "Generates additional variables with passive values imbued into them. Uses arrays included in passive skill pages. Exact page name required.",
"description": "Generates additional variables with passive values imbued into them. Uses arrays included in passive skill pages. Exact page name required. The documentation only mentions 3 passives, but more also works.",
"example": "Hawkeye",
"example": "Hawk Eye",
"type": "wiki-page-name"
"type": "wiki-page-name"
},
},
"passive2": {
"passive2": {
"label": "Passive 2",
"label": "Passive 2",
"description": "Generates additional variables with passive values imbued into them. Uses arrays included in passive skill pages. Exact page name required.",
"example": "Arrow Mastery",
"type": "wiki-page-name"
},
"Passive 3": {
"label": "Passive 3",
"description": "Generates additional variables with passive values imbued into them. Uses arrays included in passive skill pages. Exact page name required.",
"type": "wiki-page-name"
"type": "wiki-page-name"
},
},
Line 242: Line 251:
"example": "true",
"example": "true",
"type": "boolean",
"type": "boolean",
"default": "false"
"default": "true"
},
},
"dump": {
"dump": {
"label": "Print all variables",
"label": "Print all variables",
"description": "Dumps all generated variables in a list. Warning: disables the actual variables from generating.",
"description": "Dumps a <pre> with all damage numbers.",
"example": "true",
"example": "true",
"type": "boolean",
"type": "boolean",
Line 278: Line 287:
"description": "If this parameter is used, it will multiply itself by range_max. Intended for mechanics like Sentimental Points with even stages of damage increase.",
"description": "If this parameter is used, it will multiply itself by range_max. Intended for mechanics like Sentimental Points with even stages of damage increase.",
"type": "number"
"type": "number"
},
"count_extra": {
"label": "Extra damage to merged instances",
"description": "Applies extra damage to 'total_damage' fields (but not 'each_damage') when 'count' is used.",
"example": "150",
"type": "number"
},
"count_extra_hits": {
"label": "Extra damage to merged instances (hit count)",
"description": "Applies extra damage to 'total_damage' fields (but not 'each_damage') when 'count' is used. (Provide hit count)",
"example": "5",
"type": "number"
},
"count_extra_pvp": {
"label": "Extra damage to merged instances (PvP)",
"description": "Applies extra damage to 'total_damage_pvp' fields (but not 'each_damage_pvp') when 'count' is used.",
"type": "string"
},
},
"count_name": {
"count_name": {
Line 305: Line 297:
"append": {
"append": {
"label": "System Effect",
"label": "System Effect",
"description": "When generating a table, specify a passive/system effect that will consider everything in two cases - no effect and effect present. The first part is the passive's number provided with 'passive[1-3]' beforehand. The second part is optional, and is used to give it an alternate name.",
"description": "When generating a table, specify a passive/system effect that will consider everything in two cases - no effect and effect present. The first part is the passive's number provided with 'passive[number]' beforehand. The second part is optional, and is used to give it an alternate name.",
"example": "1, Over Strike",
"example": "1, Over Strike",
"type": "string"
"type": "string"
Line 311: Line 303:
"combine": {
"combine": {
"label": "Combined Passives",
"label": "Combined Passives",
"description": "A comma-separated list of passives defined via 'passive[1-3]' to merge when generating a table. For example, providing 'Key of Proof' as passive 1, 'Musket Master' as passive2 and 'combine' as '1, 2' will output 'Key of Proof/Musket Master' to the header, and correctly mix-match the damage values.",
"description": "A comma-separated list of passives defined via 'passive[number]' to merge when generating a table. For example, providing 'Key of Proof' as passive 1, 'Musket Master' as passive2 and 'combine' as '1, 2' will output 'Key of Proof/Musket Master' to the header, and correctly mix-match the damage values.",
"example": "2, 3",
"example": "2, 3",
"type": "string"
"type": "string"
Line 329: Line 321:
"use_avg": {
"use_avg": {
"label": "Use Average For Instances",
"label": "Use Average For Instances",
"description": "When generating a table, ignores 'each_damage' fields, and instead generates the regular 'avg_damage' fields.",
"description": "When generating a table, ignores 'each_damage' fields, and instead generates the regular 'avg_damage' fields. The 'total_damage' fields are still calculated using the 'count' argument.",
"example": "true",
"example": "true",
"type": "boolean"
"type": "boolean"
},
"alias1": {
"label": "First Passive Alt. Name",
"type": "string"
},
"suffix1": {
"label": "First Passive Suffix",
"type": "string"
},
"alias2": {
"label": "Second Passive Alt. Name",
"type": "string"
},
"suffix2": {
"label": "Second Passive Suffix",
"type": "string"
},
"alias3": {
"label": "Third Passive Alt. Name",
"type": "string"
},
"suffix3": {
"label": "Third Passive Suffix",
"type": "string"
},
"perm_buff": {
"label": "Permanent Effect",
"description": "A buff effect for the whole skill.",
"example": "1.5"
},
"pvp_perm_buff": {
"label": "Permanent Effect (PvP)",
"description": "A buff effect for the whole skill.",
"example": "1.25"
},
"pvp_hits": {
"label": "Hits (PvP)"
},
"pvp_awk_hits": {
"label": "Hits in Awakening (PvP)"
},
"pvp_avg_hits": {
"label": "Average Hits (PvP)"
},
"pvp_avg_awk_hits": {
"label": "Average Hits in Awakening (PvP)"
},
"pvp_hits_useful": {
"label": "Hits (Useful trait, PvP)"
},
"pvp_awk_hits_useful": {
"label": "Hits in Awakening (Useful trait, PvP)"
},
"pvp_avg_awk_hits_useful": {
"label": "Average Hits in Awakening (Useful trait, PvP)"
},
"passive3": {
"label": "Passive 3",
"type": "wiki-page-name"
},
"dump_names": {
"label": "Dump Names",
"description": "Replace numbers with variable names on the generated table for debugging purposes.",
"example": "true",
"type": "boolean"
},
"dmp": {
"label": "Dynamo Configuration Mode",
"description": "If 'true', displays 'Dynamo Configuration (3 DMP)' instead of 'Awakening Mode' on the generated table. Provide a number if you want to modify the default amount of DMP. 'false' disables DMP notice.",
"example": "4",
"type": "unknown"
},
"awk_alias": {
"label": "Awakening Text Alias",
"description": "Replace the phrase \"Awakening Mode\" with something else. After a comma, one can insert the display text. If not provided, it will fallback to the first part.",
"example": "Moonlight System, Blood Moon",
"type": "string"
},
"bug": {
"label": "Free Training Hit Count Bug",
"description": "Generates a short notice above the table that this skill may report wrong on damage in Free Training areas.",
"example": "true",
"type": "boolean"
},
"dump_table_data": {
"label": "Dump Table Data",
"description": "(Advanced) Dumps the generated table structure contained in a LUA table. Useful for debugging the structure.",
"example": "true",
"type": "boolean"
},
"display_separated": {
"label": "Display separated passives when combined",
"description": "Combining removes the actual single passive from being generated in the table, but you can just this behavior with this argument. Takes a comma-separated list of passive indexes that you want displayed on their own.",
"example": "2,3",
"type": "string"
},
"passive_define1": {
"label": "Custom Passive 1",
"description": "Able to define a custom passive in the following format: [pve value, pvp value, name]. The name will be made into a link, and the display text can be changed using alias[number], just like for normal passives.",
"example": "1.4, 1.2, Blood Hit",
"type": "string"
},
"passive_define2": {
"label": "Custom Passive 2",
"type": "string"
},
"passive_define3": {
"label": "Custom Passive 3",
"type": "string"
},
"lang": {
"label": "Language Suffix",
"description": "A language suffix for multi-language variants.",
"example": "zh-hans"
}
}
},
},
"description": "This template is used for the Total Damage section on skill pages in order to avoid hardcoding mathematical formulas and make variables shorter, simply composing them based on the arguments provided. You can also easily edit the generated variables afterwards. Please check the template's page for detailed information.",
"description": "This template is used for the Total Damage section on skill pages to avoid hardcoding mathematical formulas. It can generate a table for you in generic cases, or make defining variables easier, simply composing them based on the arguments provided. You can also easily edit the generated variables afterwards. Please check the template's page for detailed information.",
"paramOrder": [
"paramOrder": [
"1",
"1",
"2",
"2",
"lang",
"dmg",
"dmg",
"pvp_dmg",
"pvp_dmg",
Line 343: Line 450:
"pvp_awk_dmg",
"pvp_awk_dmg",
"hits",
"hits",
"pvp_hits",
"count",
"count",
"awk_hits",
"awk_hits",
Line 357: Line 465:
"passive1",
"passive1",
"passive2",
"passive2",
"Passive 3",
"passive3",
"format",
"format",
"dump",
"dump",
Line 365: Line 473:
"range_min_count",
"range_min_count",
"range_max_count",
"range_max_count",
"count_extra",
"count_extra_hits",
"count_extra_pvp",
"count_name",
"count_name",
"append",
"append",
Line 373: Line 478:
"combine_suffix",
"combine_suffix",
"no_max",
"no_max",
"use_avg"
"use_avg",
"alias1",
"alias2",
"alias3",
"suffix1",
"suffix2",
"suffix3",
"perm_buff",
"pvp_perm_buff",
"pvp_awk_hits",
"pvp_avg_hits",
"pvp_avg_awk_hits",
"pvp_hits_useful",
"pvp_awk_hits_useful",
"pvp_avg_awk_hits_useful",
"dump_names",
"dmp",
"awk_alias",
"display_separated",
"bug",
"dump_table_data",
"passive_define1",
"passive_define2",
"passive_define3"
],
],
"format": "block"
"format": "block"
}
}
</templatedata>
</templatedata>

Latest revision as of 15:17, 12 March 2024

Information: This template is using a Scribunto Module: Module:Damage.

Overview

This template is used for the Total Damage section on skill pages in order to avoid hardcoding mathematical formulas and make variables shorter, simply composing them based on the arguments provided. You can also easily edit the generated variables afterwards. If wanted, it can also generate the whole table, depending on how complicated the skill's structure is.

Parameters

Information:
  • For damage and hit count values, prefix the parameter with "pvp_".
    • You can also generate Ara's cancel skills by prefixing them with "cancel_" (for PvP, its prefix comes first, e.g. pvp_cancel_avg_hits).
  • For min/max values of damage and hits, suffix the parameter with "_min" or "_max" (e.g. avg_hits_max).
  • dmg - specifies damage values
  • awk_dmg - in Awakening Mode
  • hits - specifies maximum hit counts. If not provided, defaults to 1 for all damage effects.
  • awk_hits - in Awakening Mode
  • avg_hits - specifies average hit counts
  • avg_awk_hits - in Awakening Mode
  • hits_useful - specifies maximum hit counts with the Useful trait
  • awk_hits_useful - in Awakening Mode
  • avg_hits_useful - specifies average hit counts with the Useful trait
  • avg_awk_hits_useful - in Awakening Mode
  • useful_penalty - specifies damage decrease from the Useful trait in 0.value format, e.g. 0.75
  • 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
  • passive[n] - enables the nth passive variables, please specify with the exact passive skill's name. If more than one provided, combined variables will also be created, i.e. passive1_passive2 (max 3).
  • 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.
  • dump - if true, write out the generated variables. Useful when debugging, off by default. Warning: disables the variables from generating.
  • prefix - if specified, appends the provided string to every output variable. Useful when dealing with skills like Heaven's Fist - Pressure or EX-S Viper.
  • range_min, range_max - applies a damage increase to all values and moves them to separate variables. If the value is different between PvE and PvP, provide the PvP value after a comma. If range_min not specified, the minimum value will be the base total damage.
    • Variables created:
      • range_total_damage[...] - displays both minimum and maximum total damage separated with a "~", ex. 17,342% ~ 23,234%
    • Can behave in two different ways.
      • By default, it's considered that only numbers are provided. This will work exactly as expected (damage value multiplied by min/max damage increase).
      • With range_min_count or range_max_count specified. Value provided for this parameter is the damage increase per stage. This is intended for things like Sentimental Point System, where the character increases their damage depending on points consumed.
        • The helping parameters specify how many available points should be used.
    • This argument is separated to min/max due to some skills being able to recover points on cast, and then consume them immediately, making some of the damage buff unavoidable.

I18n

  • lang - is used for multi-language support. The following changes will apply if this is set.
    • Passive names are collected from translated pages' {{DISPLAYTITLE}} if exists. This acts like alias but can still be overwriten by alias.
    • Links will be linked to [page]/[lang] instead of [page].
    • Translations will be fetched from Template:Damage/[lang] (i.e. Template:Damage/zh-hans) and applied to table. Text will be unchanged if no translated text found.
    • To define your translation, you should add the following to Template:Damage/[lang].
      {{#arraydefine:$t|
      original text 1 (key1)=translated text 1(value1),
      original text 2 (key2)=translated text 2(value2),
      ...,
      }}
    • Notable information in translations:
      • PvP and PvE are templates {{PvE}} and {{PvP}}, translate them with key PvP and PvE and values with corresponding template title.
      • Some translations do not act entirely. They are formatted with some words replaced. In such cases, translations for pattern and static words should be given. Use {n} in pattern to indicate where to substitute words. {n} starts from 1.
        • Per Group and Per {count_name} → Translations Per {1} and Group needed.
        • ({dmp} DMP) → Translation ({1} DMP) needed.

Extra

  • The generated variables always follow this order in their names: prefix → range → damage type → awk if awakening (empty if not) → trait → passives → game mode (empty if dungeon), e.g. {{#var: range_total_damage_awk_empowered_passive1_passive2_pvp}}


Tips

  • You can provide however many damage parts you want. The {{#var: total_damage}} and {{#var: total_damage_pvp}} variables will be composed automatically.
    • Using ranges stops regular variables from generating.
  • This template automatically rounds values to the second decimal place, so no need to worry about it.
  • Certain values are inherited, either when they are empty or contain "i" in them (handy when you want to perform math operations on the numbers). Dev tip: to see the exact order, check DAMAGE_CONFIG each damage_numbers and hit_counts fields. The first value in each is the one that inherits from the rest if they exist.


Example usage

Code
{{Damage
|true
|Rose
|dmg=845, 232
|pvp_dmg=272, 74
|hits=1, 25
|heavy=true
|passive1=Musket Master
}}

Result:

ModeBaseMusket Master
NormalHeavyNormalHeavy
PvE6,645%9,568.8%7,974%11,482.56%
PvP2,122%3,055.68%2,334.2%3,361.25%

This template is used for the Total Damage section on skill pages to avoid hardcoding mathematical formulas. It can generate a table for you in generic cases, or make defining variables easier, simply composing them based on the arguments provided. You can also easily edit the generated variables afterwards. Please check the template's page for detailed information.

Template parameters

This template prefers block formatting of parameters.

ParameterDescriptionTypeStatus
Generate Table1

If true, attemps to generate a table out of the variables automatically.

Default
true
Auto value
true
Booleansuggested
Character2 char

If generating a table, provide the character's name so that the template knows which color to use for the headers.

Default
Elsword
Example
Laby
Stringsuggested
Language Suffixlang

A language suffix for multi-language variants.

Example
zh-hans
Unknownoptional
Damage (PvE)dmg

Specifies damage values, separated by commas.

Example
50, 125
Auto value
0
Stringrequired
Damage (PvP)pvp_dmg

Specifies damage values, separated by commas.

Example
50, 125
Auto value
0
Stringrequired
Damage in Awakening (PvE)awk_dmg

no description

Default
inherited from 'dmg'
Stringoptional
Damage in Awakening (PvP)pvp_awk_dmg

no description

Default
inherited from 'pvp_dmg'
Stringoptional
Hits (PvE)hits

Hit counts for each damage effect, separated by commas. If not provided, it will equal to 1 for all values provided with 'dmg'.

Default
1
Example
13, 23
Auto value
0
Stringsuggested
Hits (PvP)pvp_hits

no description

Unknownoptional
Count of Instancescount

Used for skills like Clementine or Enough Mineral that spawn multiple instances of the same object. Generates 2 variable types: each_damage and total_damage.

Example
5
Numberoptional
Hits in Awakeningawk_hits

no description

Default
inherited from 'hits'
Stringoptional
Average Hitsavg_hits

Hit counts achievable on average-sized targets, such as Free Training Dummies.

Default
1 (for all damage effects)
Example
7, 13, 5
Auto value
Stringoptional
Average Hits in Awakeningavg_awk_hits

no description

Default
inherited from 'avg_hits'
Stringoptional
Hits (Useful trait)hits_useful

Hit counts with the Useful trait. Requires 'useful_penalty' to make it work.

Stringoptional
Hits (Useful trait) in Awakeningawk_hits_useful

no description

Stringoptional
Average Hits (Useful trait)avg_hits_useful

no description

Stringoptional
Average Hits (Useful trait) in Awakeningavg_awk_hits_useful

no description

Stringoptional
Damage decrease from Useful traituseful_penalty useful

Provided as a fraction lower than 1.

Example
0.75
Numberoptional
Heavy traitheavy

If 'true', applies the Heavy trait.

Default
false
Example
true
Booleanoptional
Enhanced traitenhanced

If 'true', applies the standard damage decrease from the Enhanced trait. Can provide a custom number lower than 1.

Example
true (or) 0.6
Stringoptional
Empowered traitempowered

If 'true', applies the standard damage increase from the Empowered trait. Can provide a custom number.

Example
1.3
Numberoptional
Passive 1passive1

Generates additional variables with passive values imbued into them. Uses arrays included in passive skill pages. Exact page name required. The documentation only mentions 3 passives, but more also works.

Example
Hawk Eye
Page nameoptional
Passive 2passive2

no description

Page nameoptional
Passive 3passive3

no description

Page nameoptional
Pretty-printformat

Wraps the variable output in the formatnum parser function and appends the % sign.

Default
true
Example
true
Booleanoptional
Print all variablesdump

Dumps a <pre> with all damage numbers.

Default
false
Example
true
Booleanoptional
Prefixprefix

Adds a string to every generated variable's name.

Example
sometext
Stringoptional
Range (Max)range_max

The maximum damage of a skill, after applying a certain multiplier. PvP value comes after a comma.

Example
2.5
Numberoptional
Range (Min)range_min

Minimal damage of the skill. Only specify if there is an effect that increases damage conditionally, and a part of it cannot be avoided. PvP value comes after a comma.

Example
1.1
Stringoptional
Range (Min) Stage Versionrange_min_count

If this parameter is used, it will multiply itself by range_min. Intended for mechanics like Sentimental Points with even stages of damage increase. Use when casting the skill with no points/gauge that increases damage per stage is impossible.

Numberoptional
Range (Max) Stage Versionrange_max_count

If this parameter is used, it will multiply itself by range_max. Intended for mechanics like Sentimental Points with even stages of damage increase.

Numberoptional
Instance Namecount_name

When generating a table and 'count' is used, specify the damage part that the skill is divided to.

Default
Instance
Example
Orb
Stringoptional
System Effectappend

When generating a table, specify a passive/system effect that will consider everything in two cases - no effect and effect present. The first part is the passive's number provided with 'passive[number]' beforehand. The second part is optional, and is used to give it an alternate name.

Example
1, Over Strike
Stringoptional
Combined Passivescombine

A comma-separated list of passives defined via 'passive[number]' to merge when generating a table. For example, providing 'Key of Proof' as passive 1, 'Musket Master' as passive2 and 'combine' as '1, 2' will output 'Key of Proof/Musket Master' to the header, and correctly mix-match the damage values.

Example
2, 3
Stringoptional
Suffix after combinationcombine_suffix

When generating a table and using 'combine', you can add a piece of extra text at the end of the header. The value is automatically preceded by a space.

Example
Used midair
Stringoptional
No Max Damageno_max

When generating a table, tell the template not to generate the 'Maximum' fields at all. It will also try to make it look as good as possible.

Example
true
Booleanoptional
Use Average For Instancesuse_avg

When generating a table, ignores 'each_damage' fields, and instead generates the regular 'avg_damage' fields. The 'total_damage' fields are still calculated using the 'count' argument.

Example
true
Booleanoptional
First Passive Alt. Namealias1

no description

Stringoptional
Second Passive Alt. Namealias2

no description

Stringoptional
Third Passive Alt. Namealias3

no description

Stringoptional
First Passive Suffixsuffix1

no description

Stringoptional
Second Passive Suffixsuffix2

no description

Stringoptional
Third Passive Suffixsuffix3

no description

Stringoptional
Permanent Effectperm_buff

A buff effect for the whole skill.

Example
1.5
Unknownoptional
Permanent Effect (PvP)pvp_perm_buff

A buff effect for the whole skill.

Example
1.25
Unknownoptional
Hits in Awakening (PvP)pvp_awk_hits

no description

Unknownoptional
Average Hits (PvP)pvp_avg_hits

no description

Unknownoptional
Average Hits in Awakening (PvP)pvp_avg_awk_hits

no description

Unknownoptional
Hits (Useful trait, PvP)pvp_hits_useful

no description

Unknownoptional
Hits in Awakening (Useful trait, PvP)pvp_awk_hits_useful

no description

Unknownoptional
Average Hits in Awakening (Useful trait, PvP)pvp_avg_awk_hits_useful

no description

Unknownoptional
Dump Namesdump_names

Replace numbers with variable names on the generated table for debugging purposes.

Example
true
Booleanoptional
Dynamo Configuration Modedmp

If 'true', displays 'Dynamo Configuration (3 DMP)' instead of 'Awakening Mode' on the generated table. Provide a number if you want to modify the default amount of DMP. 'false' disables DMP notice.

Example
4
Unknownoptional
Awakening Text Aliasawk_alias

Replace the phrase "Awakening Mode" with something else. After a comma, one can insert the display text. If not provided, it will fallback to the first part.

Example
Moonlight System, Blood Moon
Stringoptional
Display separated passives when combineddisplay_separated

Combining removes the actual single passive from being generated in the table, but you can just this behavior with this argument. Takes a comma-separated list of passive indexes that you want displayed on their own.

Example
2,3
Stringoptional
Free Training Hit Count Bugbug

Generates a short notice above the table that this skill may report wrong on damage in Free Training areas.

Example
true
Booleanoptional
Dump Table Datadump_table_data

(Advanced) Dumps the generated table structure contained in a LUA table. Useful for debugging the structure.

Example
true
Booleanoptional
Custom Passive 1passive_define1

Able to define a custom passive in the following format: [pve value, pvp value, name]. The name will be made into a link, and the display text can be changed using alias[number], just like for normal passives.

Example
1.4, 1.2, Blood Hit
Stringoptional
Custom Passive 2passive_define2

no description

Stringoptional
Custom Passive 3passive_define3

no description

Stringoptional