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
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:{{#invoke:CosmeticInfo|getType|name={{{name}}}}}}}<!--
<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:{{#invoke:CosmeticInfo|getRarity|name={{{name}}}}}}}<!--
<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:{{#invoke:CosmeticInfo|getRarity|name={{{name}}}}}}} Cosmetics]]</format>
-->| 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:{{#invoke:CosmeticInfo|isColorable|name={{{name}}}}}|<center>[[File:Icon-Color.png|20px]] Colorable</center>[[Category:Colorable Cosmetics]]}}</format>
<format>{{#if:{{{colorable}}}|<center>[[File:Icon-Color.png|20px]] Colorable</center>[[Category:Colorable Cosmetics]]}}</format>
</data>
</data>
</group>
</group>
<data source="added">
<data source="added_in">
<format><center>Added in [[{{{added}}}]]<br />({{PatchDate|{{{added}}}}})</center></format>
<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:{{#invoke:CosmeticInfo|getCollection|name={{{name}}}}}}}<!--
<format><center>{{#switch: {{lc:{{{collection}}}}}<!--
-->| oceanic | natural | mechanical | magical | royal | hidden | special | bonus =<!--
-->| oceanic | natural | mechanical | magical | royal | hidden | special | bonus =<!--
-->[[File:{{ucfirst:{{#invoke:CosmeticInfo|getCollection|name={{{name}}}}}}} Collection.png|32px|center|link={{ucfirst:{{#invoke:CosmeticInfo|getCollection|name={{{name}}}}}}} Collection]]<!--
-->[[File:{{ucfirst:{{{collection}}}}} Collection.png|32px|center|link={{ucfirst:{{{collection}}}}} Collection]]<!--
--> [[{{ucfirst:{{#invoke:CosmeticInfo|getCollection|name={{{name}}}}}}} Collection]] [[Category:{{ucfirst:{{#invoke:CosmeticInfo|getCollection|name={{{name}}}}}}} Collection Cosmetics]]<!--
--> [[{{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:{{#invoke:CosmeticInfo|getCollection|name={{{name}}}}}}}.png|32px|center|link={{ucfirst:{{#invoke:CosmeticInfo|getCollection|name={{{name}}}}}}} Collection]]<!--
-->| aura | trail = [[File:Icon-{{ucfirst:{{{collection}}}}}.png|32px|center|link={{ucfirst:{{{collection}}}}} Collection]]<!--
--> [[{{ucfirst:{{#invoke:CosmeticInfo|getCollection|name={{{name}}}}}}} Collection]] [[Category:{{ucfirst:{{#invoke:CosmeticInfo|getCollection|name={{{name}}}}}}} Collection Cosmetics]]}}</center></format>
--> [[{{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:{{#invoke:CosmeticInfo|isBonusTrophies|name={{{name}}}}}|false|{{#invoke:CosmeticInfo|getTrophiesAwarded|name={{{name}}}}} {{#if:{{#invoke:CosmeticInfo|isColorable|name={{{name}}}}}|([[File:Icon-Color.png|20px]]+10)}}}}</format>
<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:{{#invoke:CosmeticInfo|isBonusTrophies|name={{{name}}}}}|true|{{#invoke:CosmeticInfo|getTrophiesAwarded|name={{{name}}}}} {{#if:{{#invoke:CosmeticInfo|isColorable|name={{{name}}}}}|([[File:Icon-Color.png|20px]]+10)}}}}</format>
<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: {{#invoke:CosmeticInfo|canBeDonated|name={{{name}}}}}|
<format>{{#if: {{{canBeDonated}}}|
{{#switch: {{lc:{{#invoke:CosmeticInfo|getRarity|name={{{name}}}}}}}<!--
{{#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>
</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:{{#invoke:CosmeticInfo|getRarity|name={{{name}}}}}}}<!--
<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:{{#invoke:CosmeticInfo|getRarity|name={{{name}}}}}}}<!--
<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{{#invoke:CosmeticInfo|lastUpdatedIcon}}</center></header>
<header><center>Global Number Owned{{{lastUpdatedIcon}}}</center></header>
<data source="name">
<data source="name">
<format>{{#if:{{#invoke:CosmeticInfo|getGlobalNumberOwned|name={{{name}}}}}|<center>{{#invoke:CosmeticInfo|getGlobalNumberOwned|name={{{name}}}}}</center>}}</format>
<format>{{#if:{{{globalNumberOwned}}}|<center>{{{globalNumberOwned}}}</center>}}</format>
</data>
</data>
</group>
</group>
</infobox>
</infobox>
{{#if:{{#iferror:{{#invoke:CosmeticDescription|getDescription|name={{{name}}}}}|}}|<blockquote>{{#invoke:CosmeticDescription|getDescription|name={{{name}}}}}</blockquote>}}
{{#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": {
"type": {
"name": {
"type": "string",
"type": "string",
"description": "The cosmetic type",
"description": "The name of the cosmetic",
"suggestedvalues": [
"example": "Frog Friend",
"hat",
"required": true
"accessory",
"aura",
"trail",
"cloak",
                "rod"
],
"suggested": true
},
},
"rarity": {
"image": {
"description": "The rarity of the cosmetic",
"description": "The (animated) image of the cosmetic, if the file is not found at File:{{{name}}}.png",
"suggestedvalues": [
"type": "wiki-file-name"
"common",
"uncommon",
"rare",
"epic",
"legendary",
"mythic"
],
"suggested": true,
"type": "string"
},
},
"rarity2": {
"rarity2": {
Line 179: Line 184:
"limited"
"limited"
]
]
},
"image": {
"description": "Image or GIF of the cosmetic",
"type": "wiki-file-name",
"suggested": true
},
},
"added": {
"added": {
"description": "Patch (& date) the cosmetic was added",
"description": "The patch version the cosmetic was added",
"type": "string",
"type": "string",
"suggested": true
"example": "0.8.0",
},
"required": true
"collection": {
"description": "The collection the cosmetic is part of.",
"suggestedvalues": [
"oceanic",
"natural",
"mechanical",
"magical",
"mythic gate",
"royal",
"secret styles",
"pose one",
"pose two",
"splinters",
"hidden",
"tgttos",
"hitw",
"battle box",
"sky battle",
"parkour warrior",
"dynaball",
"mystical aquatic",
"neon galaxy",
"candy factory",
"ancient jungle",
"squidtek",
"spooky",
"special",
"bonus",
"aura",
"trail"
],
"suggested": true,
"type": "string"
},
},
"obtaining": {
"obtaining": {
"description": "A short description of how this cosmetic is obtained",
"description": "The in-game string for how this cosmetic is obtained",
"suggested": true,
"type": "string"
},
"title": {
"description": "Give the infobox a custom title (defaults to page name)",
"type": "string"
},
"chroma_applicable": {
"description": "Is cosmetic chroma applicable",
"type": "boolean",
"suggested": true
},
"trophies": {
"description": "The amount of trophies received for having this cosmetic",
"type": "string",
"type": "string",
"suggested": true
"required": true
},
"bonus_trophies": {
"description": "The amount of bonus trophies received for having this cosmetic",
"type": "string"
},
"reputation": {
"description": "The amount of reputation earned for scavenging this cosmetic",
"type": "number",
"suggested": true
},
},
"scavenge_cosmetic": {
"scavenge_cosmetic": {
"description": "Is item scavengeable",
"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 a cosmetic infobox",
"description": "Creates an infobox and various standard sentences for Cosmetics pages.",
"paramOrder": [
"paramOrder": [
"title",
"name",
"image",
"image",
"type",
"rarity",
"rarity2",
"rarity2",
"chroma_applicable",
"added",
"added",
"collection",
"obtaining",
"obtaining",
"trophies",
"bonus_trophies",
"reputation",
"scavenge_cosmetic",
"scavenge_cosmetic",
"scavenge_blueprint"
"scavenge_blueprint"

Revision as of 09:07, 15 March 2025