Template:Cosmetic: Difference between revisions
Template page
More actions
More fixes |
Attempt at replacing template parameters via invoke |
||
Line 1: | Line 1: | ||
<infobox> | <includeonly> | ||
{{#invoke:CosmeticInfo|getAllData|name={{{name}}}}} | |||
{{#if:{{{name}}}|<infobox> | |||
<title source="name"> | <title source="name"> | ||
<default>{{PAGENAME}}</default> | <default>{{PAGENAME}}</default> | ||
Line 9: | Line 11: | ||
<header><center>Details</center></header> | <header><center>Details</center></header> | ||
<data source="name"> | <data source="name"> | ||
<format>{{#switch: {{lc:{{ | <format>{{#switch: {{lc:{{{type}}}}}<!-- | ||
-->| hat = [[File:Hat.png|x18px|center|link=]] [[Category:Hats]]<!-- | -->| hat = [[File:Hat.png|x18px|center|link=]] [[Category:Hats]]<!-- | ||
-->| accessory = [[File:Accessory.png|x18px|center|link=]] [[Category:Accessories]]<!-- | -->| accessory = [[File:Accessory.png|x18px|center|link=]] [[Category:Accessories]]<!-- | ||
Line 18: | Line 20: | ||
</data> | </data> | ||
<data source="name"> | <data source="name"> | ||
<format>{{#switch: {{lc:{{ | <format>{{#switch: {{lc:{{{rarity}}}}}<!-- | ||
-->| common = [[File:Common.png|x18px|center|link=]]<!-- | -->| common = [[File:Common.png|x18px|center|link=]]<!-- | ||
-->| uncommon = [[File:Uncommon.png|x18px|center|link=]]<!-- | -->| uncommon = [[File:Uncommon.png|x18px|center|link=]]<!-- | ||
Line 24: | Line 26: | ||
-->| epic = [[File:Epic.png|x18px|center|link=]]<!-- | -->| epic = [[File:Epic.png|x18px|center|link=]]<!-- | ||
-->| legendary = [[File:Legendary.png|x18px|center|frameless|link=]]<!-- | -->| legendary = [[File:Legendary.png|x18px|center|frameless|link=]]<!-- | ||
-->| mythic = [[File:Mythic.png|x18px|center|link=]]}}[[Category:{{ucfirst:{{ | -->| mythic = [[File:Mythic.png|x18px|center|link=]]}}[[Category:{{ucfirst:{{{rarity}}}}} Cosmetics]]</format> | ||
</data> | </data> | ||
<data source="rarity2"> | <data source="rarity2"> | ||
Line 32: | Line 34: | ||
</data> | </data> | ||
<data source="name"> | <data source="name"> | ||
<format>{{#if:{{ | <format>{{#if:{{{colorable}}}|<center>[[File:Icon-Color.png|20px]] Colorable</center>[[Category:Colorable Cosmetics]]}}</format> | ||
</data> | </data> | ||
</group> | </group> | ||
<data source=" | <data source="added_in"> | ||
<format><center>Added in [[{{{ | <format><center>Added in [[{{{added_in}}}]]<br />({{PatchDate|{{{added_in}}}})</center></format> | ||
</data> | </data> | ||
<group> | <group> | ||
<header><center>Collection</center></header> | <header><center>Collection</center></header> | ||
<data source="name"> | <data source="name"> | ||
<format><center>{{#switch: {{lc:{{ | <format><center>{{#switch: {{lc:{{{collection}}}}}<!-- | ||
-->| oceanic | natural | mechanical | magical | royal | hidden | special | bonus =<!-- | -->| oceanic | natural | mechanical | magical | royal | hidden | special | bonus =<!-- | ||
-->[[File:{{ucfirst: | -->[[File:{{ucfirst:{{{collection}}}}} Collection.png|32px|center|link={{ucfirst:{{{collection}}}}} Collection]]<!-- | ||
--> [[{{ucfirst: | --> [[{{ucfirst:{{{collection}}}}} Collection]] [[Category:{{ucfirst:{{{collection}}}}} Collection Cosmetics]]<!-- | ||
-->| mythic gate = [[File:Icon-Mastery-Gate.png|32px|center|link=Mythic Gate Collection]] [[Mythic Gate Collection]]<!-- | -->| mythic gate = [[File:Icon-Mastery-Gate.png|32px|center|link=Mythic Gate Collection]] [[Mythic Gate Collection]]<!-- | ||
--> [[Category:Mythic Gate Collection Cosmetics]]<!-- | --> [[Category:Mythic Gate Collection Cosmetics]]<!-- | ||
Line 79: | Line 81: | ||
-->| spooky = [[File:Spooky Huntmaster Badge.png|32px|center|link=Spooky Collection]] [[Spooky Collection]]<!-- | -->| spooky = [[File:Spooky Huntmaster Badge.png|32px|center|link=Spooky Collection]] [[Spooky Collection]]<!-- | ||
--> [[Category:Spooky Collection Cosmetics]]<!-- | --> [[Category:Spooky Collection Cosmetics]]<!-- | ||
-->| aura | trail = [[File:Icon-{{ucfirst: | -->| aura | trail = [[File:Icon-{{ucfirst:{{{collection}}}}}.png|32px|center|link={{ucfirst:{{{collection}}}}} Collection]]<!-- | ||
--> [[{{ucfirst: | --> [[{{ucfirst:{{{collection}}}}} Collection]] [[Category:{{ucfirst:{{{collection}}}}} Collection Cosmetics]]}}</center></format> | ||
</data> | </data> | ||
</group> | </group> | ||
Line 93: | Line 95: | ||
<data source="name"> | <data source="name"> | ||
<label>[[File:Style Trophy.png|32px]]</label> | <label>[[File:Style Trophy.png|32px]]</label> | ||
<format>{{#ifeq:{{ | <format>{{#ifeq:{{{isBonusTrophies}}}|false|{{{trophies}}} {{#if:{{{colorable}}}|([[File:Icon-Color.png|20px]]+10)}}}}</format> | ||
</data> | </data> | ||
<data source="name"> | <data source="name"> | ||
<label>[[File:Icon-Champion Score Bonus.png|32px]]</label> | <label>[[File:Icon-Champion Score Bonus.png|32px]]</label> | ||
<format>{{#ifeq:{{ | <format>{{#ifeq:{{{isBonusTrophies}}}|true|{{{trophies}}} {{#if:{{{colorable}}}|([[File:Icon-Color.png|20px]]+10)}}}}</format> | ||
</data> | </data> | ||
<data source="name"> | <data source="name"> | ||
<label>[[File:Royal Reputation.png|32px]]</label> | <label>[[File:Royal Reputation.png|32px]]</label> | ||
<format>{{#if: {{ | <format>{{#if: {{{canBeDonated}}}| | ||
{{#switch: {{lc:{{ | {{#switch: {{lc:{{{rarity}}}}}<!-- | ||
-->| common = 1<!-- | -->| common = 1<!-- | ||
-->| uncommon = 2<!-- | -->| uncommon = 2<!-- | ||
Line 108: | Line 110: | ||
-->| epic = 5<!-- | -->| epic = 5<!-- | ||
-->| legendary = 7<!-- | -->| legendary = 7<!-- | ||
-->| mythic = 10}}</format> | -->| mythic = 10}}}}</format> | ||
</data> | |||
</group> | </group> | ||
<group layout="horizontal"> | <group layout="horizontal"> | ||
Line 115: | Line 117: | ||
<data source="scavenge_cosmetic"> | <data source="scavenge_cosmetic"> | ||
<label>Cosmetic Token</label> | <label>Cosmetic Token</label> | ||
<format>{{#switch: {{lc:{{ | <format>{{#switch: {{lc:{{{rarity}}}}}<!-- | ||
-->| common = 200 [[File:Silver.png|20px]]<!-- | -->| common = 200 [[File:Silver.png|20px]]<!-- | ||
-->| uncommon = 750 [[File:Silver.png|20px]]<!-- | -->| uncommon = 750 [[File:Silver.png|20px]]<!-- | ||
Line 125: | Line 127: | ||
<data source="scavenge_blueprint"> | <data source="scavenge_blueprint"> | ||
<label>Blueprint</label> | <label>Blueprint</label> | ||
<format>{{#switch: {{lc:{{ | <format>{{#switch: {{lc:{{{rarity}}}}}<!-- | ||
-->| common = 50 [[File:Silver.png|20px]]<!-- | -->| common = 50 [[File:Silver.png|20px]]<!-- | ||
-->| uncommon = 150 [[File:Silver.png|20px]]<!-- | -->| uncommon = 150 [[File:Silver.png|20px]]<!-- | ||
Line 135: | Line 137: | ||
</group> | </group> | ||
<group> | <group> | ||
<header><center>Global Number Owned{{ | <header><center>Global Number Owned{{{lastUpdatedIcon}}}</center></header> | ||
<data source="name"> | <data source="name"> | ||
<format>{{#if: | <format>{{#if:{{{globalNumberOwned}}}|<center>{{{globalNumberOwned}}}</center>}}</format> | ||
</data> | </data> | ||
</group> | </group> | ||
</infobox> | </infobox> | ||
{{#if:{{#iferror:{{# | {{#if:{{#iferror:{{{description}}}|}}|<blockquote>{{{description}}}</blockquote>}}}} | ||
<noinclude> | '''{{{name}}}''' is a {{Rarity|{{{rarity}}}|Text}}{{#if:{{{rarity2}}}| and {{Rarity|{{{rarity2}}}|Text}}}} {{Type|{{{type}}}}} [[cosmetic]], found within the {{Collection|{{{collection}}}}}, that was introduced in [[Patch {{{added_in}}}]]. {{{unlock_method}}} | ||
<templatedata> | |||
{{#if:{{{colorable}}}|It is {{Colorable}}, meaning players can apply [[Chroma Pack|chroma packs]] to it, allowing them to change its colour. | |||
Owning it rewards the player with a total of {{Style Trophy|{{#expr:{{{trophies}}}+10}}|text = yes}} - {{Style Trophy|{{{trophies}}}}} for owning it and an extra {{Style Trophy|10}} if all 4 [[Chroma Pack|chroma packs]] are applied to it.| | |||
It rewards the player with a total of {{Style Trophy|{{{trophies}}}|text = yes}}.}} | |||
{{#if:{{{scavenge_cosmetic}}}|<br /><br />Its token form can be scavenged for {{#switch: {{lc:{{{rarity}}}}}<!-- | |||
-->| common = 200<!-- | |||
-->| uncommon = 750<!-- | |||
-->| rare = 2,000<!-- | |||
-->| epic = 3,750<!-- | |||
-->| legendary = 6,250<!-- | |||
-->| mythic = 18,000}} {{Silver}} and {{#switch: {{lc:{{{rarity}}}}}<!-- | |||
-->| common = 1<!-- | |||
-->| uncommon = 2<!-- | |||
-->| rare = 3<!-- | |||
-->| epic = 5<!-- | |||
-->| legendary = 7<!-- | |||
-->| mythic = 10}} {{Royal Reputation}} in the [[Scavenger's Hideout]].}} | |||
<noinclude><templatedata> | |||
{ | { | ||
"params": { | "params": { | ||
" | "name": { | ||
"type": "string", | "type": "string", | ||
"description": "The cosmetic | "description": "The name of the cosmetic", | ||
" | "example": "Frog Friend", | ||
"required": true | |||
" | |||
}, | }, | ||
" | "image": { | ||
"description": "The | "description": "The (animated) image of the cosmetic, if the file is not found at File:{{{name}}}.png", | ||
"type": "wiki-file-name" | |||
"type": " | |||
}, | }, | ||
"rarity2": { | "rarity2": { | ||
Line 179: | Line 184: | ||
"limited" | "limited" | ||
] | ] | ||
}, | }, | ||
"added": { | "added": { | ||
"description": " | "description": "The patch version the cosmetic was added", | ||
"type": "string", | "type": "string", | ||
" | "example": "0.8.0", | ||
"required": true | |||
" | |||
}, | }, | ||
"obtaining": { | "obtaining": { | ||
"description": " | "description": "The in-game string for how this cosmetic is obtained", | ||
"type": "string", | "type": "string", | ||
" | "required": true | ||
}, | }, | ||
"scavenge_cosmetic": { | "scavenge_cosmetic": { | ||
"description": "Is | "description": "Is the cosmetic token scavengeable?", | ||
"type": "boolean", | "type": "boolean", | ||
"suggested": true | "suggested": true | ||
}, | }, | ||
"scavenge_blueprint": { | "scavenge_blueprint": { | ||
"description": "Is blueprint scavengeable", | "description": "Is the blueprint scavengeable?", | ||
"type": "boolean", | "type": "boolean", | ||
"suggested": true | "suggested": true | ||
} | } | ||
}, | }, | ||
"description": "Creates | "description": "Creates an infobox and various standard sentences for Cosmetics pages.", | ||
"paramOrder": [ | "paramOrder": [ | ||
" | "name", | ||
"image", | "image", | ||
"rarity2", | "rarity2", | ||
"added", | "added", | ||
"obtaining", | "obtaining", | ||
"scavenge_cosmetic", | "scavenge_cosmetic", | ||
"scavenge_blueprint" | "scavenge_blueprint" |