Template:Legacy variant table row: Difference between revisions

From Path of Exile Wiki
Jump to navigation Jump to search
(Undo revision 1189732 by Vinifera7 (talk))
Tag: Undo
(Fixed display issues and issues with parameter handling.)
Line 1: Line 1:
{{legacy variant table header}}
<noinclude>{| class="wikitable"
<onlyinclude>{{!}}-
</noinclude>|-
{{!}} {{#if: {{#vardefineecho:versionB| {{#explode:{{{version|{{{1|}}}}}}|-|0}} }}
| [[Version {{trim| {{{version|{{{1}}}}}} }}|{{trim| {{{version|{{{1}}}}}} }}]]<!--
    | {{#if: {{#vardefineecho:versionA| {{#explode:{{{version|{{{1|}}}}}}|-|1}} }}
-->{{#if: {{{base|}}} | {{!}} {{{base}}} }}<!--
        | [[Version {{#var:versionA}}{{!}}{{#var:versionA}}]] <br>-<br> [[Version {{#var:versionB}}{{!}}{{#var:versionB}}]]
-->{{#if: {{{level|}}} | {{!}} {{c|value|{{{level}}}}} }}
        | {{#ifeq:{{#rpos:{{{version|{{{1|}}}}}}|-}}|-1
| <div class="item-stats -nopad">{{#if: {{{implicit|{{#if:{{{3|}}}|{{{2|}}}}}}}}
            | [[Version {{#var:versionB}}{{!}}{{#var:versionB}}]]
  | <div class="group legacy-stats plainlist">
            | ''present'' <br>-<br> [[Version {{#var:versionB}}{{!}}{{#var:versionB}}]]
{{{implicit|{{#if:{{{3|}}}|{{{2}}}}}}}}
        }}
</div>
    }}
}}{{#if: {{{explicit|{{{3|{{{2|}}}}}}}}}
    | {{n/a}}
  | <div class="group legacy-stats plainlist">
}}
{{{explicit|{{{3|{{{2}}}}}}}}}
{{#if: {{{base|}}}  
</div>
    | {{!}} {{{base}}}  
}}</div>
}}
<includeonly>{{#if: {{{version|{{{1|}}}}}} | {{#cargo_store:
{{#if: {{{level|}}}  
  _table = legacy_variants
    | {{!}} {{c|value|{{{level}}}}}  
  |removal_version = {{{version|{{{1|}}}}}}
}}
  |implicit_stat_text = {{{implicit|{{#if:{{{3|}}}|{{{2|}}}}}}}}
{{!}} {{#if: {{{implicit|{{{2|}}}}}} {{{explicit|{{{random|{{{3|}}}}}}}}}
  |explicit_stat_text = {{{explicit|{{{3|{{{2|}}}}}}}}}
    | <div class="item-stats -nopad">{{#if: {{{implicit|{{{2|}}}}}}  
  |stat_text = {{{implicit|{{#if:{{{3|}}}|{{{2|}}}}}}}} {{#if: {{{implicit|{{#if:{{{3|}}}|{{{2|}}}}}}}} | {{#if: {{{explicit|{{{3|{{{2|}}}}}}}}} | <span class="item-stat-separator -unique"></span> }} }} {{{explicit|{{{3|{{{2|}}}}}}}}}
        | <div class="group legacy-stats plainlist">{{{implicit|{{{2}}}}}}</div>  
  |base_item = {{{base|}}}
    }}{{#if: {{{explicit|{{{random|{{{3|}}}}}}}}}
  |required_level = {{{level|}}}
        | <div class="group legacy-stats plainlist">{{{explicit|{{{random|{{{3|}}}}}}}}}</div>  
}}{{Legacy variant table row/cargo/legacy variants/attach}} }}</includeonly><noinclude>
    }}</div>  
|}
    | {{n/a}}  
{{Documentation|Template:Legacy variant table header/doc}}
}}{{#cargo_store:
</noinclude>
_table = legacy_variants
|removal_version = {{{version|{{{1|}}}}}}
|implicit_stat_text = {{{implicit|}}}
|explicit_stat_text = {{{explicit|}}}
|stat_text = {{{implicit|{{{2|}}}}}} {{#if: {{{implicit|{{{2|}}}}}}  
    | {{#if: {{{explicit|{{{random|{{{3|}}}}}}}}}  
        | <span class="item-stat-separator -unique"></span> {{{explicit|{{{random|{{{3|}}}}}}}}}
        |
    }}
    | {{{explicit|{{{random|{{{3|}}}}}}}}}  
}}
|base_item = {{{base|}}}
|required_level = {{{level|}}}
}}</onlyinclude>
|-
|}{{#cargo_attach:
_table = legacy_variants
}}
 
{{documentation|Template:Legacy variant table header/doc}}

Revision as of 22:57, 17 July 2022

[[Version {{{1}}}|{{{1}}}]]
Template documentation[view] [edit] [history] [purge]


{{Legacy variant table header}} is used with {{legacy variant table row}} and {{legacy variant table end}} to display a table of an item's legacy variants.

Parameters

Header

{{Legacy variant table header}} takes the following parameters.

Parameter Value Optional Description
|base= bool
Whether to show a column header for base item type. Defaults to false.
|level= bool
Whether to show a column header for required level. Defaults to false.

Row

{{Legacy variant table row}} takes the following parameters.

Parameter Value Optional Description
|version= str
The version this legacy variant was discontinued. Defaults to the value of the first unnamed parameter.
|implicit= str
The implicit stat block of this legacy variant. Defaults to the value of the second unnamed parameter as long as |explicit= or the third unnamed parameter is also set.
|explicit= str
The explicit stat block of this legacy variant. Defaults to the value of the third unnamed parameter as long as |implicit= or the second unnamed parameter is also set; otherwise it defaults to the value of the second unnamed parameter.
|base= str
The base item type of this legacy variant.
|level= str
The required level of this legacy variant.

End

There are no parameters for {{legacy variant table end}}.

Usage

When constructing the stat blocks of an item's legacy variant, compare the legacy variant to the current variant and format each stat line accordingly:

  • To show that a stat line has different values in the legacy variant, format the text using {{c|mod|…}}.
  • There is no need to format the text of stats that are unchanged from the legacy variant.
{{Legacy variant table header|base=yes|level=yes}}
{{Legacy variant table row|1.2.0|base=[[Cured Quiver]]|level=22|
* {{c|mod|Adds 2 to 4 Fire Damage to Attacks}}
|
* 10% increased Attack Speed
* {{c|mod|+20 to Evasion Rating}}
* +(10-30) to maximum Mana
* {{c|mod|(30-50)% of Physical Damage Converted to Fire Damage}}
}}
{{Legacy variant table end}}

Yields:

Version discontinued Base item Required level Stats Compare each legacy variant to the current variant.
  • Stat line – Same as current variant
  • Stat line – Different from current variant

1.2.0| Cured Quiver| 22
  • Adds 2 to 4 Fire Damage to Attacks
  • 10% increased Attack Speed
  • +20 to Evasion Rating
  • +(10-30) to maximum Mana
  • (30-50)% of Physical Damage Converted to Fire Damage

Cargo

Table Declared by Attached by
legacy_variants {{Legacy variant table row/cargo/legacy variants/declare}} {{Legacy variant table row/cargo/legacy variants/attach}}