Template:Damage/doc
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.
Parameters
- dmg, pvp_dmg - specifies damage values
- awk_dmg, pvp_awk_dmg - in Awakening Mode
- 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
- 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:
- min_total_damage[...]
- max_total_damage[...]
- 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 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).
- 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.
- Variables created:
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. {{#var: range_total_damage_awk_empowered_passive1_passive2_pvp}}
- 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. |hits=3, 10, 2|awk_hits=5,, 3 resulting in the same output as typing |hits=3, 10, 2|awk_hits=5, 10, 3.
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.
- Count will not work with Useful or Awakening Mode.
- 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 this page for hints.
- This template automatically rounds values to the second decimal place, so no need to worry about it.
Example usage
{{Damage |dmg=845, 232 |pvp_dmg=272, 74 |hits=1, 25 |heavy=true |passive1=ECP System }} {| cellpadding="5" border="1" style="border-collapse: collapse; text-align: center" |- style="background:{{ColorSel|CharLight|Rose}}" ! rowspan=3 | Mode !! colspan=4 | Regular |- style="background:{{ColorSel|CharLight|Rose}}" ! colspan=2 | Normal !! colspan=2 | [[ECP System|Over Strike]] |- style="background:{{ColorSel|CharLight|Rose}}" ! Normal !! Heavy !! Normal !! Heavy |- ! {{PvE}} | {{#var: total_damage}} | {{#var: total_damage_heavy}} | {{#var: total_damage_passive1}} | {{#var: total_damage_heavy_passive1}} |- ! {{PvP}} | {{#var: total_damage_pvp}} | {{#var: total_damage_heavy_pvp}} | {{#var: total_damage_passive1_pvp}} | {{#var: total_damage_heavy_passive1_pvp}} |}
Result:
Mode | Regular | |||
---|---|---|---|---|
Normal | Over Strike | |||
Normal | Heavy | Normal | Heavy | |
PvE | 6,645% | 9,568.8% | 7,974% | 11,482.56% |
PvP | 2,122% | 3,055.68% | 2,546.4% | 3,666.82% |
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.
Parameter | Description | Type | Status | |
---|---|---|---|---|
Damage (PvE) | dmg | Specifies damage values, separated by commas.
| String | required |
Damage (PvP) | pvp_dmg | Specifies damage values, separated by commas.
| String | required |
Damage in Awakening (PvE) | awk_dmg | no description
| String | optional |
Damage in Awakening (PvP) | pvp_awk_dmg | no description
| String | optional |
Hits | hits | Hit counts for each damage effect, separated by commas. Different hit counts for PvP not supported.
| String | suggested |
Count of Instances | count | 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.
| Number | optional |
Hits in Awakening | awk_hits | no description
| String | optional |
Average Hits | avg_hits | Hit counts achievable on average-sized targets, such as Free Training Dummies.
| String | optional |
Average Hits in Awakening | avg_awk_hits | no description
| String | optional |
Hits (Useful trait) | hits_useful | Hit counts with the Useful trait. Requires 'useful_penalty' to make it work. | String | optional |
Hits (Useful trait) in Awakening | awk_hits_useful | no description | String | optional |
Average Hits (Useful trait) | avg_hits_useful | no description | String | optional |
Average Hits (Useful trait) in Awakening | avg_awk_hits_useful | no description | String | optional |
Damage decrease from Useful trait | useful_penalty | Provided as a fraction lower than 1.
| Number | optional |
Heavy trait | heavy | If 'true', applies the Heavy trait.
| Boolean | optional |
Enhanced trait | enhanced | If 'true', applies the standard damage decrease from the Enhanced trait. Can provide a custom number lower than 1.
| String | optional |
Empowered trait | empowered | If 'true', applies the standard damage increase from the Empowered trait. Can provide a custom number.
| Number | optional |
Passive 1 | passive1 | Generates additional variables with passive values imbued into them. Uses arrays included in passive skill pages. Exact page name required.
| Page name | optional |
Passive 2 | passive2 | Generates additional variables with passive values imbued into them. Uses arrays included in passive skill pages. Exact page name required.
| Page name | optional |
Passive 3 | Passive 3 | Generates additional variables with passive values imbued into them. Uses arrays included in passive skill pages. Exact page name required. | Page name | optional |
Pretty-print | format | Wraps the variable output in the formatnum parser function and appends the % sign.
| Boolean | optional |
Print all variables | dump | Dumps all generated variables in a list. Warning: disables the actual variables from generating.
| Boolean | optional |
Prefix | prefix | Adds a string to every generated variable's name.
| String | optional |
Range (Max) | range_max | The maximum damage of a skill, after applying a certain multiplier. PvP value comes after a comma.
| Number | optional |
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.
| String | optional |
Range (Min) Stage Version | range_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. | Number | optional |
Range (Max) Stage Version | range_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. | Number | optional |
Extra damage to merged instances | count_extra | Applies extra damage to 'total_damage' fields (but not 'each_damage') when 'count' is used.
| Number | optional |
Extra damage to merged instances (hit count) | count_extra_hits | Applies extra damage to 'total_damage' fields (but not 'each_damage') when 'count' is used. (Provide hit count)
| Number | optional |
Extra damage to merged instances (PvP) | count_extra_pvp | Applies extra damage to 'total_damage_pvp' fields (but not 'each_damage_pvp') when 'count' is used. | String | optional |