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
 
(One intermediate revision by the same user not shown)
Line 66: 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|{{#invoke:CosmeticInfo|getReputationAmount|name={{{name}}}}}}}</format>
<format>{{#ifexpr:{{#invoke:CosmeticInfo|getReputationAmount|name={{{name}}}}}>0|{{#invoke:CosmeticInfo|getReputationAmount|name={{{name}}}}}}}</format>
</data>
</data>
</group>
</group>
Line 93: Line 93:
</infobox>
</infobox>
{{#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>}}
{{#invoke:CosmeticInfo/Paragraph|make|name={{{name}}}|added_date={{{added_date|}}}|added_in={{{added_in|}}}|unlock_method={{{unlock_method|}}}|style_perk={{{style_perk|}}}}}
{{#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>
{{#if:{{{scavenge_cosmetic|}}}|<div style="margin-top:1em;"></div>Its token form can be scavenged for {{Silver|{{#switch: {{lc:{{#invoke:CosmeticInfo|getRarity|name={{{name}}}}}}}<!--
    -->| 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 133: 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 152: 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 195: 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