Template:Per-game field: Difference between revisions

From Pikipedia, the Pikmin wiki
Jump to navigation Jump to search
mNo edit summary
m (No longer needed.)
Line 1: Line 1:
{{#if:{{{v|}}}{{{v1|}}}{{{v2|}}}{{{v3|}}}{{{dv|}}}| {{!}}-
{{#if:{{{v|}}}{{{v1|}}}{{{v2|}}}{{{v3|}}}{{{dv|}}}|! {{{thparams}}} {{!}} {{{n}}}
! {{{thparams}}} {{!}} {{{n}}}
{{!}} {{#if:{{{v|}}} | {{{c|{{{v}}}}}} | {{#if:{{{v1|}}} | {{#if:{{only|{{{v1|}}}|{{{v2|}}}|{{{v3|}}}}}||{{icon|Pikmin (game)||x12px}}:&nbsp;}} {{{c1|{{{v1}}}}}} {{#if:{{{v2|}}}{{{v3|}}}|<br>}} }} {{#if:{{{v2|}}} | {{#if:{{only|{{{v2|}}}|{{{v1|}}}|{{{v3|}}}}}||{{icon|Pikmin 2||x12px}}:&nbsp;}} {{{c2|{{{v2}}}}}} {{#if:{{{v3|}}}|<br>}} }} {{#if:{{{v3|}}} | {{#if:{{only|{{{v3|}}}|{{{v1|}}}|{{{v2|}}}}}||{{icon|Pikmin 3||x12px}}:&nbsp;}} {{{c3|{{{v3}}}}}} }} {{#if:{{{v|}}}||{{#if:{{{v1|}}}||{{#if:{{{v2|}}}||{{#if:{{{v3|}}}|| {{{dv}}} }} }} }} }} }} }}<nowiki/><noinclude>
{{!}} {{#if:{{{v|}}} | {{{c|{{{v}}}}}} | {{#if:{{{v1|}}} | {{#if:{{only|{{{v1|}}}|{{{v2|}}}|{{{v3|}}}}}||{{icon|Pikmin (game)||x12px}}:&nbsp;}} {{{c1|{{{v1}}}}}} {{#if:{{{v2|}}}{{{v3|}}}|<br>}} }} {{#if:{{{v2|}}} | {{#if:{{only|{{{v2|}}}|{{{v1|}}}|{{{v3|}}}}}||{{icon|Pikmin 2||x12px}}:&nbsp;}} {{{c2|{{{v2}}}}}} {{#if:{{{v3|}}}|<br>}} }} {{#if:{{{v3|}}} | {{#if:{{only|{{{v3|}}}|{{{v1|}}}|{{{v2|}}}}}||{{icon|Pikmin 3||x12px}}:&nbsp;}} {{{c3|{{{v3}}}}}} }} {{#if:{{{v|}}}||{{#if:{{{v1|}}}||{{#if:{{{v2|}}}||{{#if:{{{v3|}}}|| {{{dv}}} }} }} }} }} }} }}<nowiki/><noinclude>



Revision as of 06:25, June 6, 2016

Info

This template can be used to make the creation of infoboxes with different data between games a lot easier. Suppose there's an attribute of an enemy that, for some enemies, is different between all games. Instead of writing a confusing chain of ifs and parameters left and right inside the infobox, just use this template. It will automatically manage different value cases, equal value cases, and more.

Pass to it the values that would be normally passed into the infobox. If the article that calls the infobox does not provide a value for any of the possible parameters, this template will return nothing. Otherwise, it will return a table row with the information.

Parameters

Parameter Mandatory Default Purpose Detailed description
v No Global value Value passed to the infobox, in the case of it being the same for all games. Omit if this cannot happen (example: enemy health).
v1 No Pikmin value If the value is different in all games, this is the value passed to the infobox, for Pikmin.
v2 No Pikmin 2 value Same as above, but Pikmin 2.
v3 No Pikmin 3 value Same as above, but Pikmin 3.
dv No Default value If none are provided, use this as the default value. If omitted, the template just returns nothing, instead.
thparams No Header parameters Parameters to pass to the table header element, i.e. the cell that contains the name of the attribute.
n No Name of the attribute Name of the attribute, with links, if needed.
c No Custom global display If you want the global value to be displayed in a special way (e.g. with a tooltip that explains something about the value), write it here. Example: c = {{{seeds}}} {{tt|seeds|Per item.}}
c1 No Custom Pikmin display Same as above, but the Pikmin value.
c2 No Custom Pikmin 2 display Same as above, but the Pikmin 2 value.
c3 No Custom Pikmin 3 display Same as above, but the Pikmin 3 value.

Skeleton

{{per-game field | v = | v1 = | v2 = | v3 = | dv = | thparams = | n = | c = | c1 = | c2 = | c3 = }}