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
mNo edit summary
scavenging/blueprint info now automated + updated templatedata
 
(14 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<includeonly><infobox>
<includeonly>
{{#seo:|description={{#invoke:CosmeticInfo|getDescription|name={{{name}}}|plain=true}}}}
<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:{{#invoke:CosmeticInfo|getCategory|name={{{name}}}}}}}<!--
-->| 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 26: Line 28:
-->| Mythic = [[File:Mythic.png|x18px|center|link=]]}}[[Category:{{#invoke:CosmeticInfo|getRarity|name={{{name}}}}} Cosmetics]]</format>
-->| Mythic = [[File:Mythic.png|x18px|center|link=]]}}[[Category:{{#invoke:CosmeticInfo|getRarity|name={{{name}}}}} Cosmetics]]</format>
</data>
</data>
<data source="rarity2">
<data source="name">
<format>{{#switch: {{lc:{{{rarity2}}}}}<!--
<format>{{#switch: {{#invoke:CosmeticInfo|getType|name={{{name}}}}}<!--
-->| seasonal = [[File:Seasonal.png|x18px|center|link=]]<!--
-->| #default = [[File:{{#invoke:CosmeticInfo|getType|name={{{name}}}}}.png|x18px|center|link=]]<!--
-->| limited = [[File:Limited.png|x18px|center|link=]]}}[[Category:{{ucfirst:{{{rarity2}}}}} Cosmetics]]</format>
-->| Standard = }}[[Category:{{#invoke:CosmeticInfo|getType|name={{{name}}}}} Cosmetics]]</format>
</data>
</data>
<data source="name">
<data source="name">
<format>{{#ifeq:{{#invoke:CosmeticInfo|isColorable|name={{{name}}}}}|true|<center>[[File:Icon-Color.png|20px]] Colorable</center>[[Category:Colorable Cosmetics]]}}</format>
<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>
</data>
</group>
</group>
Line 49: Line 55:
<group>
<group>
<header><center>Unlock Hint</center></header>
<header><center>Unlock Hint</center></header>
<data source="unlock_hint">
<data source="name">
<format>{{#if: {{{legacy|}}}||<center>{{#ifeq:{{#invoke:CosmeticInfo|isInCrateCollection|name={{{name}}}}}|true|Found in [[Cosmetic Crate]]s.|{{#ifeq:{{#invoke:CosmeticInfo|isInGamePassCollection|name={{{name}}}}}|true|Awarded from [[{{#switch:{{#invoke:CosmeticInfo|getCollection|name={{{name}}}}}|HITW=Hole in the Wall|#default={{#invoke:CosmeticInfo|getCollection|name={{{name}}}}}}}]] [[Game Passes]].|{{{unlock_hint}}}}}}}</center>}}</format>
<format><center>{{#invoke:CosmeticInfo|getObtainmentHint|name={{{name}}}}}</center></format>
</data>
<data source="legacy">
<format><center>This cosmetic is from a past event or season, so is now obtained from the [[Legacy Cosmetic Machine]].</center></format>
</data>
</data>
</group>
</group>
Line 63: Line 66:
</data>
</data>
<data source="name">
<data source="name">
<label>[[File:Icon-Champion Score Bonus.png|32px]]</label>
<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>
<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>
<data source="name">
<data source="name">
<label>[[File:Royal Reputation.png|32px]]</label>
<label>[[File:Royal Reputation.png|32px]]</label>
<format>{{#ifeq: {{#invoke:CosmeticInfo|canBeDonated|name={{{name}}}}}|true|
<format>{{#ifexpr:{{#invoke:CosmeticInfo|getReputationAmount|name={{{name}}}}}>0|{{#invoke:CosmeticInfo|getReputationAmount|name={{{name}}}}}}}</format>
{{#switch: {{lc:{{#invoke:CosmeticInfo|getRarity|name={{{name}}}}}}}<!--
-->| common = 1<!--
-->| uncommon = 2<!--
-->| rare = 3<!--
-->| epic = 5<!--
-->| legendary = 7<!--
-->| mythic = 10}}}}</format>
</data>
</data>
</group>
</group>
<group layout="horizontal">
<group layout="horizontal">
<header><center>Scavenging</center></header>
<header><center>Scavenging</center></header>
<data source="scavenge_cosmetic">
<data source="name">
<label>Cosmetic Token</label>
<label>Cosmetic Token</label>
<format>{{#switch: {{lc:{{#invoke:CosmeticInfo|getRarity|name={{{name}}}}}}}<!--
<format>{{#ifexpr:{{#invoke:CosmeticInfo|getReputationAmount|name={{{name}}}}}>0|{{CosmeticScavengeRewards|name={{{name}}}}}}}</format>
-->| common = {{Silver|200}}<!--
-->| uncommon = {{Silver|750}}<!--
-->| rare = {{Silver|2,000}}<!--
-->| epic = {{Silver|3,750}}<!--
-->| legendary = {{Silver|6,250}}<!--
-->| mythic = {{Silver|18,000}}}}</format>
</data>
</data>
<data source="scavenge_blueprint">
<data source="name">
<label>Blueprint</label>
<label>Blueprint</label>
<format>{{#switch: {{lc:{{#invoke:CosmeticInfo|getRarity|name={{{name}}}}}}}<!--
<format>{{#ifexpr:{{#invoke:CosmeticInfo|getReputationAmount|name={{{name}}}}}>0|{{CosmeticScavengeRewards|name={{{name}}}|Blueprint}}}}</format>
-->| common = {{Silver|50}}<!--
-->| uncommon = {{Silver|150}}<!--
-->| rare = {{Silver|300}}<!--
-->| epic = {{Silver|850}}<!--
-->| legendary = {{Silver|1,200}}<!--
-->| mythic = {{Silver|3,500}}}}</format>
</data>
</data>
</group>
</group>
Line 108: Line 92:
</group>
</group>
</infobox>
</infobox>
{{#if:{{#iferror:{{#invoke:CosmeticInfo|getDescription|name={{{name}}}}}|}}|<blockquote>{{#invoke:CosmeticInfo|getDescription|name={{{name}}}}}</blockquote>}}
{{#iferror:{{#invoke:CosmeticInfo|getDescription|name={{{name}}}}}||<blockquote>{{#invoke:CosmeticInfo|getDescription|name={{{name}}}}}</blockquote>}}
'''{{{name}}}''' is {{#ifeq:{{#invoke:CosmeticInfo|getRarity|name={{{name}}}}}|Epic|an|a}} {{Rarity|{{#invoke:CosmeticInfo|getRarity|name={{{name}}}}}|Text}} {{#if:{{{rarity2|}}}|and {{Rarity|{{{rarity2}}}|Text}}}} {{Type|{{#invoke:CosmeticInfo|getType|name={{{name}}}}}}} [[cosmetic]], found within the {{Collection|{{#invoke:CosmeticInfo|getCollection|name={{{name}}}}}}}, that was introduced {{#if: {{{added_date|}}}|on {{{added_date}}}|in [[Patch {{{added_in}}}]]}}. {{#ifeq:{{#invoke:CosmeticInfo|isInCrateCollection|name={{{name}}}}}|true|Its [[blueprint]] form can be obtained at random from [[File:{{#invoke:CosmeticInfo|getRarity|name={{{name}}}}} Cosmetic Crate.png|20px|link={{#invoke:CosmeticInfo|getRarity|name={{{name}}}}} Cosmetic Crate]] {{Rarity|{{#invoke:CosmeticInfo|getRarity|name={{{name}}}}}|Text}} and [[File:Mystery Cosmetic Crate.png|20px|link=Mystery Cosmetic Crate]] <span style="color: #A033EA">'''Mystery'''</span> [[Cosmetic Crate]]s, with a higher chance if the crate is [[Crate Attuner|attuned]] to the [[File:{{#invoke:CosmeticInfo|getCollection|name={{{name}}}}} Collection.png|20px|link={{#invoke:CosmeticInfo|getCollection|name={{{name}}}}} Collection]] {{#invoke:CosmeticInfo|getCollection|name={{{name}}}}} pool.|{{{unlock_method}}}}}{{#ifeq:{{#invoke:CosmeticInfo|isColorable|name={{{name}}}}}|true|<div style="margin-top:1em;"></div>It is {{Colorable}}, meaning players can apply [[Chroma Pack|chroma packs]] to it, allowing them to change its colour.<div style="margin-top:1em;"></div>It can reward the player with up to {{{{#ifeq:{{#invoke:CosmeticInfo|isBonusTrophies|name={{{name}}}}}|true|Bonus|Style}} Trophy|{{#expr:{{#invoke:CosmeticInfo|getTrophiesAwarded|name={{{name}}}}}+10}}|text = yes}}: {{{{#ifeq:{{#invoke:CosmeticInfo|isBonusTrophies|name={{{name}}}}}|true|Bonus|Style}} Trophy|{{#invoke:CosmeticInfo|getTrophiesAwarded|name={{{name}}}}}}} for owning it and an extra {{{{#ifeq:{{#invoke:CosmeticInfo|isBonusTrophies|name={{{name}}}}}|true|Bonus|Style}} Trophy|10}} if all 4 [[Chroma Pack|chroma packs]] are applied to it.|<div style="margin-top:1em;"></div>{{#if:{{{trophy_information|}}}|{{{trophy_information}}}|Owning it rewards the player with a total of {{{{#ifeq:{{#invoke:CosmeticInfo|isBonusTrophies|name={{{name}}}}}|true|Bonus|Style}} Trophy|{{#invoke:CosmeticInfo|getTrophiesAwarded|name={{{name}}}}}|text = yes}}.}}}}{{#if:{{{scavenge_cosmetic|}}}|<div style="margin-top:1em;"></div>Its token form can be scavenged for {{Silver|{{#switch: {{lc:{{#invoke:CosmeticInfo|getRarity|name={{{name}}}}}}}<!--
{{#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>
    -->| common = 200<!--
    -->| uncommon = 750<!--
    -->| rare = 2,000<!--
    -->| epic = 3,750<!--
    -->| legendary = 6,250<!--
    -->| mythic = 18,000}}}} [[Silver]] and {{Royal Reputation|{{#switch: {{lc:{{#invoke:CosmeticInfo|getRarity|name={{{name}}}}}}}<!--
    -->| common = 1<!--
    -->| uncommon = 2<!--
    -->| rare = 3<!--
    -->| epic = 5<!--
    -->| legendary = 7<!--
    -->| mythic = 10}}}} [[Royal Reputation]] in the [[Scavenger's Hideout]].}}
{{#if:{{{legacy|}}}{{{blueprint|}}}{{#ifeq:{{#invoke:CosmeticInfo|isInCrateCollection|name={{{name}}}}}|true|1|}}|
==== Blueprint Recipe ====
{{{name}}}'s blueprint form must be crafted at the [[Blueprint Assembler]] into a cosmetic token before use. {{#if:{{{scavenge_blueprint|}}}| Alternatively, it can be scavenged for {{Silver|{{#switch: {{lc:{{#invoke:CosmeticInfo|getRarity|name={{{name}}}}}}}<!--
    -->| common = 50<!--
    -->| uncommon = 150<!--
    -->| rare = 300<!--
    -->| epic = 850<!--
    -->| legendary = 1,200<!--
    -->| mythic = 3,500}}}} [[Silver]] in the [[Scavenger's Hideout]].}}
{{Blueprint
|item = {{#ifexist: File:{{{name}}}.png|[[File:{{{name}}}.png|25px]]|[[File:{{{image}}}|25px]]}} {{{name}}} Token
|required_materials = {{{crafting_materials}}}
|rarity = {{#invoke:CosmeticInfo|getRarity|name={{{name}}}}}
|legacy = {{{legacy|}}}
}}}}</includeonly><noinclude><templatedata>
{
{
"params": {
"params": {
Line 148: Line 105:
"description": "The (animated) image of the cosmetic, if the file is not found at File:{{{name}}}.png",
"description": "The (animated) image of the cosmetic, if the file is not found at File:{{{name}}}.png",
"type": "wiki-file-name"
"type": "wiki-file-name"
},
"rarity2": {
"description": "The (special) rarity of the cosmetic",
"type": "string",
"suggestedvalues": [
"seasonal",
"limited"
]
},
},
"added_in": {
"added_in": {
Line 167: Line 116:
"type": "string",
"type": "string",
"example": "June 12th, 2024"
"example": "June 12th, 2024"
},
"unlock_hint": {
"description": "The in-game string for how this cosmetic is obtained. Not required if legacy cosmetic",
"type": "string",
"suggested": true
},
"scavenge_cosmetic": {
"description": "Is the cosmetic token scavengeable?",
"type": "boolean",
"suggested": true
},
"scavenge_blueprint": {
"description": "Is the blueprint scavengeable?",
"type": "boolean",
"suggested": true
},
"legacy": {
"description": "Whether the cosmetic is obtained from the Legacy Machine. Overrides unlock_hint.",
"type": "string",
"suggestedvalues": [
"yes"
]
},
},
"unlock_method": {
"unlock_method": {
"description": "Sentences to be used to explain the unlocking method of the cosmetic",
"description": "If non-standard unlock method, sentences to be used to explain it",
"required": true,
"required": true,
"type": "string"
"type": "string"
},
},
"crafting_materials": {
"crafting_materials": {
"description": "The required crafting materials for the cosmetic's blueprint, if it has one. Use a break tag between each material.",
"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"
},
"blueprint": {
"description": "Does the cosmetic have a blueprint form?",
"suggestedvalues": [
"yes"
]
}
}
},
},
Line 210: Line 131:
"name",
"name",
"image",
"image",
"rarity2",
"unlock_hint",
"legacy",
"added_in",
"added_in",
"added_date",
"added_date",
"unlock_method",
"unlock_method",
"blueprint",
"scavenge_blueprint",
"scavenge_cosmetic",
"crafting_materials"
"crafting_materials"
]
]

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