ElEditors, Interface administrators, Administrators
85,550
edits
No edit summary |
mNo edit summary |
||
(18 intermediate revisions by 2 users not shown) | |||
Line 5: | Line 5: | ||
== Parameters == | == Parameters == | ||
{{InfoBanner|text=For damage and hit count values, prefix the parameter with "pvp_".|imagesize=30}} | {{InfoBanner|text=<br/> | ||
*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 | *'''dmg''' - specifies damage values | ||
*'''awk_dmg''' - in [[Awakening Mode]] | *'''awk_dmg''' - in [[Awakening Mode]] | ||
Line 29: | Line 32: | ||
**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 | ***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 === | ||
Line 37: | Line 58: | ||
<br/> | <br/> | ||
== | == 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. | ||
** | **Using ranges stops regular variables from generating. | ||
*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 220: | Line 239: | ||
"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. The documentation only mentions 3 passives, but more also works.", | "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": " | "example": "Hawk Eye", | ||
"type": "wiki-page-name" | "type": "wiki-page-name" | ||
}, | }, | ||
Line 394: | Line 413: | ||
"example": "true", | "example": "true", | ||
"type": "boolean" | "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 | "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 451: | Line 496: | ||
"dmp", | "dmp", | ||
"awk_alias", | "awk_alias", | ||
"display_separated", | |||
"bug", | "bug", | ||
"dump_table_data" | "dump_table_data", | ||
"passive_define1", | |||
"passive_define2", | |||
"passive_define3" | |||
], | ], | ||
"format": "block" | "format": "block" | ||
} | } | ||
</templatedata> | </templatedata> |