Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:Cosmetic: Difference between revisions

Template page
Initial draft
 
scavenging/blueprint info now automated + updated templatedata
 
(98 intermediate revisions by 4 users not shown)
Line 1: Line 1:
<includeonly>
{{#seo:|description={{#invoke:CosmeticInfo|getDescription|name={{{name}}}|plain=true}}}}
<infobox>
<infobox>
  <title source="title">
<title source="name">
    <default>{{PAGENAME}}</default>
<default>{{PAGENAME}}</default>
  </title>
</title>
  <image source="image"></image>
<data source="name">
  <data source="type">
<format>{{#ifexist: File:{{{name}}}.png|{{AFix|{{{name}}}.png|270px}}|{{AFix|{{{image}}}|270px}}}}</format>
    <label>Type</label>
</data>
    <format><center>{{#switch: {{lc:{{{type}}}}}<!--
<group>
-->| hat = [[File:Hat.png|x18px|frameless|link=]]<!--
<header><center>Details</center></header>
-->| accessory = [[File:Accessory.png|x18px|frameless|link=]]<!--
<data source="name">
-->| aura = [[File:Aura.png|x18px|frameless|link=]]<!--
<format>{{#switch: {{lc:{{#invoke:CosmeticInfo|getCategory|name={{{name}}}}}}}<!--
-->| trail = [[File:Trail.png|x18px|frameless|link=]]<!--
-->| hat = [[File:Hat.png|x18px|center|link=]] [[Category:Hats]]<!--
-->| cloak = [[File:Cloak.png|x18px|frameless|link=]]}}</center></format>
-->| accessory = [[File:Accessory.png|x18px|center|link=]] [[Category:Accessories]]<!--
  </data>
-->| aura = [[File:Aura.png|x18px|center|link=]] [[Category:Auras]]<!--
  <data source="rarity">
-->| trail = [[File:Trail.png|x18px|center|link=]] [[Category:Trails]]<!--
    <label>Rarity</label>
-->| cloak = [[File:Cloak.png|x18px|center|link=]] [[Category:Cloaks]]<!--
    <format><center>{{#switch: {{lc:{{{rarity}}}}}<!--
-->| rod = [[File:Rod.png|x18px|center|link=]] [[Category:Rods]]}}</format>
-->| common = [[File:Common.png|x18px|frameless|link=]]<!--
</data>
-->| uncommon = [[File:Uncommon.png|x18px|frameless|link=]]<!--
<data source="name">
-->| rare = [[File:Rare.png|x18px|frameless|link=]]<!--
<format>{{#switch: {{#invoke:CosmeticInfo|getRarity|name={{{name}}}}}<!--
-->| epic = [[File:Epic.png|x18px|frameless|link=]]<!--
-->| Common = [[File:Common.png|x18px|center|link=]]<!--
-->| legendary = [[File:Legendary.png|x18px|frameless|link=]]<!--
-->| Uncommon = [[File:Uncommon.png|x18px|center|link=]]<!--
-->| mythic = [[File:Mythic.png|x18px|frameless|link=]]<!--
-->| Rare = [[File:Rare.png|x18px|center|link=]]<!--
-->| seasonal = [[File:Seasonal.png|x18px|frameless|link=]]<!--
-->| Epic = [[File:Epic.png|x18px|center|link=]]<!--
-->| limited = [[File:Limited.png|x18px|frameless|link=]]}}</center></format>
-->| Legendary = [[File:Legendary.png|x18px|center|frameless|link=]]<!--
  </data>
-->| Mythic = [[File:Mythic.png|x18px|center|link=]]}}[[Category:{{#invoke:CosmeticInfo|getRarity|name={{{name}}}}} Cosmetics]]</format>
  <data source="variants">
</data>
    <label>[[File:Icon-Variant.png|20px]] Variants</label>
<data source="name">
  </data>
<format>{{#switch: {{#invoke:CosmeticInfo|getType|name={{{name}}}}}<!--
  <data source="chroma_applicable">
-->| #default = [[File:{{#invoke:CosmeticInfo|getType|name={{{name}}}}}.png|x18px|center|link=]]<!--
    <format><center>[[File:Icon-Color.png|20px]] Chroma Applicable</center></format>
-->| Standard = }}[[Category:{{#invoke:CosmeticInfo|getType|name={{{name}}}}} Cosmetics]]</format>
  </data>
</data>
  <data source="added">
<data source="name">
    <label>Added</label>
<format>{{#ifeq:{{#invoke:CosmeticInfo|isColorable|name={{{name}}}}}|true|<center>[[File:Icon-Color.png|20px]] Colorable</center>[[Category:Colorable Cosmetics]]}}</format>
  </data>
</data>
  <group>
<data source="name">
    <header>Values</header>
<format>{{#switch:{{#invoke:CosmeticInfo|getType|name={{{name}}}}}<!--
    <data source="trophies">
-->| Collector | Limited = [[File:Tradeable.png|x18px|center|link=Tradeable Cosmetics]] [[Category:Tradeable Cosmetics]]}}</format>
    <label>[[File:Icon-Champion Score.png|20px]] Trophies</label>
</data>
    </data>
</group>
    <data source="legacytrophies">
<data source="added_in">
    <label>[[File:Icon-Champion Score Legacy.png|20px]] Legacy Trophies</label>
<format><center>Added in [[{{{added_in}}}]]<br />({{PatchDate|{{{added_in}}}}})</center></format>
    </data>
</data>
    <data source="reputation">
<data source="added_date">
    <label>[[File:Royal Reputation.png|20px]] Royal Reputation</label>
<format><center>Added on {{{added_date}}}</center></format>
    </data>
</data>
  </group>
<group>
  <group>
<header><center>Collection</center></header>
    <header>Scavenging</header>
<data source="name">
    <data source="cosmetic">
<format><center><big>{{Collection|{{#invoke:CosmeticInfo|getCollection|name={{{name}}}}}|abbr=y|size=32px}}</big> [[Category:{{#invoke:CosmeticInfo|getCollection|name={{{name}}}}} Collection Cosmetics]]</center></format>
    <label>Cosmetic Token</label>
</data>
    <format>{{cosmetic}} [[File:Knick Knax Ticket.png|20px]]</format>
</group>
    </data>
<group>
    <data source="blueprint">
<header><center>Unlock Hint</center></header>
    <label>Blueprint</label>
<data source="name">
    <format>{{blueprint}} [[File:Knick Knax Ticket.png|20px]]</format>
<format><center>{{#invoke:CosmeticInfo|getObtainmentHint|name={{{name}}}}}</center></format>
    </data>
</data>
  </group>
</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>
{{#iferror:{{#invoke:CosmeticInfo|getDescription|name={{{name}}}}}||<blockquote>{{#invoke:CosmeticInfo|getDescription|name={{{name}}}}}</blockquote>}}
{{#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": {
"name": {
"type": "string",
"description": "The name of the cosmetic",
"example": "Frog Friend",
"required": true
},
"image": {
"description": "The (animated) image of the cosmetic, if the file is not found at File:{{{name}}}.png",
"type": "wiki-file-name"
},
"added_in": {
"description": "The patch version the cosmetic was added",
"type": "string",
"example": "0.8.0",
"required": true
},
"added_date": {
"description": "If not added in a patch, the date on which the cosmetic was added",
"type": "string",
"example": "June 12th, 2024"
},
"unlock_method": {
"description": "If non-standard unlock method, sentences to be used to explain it",
"required": true,
"type": "string"
},
"crafting_materials": {
"description": "If cosmetic has blueprint with a non-standard recipe, the required crafting materials with a break tag between each material.",
"type": "string"
}
},
"description": "Creates an infobox and various standard sentences for Cosmetics pages.",
"paramOrder": [
"name",
"image",
"added_in",
"added_date",
"unlock_method",
"crafting_materials"
]
}
</templatedata>
</noinclude>

Latest revision as of 15:28, 30 August 2025

Creates an infobox and various standard sentences for Cosmetics pages.

Template parameters[Edit template data]

ParameterDescriptionTypeStatus
namename

The name of the cosmetic

Example
Frog Friend
Stringrequired
imageimage

The (animated) image of the cosmetic, if the file is not found at File:{{{name}}}.png

Fileoptional
added_inadded_in

The patch version the cosmetic was added

Example
0.8.0
Stringrequired
added_dateadded_date

If not added in a patch, the date on which the cosmetic was added

Example
June 12th, 2024
Stringoptional
unlock_methodunlock_method

If non-standard unlock method, sentences to be used to explain it

Stringrequired
crafting_materialscrafting_materials

If cosmetic has blueprint with a non-standard recipe, the required crafting materials with a break tag between each material.

Stringoptional