Anonymous

Template:Damage/doc: Difference between revisions

From Elwiki
No edit summary
Line 73: Line 73:
<div class="mw-collapsible mw-collapsed"><div class="collapsible-header">Code</div><div class="mw-collapsible-content"><pre><nowiki>
<div class="mw-collapsible mw-collapsed"><div class="collapsible-header">Code</div><div class="mw-collapsible-content"><pre><nowiki>
{{Damage
{{Damage
|true
|Rose
|dmg=845, 232
|dmg=845, 232
|pvp_dmg=272, 74
|pvp_dmg=272, 74
|hits=1, 25
|hits=1, 25
|heavy=true
|heavy=true
|passive1=ECP System
|passive1=Musket Master
}}
}}
{| 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}}
|}
</nowiki></pre></div></div>
</nowiki></pre></div></div>
Result:
Result:
{{Damage
{{Damage
|true
|Rose
|dmg=845, 232
|dmg=845, 232
|pvp_dmg=272, 74
|pvp_dmg=272, 74
|hits=1, 25
|hits=1, 25
|heavy=true
|heavy=true
|passive1=ECP System
|passive1=Musket Master
}}
}}
{| 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}}
|}
<templatedata>
<templatedata>
{
{
"params": {
"params": {
"1": {
"aliases": [
"table"
],
"label": "Generate Table",
"description": "If true, attemps to generate a table out of the variables automatically.",
"type": "boolean",
"default": "true",
"autovalue": "true",
"suggested": true
},
"2": {
"aliases": [
"char"
],
"label": "Character",
"description": "If generating a table, provide the character's name so that the template knows which color to use for the headers.",
"example": "Laby",
"type": "string",
"default": "Elsword",
"suggested": true
},
"dmg": {
"dmg": {
"label": "Damage (PvE)",
"label": "Damage (PvE)",
Line 309: Line 295:
"description": "Applies extra damage to 'total_damage_pvp' fields (but not 'each_damage_pvp') when 'count' is used.",
"description": "Applies extra damage to 'total_damage_pvp' fields (but not 'each_damage_pvp') when 'count' is used.",
"type": "string"
"type": "string"
},
"count_name": {
"label": "Instance Name",
"description": "When generating a table and 'count' is used, specify the damage part that the skill is divided to.",
"example": "Orb",
"type": "string",
"default": "Instance"
},
"append": {
"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.",
"example": "1, Over Strike",
"type": "string"
},
"combine": {
"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.",
"example": "2, 3",
"type": "string"
},
"combine_suffix": {
"label": "Suffix after combination",
"description": "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",
"type": "string"
},
"no_max": {
"label": "No Max Damage",
"description": "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",
"type": "boolean"
},
"use_avg": {
"label": "Use Average For Instances",
"description": "When generating a table, ignores 'each_damage' fields, and instead generates the regular 'avg_damage' fields.",
"example": "true",
"type": "boolean"
}
}
},
},
"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 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.",
"paramOrder": [
"paramOrder": [
"1",
"2",
"dmg",
"dmg",
"pvp_dmg",
"pvp_dmg",
Line 342: Line 367:
"count_extra",
"count_extra",
"count_extra_hits",
"count_extra_hits",
"count_extra_pvp"
"count_extra_pvp",
"count_name",
"append",
"combine",
"combine_suffix",
"no_max",
"use_avg"
],
],
"format": "block"
"format": "block"
}
}
</templatedata>
</templatedata>