Template:Cosmetic: Difference between revisions
Template page
More actions
Switch to AFix for image source |
scavenging/blueprint info now automated + updated templatedata |
||
(72 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
<includeonly> | |||
{{#seo:|description={{#invoke:CosmeticInfo|getDescription|name={{{name}}}|plain=true}}}} | |||
<infobox> | <infobox> | ||
<title source="name"> | |||
<default>{{PAGENAME}}</default> | |||
</title> | |||
<data source="name"> | |||
<format>{{#ifexist: File:{{{name}}}.png|{{AFix|{{{name}}}.png|270px}}|{{AFix|{{{image}}}|270px}}}}</format> | |||
</data> | |||
<group> | |||
<header><center>Details</center></header> | |||
<data source="name"> | |||
<format>{{#switch: {{lc:{{#invoke:CosmeticInfo|getCategory|name={{{name}}}}}}}<!-- | |||
-->| hat = [[File:Hat.png|x18px|center|link=]] [[Category:Hats]]<!-- | |||
-->| accessory = [[File:Accessory.png|x18px|center|link=]] [[Category:Accessories]]<!-- | |||
-->| aura = [[File:Aura.png|x18px|center|link=]] [[Category:Auras]]<!-- | |||
-->| trail = [[File:Trail.png|x18px|center|link=]] [[Category:Trails]]<!-- | |||
-->| cloak = [[File:Cloak.png|x18px|center|link=]] [[Category:Cloaks]]<!-- | |||
-->| rod = [[File:Rod.png|x18px|center|link=]] [[Category:Rods]]}}</format> | |||
</data> | |||
<data source="name"> | |||
<format>{{#switch: {{#invoke:CosmeticInfo|getRarity|name={{{name}}}}}<!-- | |||
-->| Common = [[File:Common.png|x18px|center|link=]]<!-- | |||
-->| Uncommon = [[File:Uncommon.png|x18px|center|link=]]<!-- | |||
-->| Rare = [[File:Rare.png|x18px|center|link=]]<!-- | |||
-->| Epic = [[File:Epic.png|x18px|center|link=]]<!-- | |||
-->| Legendary = [[File:Legendary.png|x18px|center|frameless|link=]]<!-- | |||
-->| Mythic = [[File:Mythic.png|x18px|center|link=]]}}[[Category:{{#invoke:CosmeticInfo|getRarity|name={{{name}}}}} Cosmetics]]</format> | |||
</data> | |||
<data source="name"> | |||
<format>{{#switch: {{#invoke:CosmeticInfo|getType|name={{{name}}}}}<!-- | |||
-->| #default = [[File:{{#invoke:CosmeticInfo|getType|name={{{name}}}}}.png|x18px|center|link=]]<!-- | |||
-->| Standard = }}[[Category:{{#invoke:CosmeticInfo|getType|name={{{name}}}}} Cosmetics]]</format> | |||
</data> | |||
<data source="name"> | |||
<format>{{#ifeq:{{#invoke:CosmeticInfo|isColorable|name={{{name}}}}}|true|<center>[[File:Icon-Color.png|20px]] Colorable</center>[[Category:Colorable Cosmetics]]}}</format> | |||
</data> | |||
<data source="name"> | |||
<format>{{#switch:{{#invoke:CosmeticInfo|getType|name={{{name}}}}}<!-- | |||
-->| Collector | Limited = [[File:Tradeable.png|x18px|center|link=Tradeable Cosmetics]] [[Category:Tradeable Cosmetics]]}}</format> | |||
</data> | |||
</group> | |||
<data source="added_in"> | |||
<format><center>Added in [[{{{added_in}}}]]<br />({{PatchDate|{{{added_in}}}}})</center></format> | |||
</data> | |||
<data source="added_date"> | |||
<format><center>Added on {{{added_date}}}</center></format> | |||
</data> | |||
<group> | |||
<header><center>Collection</center></header> | |||
<data source="name"> | |||
<format><center><big>{{Collection|{{#invoke:CosmeticInfo|getCollection|name={{{name}}}}}|abbr=y|size=32px}}</big> [[Category:{{#invoke:CosmeticInfo|getCollection|name={{{name}}}}} Collection Cosmetics]]</center></format> | |||
</data> | |||
</group> | |||
<group> | |||
<header><center>Unlock Hint</center></header> | |||
<data source="name"> | |||
<format><center>{{#invoke:CosmeticInfo|getObtainmentHint|name={{{name}}}}}</center></format> | |||
</data> | |||
</group> | |||
<group layout="horizontal"> | |||
<header><center>Value</center></header> | |||
<data source="name"> | |||
<label>[[File:Style Trophy.png|32px]]</label> | |||
<format>{{#if:{{{style_trophies|}}}|{{{style_trophies}}}|{{#ifeq:{{#invoke:CosmeticInfo|isBonusTrophies|name={{{name}}}}}|false|{{#invoke:CosmeticInfo|getTrophiesAwarded|name={{{name}}}}} {{#ifeq:{{#invoke:CosmeticInfo|isColorable|name={{{name}}}}}|true|([[File:Icon-Color.png|20px]]+10)}}}}}}</format> | |||
</data> | |||
<data source="name"> | |||
<label>[[File:Bonus Trophy.png|32px]]</label> | |||
<format>{{#if:{{{bonus_trophies|}}}|{{{bonus_trophies}}}|{{#ifeq:{{#invoke:CosmeticInfo|isBonusTrophies|name={{{name}}}}}|true|{{#invoke:CosmeticInfo|getTrophiesAwarded|name={{{name}}}}} {{#ifeq:{{#invoke:CosmeticInfo|isColorable|name={{{name}}}}}|true|([[File:Icon-Color.png|20px]]+10)}}}}}}</format> | |||
</data> | |||
<data source="name"> | |||
<label>[[File:Royal Reputation.png|32px]]</label> | |||
<format>{{#ifexpr:{{#invoke:CosmeticInfo|getReputationAmount|name={{{name}}}}}>0|{{#invoke:CosmeticInfo|getReputationAmount|name={{{name}}}}}}}</format> | |||
</data> | |||
</group> | |||
<group layout="horizontal"> | |||
<header><center>Scavenging</center></header> | |||
<data source="name"> | |||
<label>Cosmetic Token</label> | |||
<format>{{#ifexpr:{{#invoke:CosmeticInfo|getReputationAmount|name={{{name}}}}}>0|{{CosmeticScavengeRewards|name={{{name}}}}}}}</format> | |||
</data> | |||
<data source="name"> | |||
<label>Blueprint</label> | |||
<format>{{#ifexpr:{{#invoke:CosmeticInfo|getReputationAmount|name={{{name}}}}}>0|{{CosmeticScavengeRewards|name={{{name}}}|Blueprint}}}}</format> | |||
</data> | |||
</group> | |||
<group> | |||
<header><center>Global Number Owned{{#invoke:CosmeticInfo|lastUpdatedIcon}}</center></header> | |||
<data source="name"> | |||
<format>{{#if:{{#invoke:CosmeticInfo|getGlobalNumberOwned|name={{{name}}}}}|<center>{{#invoke:CosmeticInfo|getGlobalNumberOwned|name={{{name}}}}}</center>}}</format> | |||
</data> | |||
</group> | |||
</infobox> | </infobox> | ||
<noinclude> | {{#iferror:{{#invoke:CosmeticInfo|getDescription|name={{{name}}}}}||<blockquote>{{#invoke:CosmeticInfo|getDescription|name={{{name}}}}}</blockquote>}} | ||
<templatedata> | {{#invoke:CosmeticInfo/Paragraph|make|name={{{name}}}|added_date={{{added_date|}}}|added_in={{{added_in|}}}|unlock_method={{{unlock_method|}}}|style_perk={{{style_perk|}}}|crafting_materials={{{crafting_materials|}}}}}</includeonly><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": " | |||
}, | }, | ||
" | "added_in": { | ||
"description": "The | "description": "The patch version the cosmetic was added", | ||
"type": "string", | "type": "string", | ||
" | "example": "0.8.0", | ||
"required": true | |||
" | |||
}, | }, | ||
" | "added_date": { | ||
"description": " | "description": "If not added in a patch, the date on which the cosmetic was added", | ||
"type": "string", | "type": "string", | ||
" | "example": "June 12th, 2024" | ||
}, | }, | ||
" | "unlock_method": { | ||
"description": " | "description": "If non-standard unlock method, sentences to be used to explain it", | ||
"required": true, | |||
"type": "string" | "type": "string" | ||
}, | }, | ||
" | "crafting_materials": { | ||
"description": " | "description": "If cosmetic has blueprint with a non-standard recipe, the required crafting materials with a break tag between each material.", | ||
"type": "string" | "type": "string" | ||
} | } | ||
}, | }, | ||
"description": "Creates | "description": "Creates an infobox and various standard sentences for Cosmetics pages.", | ||
"paramOrder": [ | "paramOrder": [ | ||
" | "name", | ||
"image", | "image", | ||
" | "added_in", | ||
" | "added_date", | ||
" | "unlock_method", | ||
" | "crafting_materials" | ||
] | ] | ||
} | } | ||
</templatedata> | </templatedata> | ||
</noinclude> | </noinclude> |
Latest revision as of 15:28, 30 August 2025
Creates an infobox and various standard sentences for Cosmetics pages.
Parameter | Description | Type | Status | |
---|---|---|---|---|
name | name | The name of the cosmetic
| String | required |
image | image | The (animated) image of the cosmetic, if the file is not found at File:{{{name}}}.png | File | optional |
added_in | added_in | The patch version the cosmetic was added
| String | required |
added_date | added_date | If not added in a patch, the date on which the cosmetic was added
| String | optional |
unlock_method | unlock_method | If non-standard unlock method, sentences to be used to explain it | String | required |
crafting_materials | crafting_materials | If cosmetic has blueprint with a non-standard recipe, the required crafting materials with a break tag between each material. | String | optional |