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
No edit summary
fixed isColorable and canBeDonated always being true
Line 32: Line 32:
</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>{{#ifeq:{{#invoke:CosmeticInfo|isColorable|name={{{name}}}}}|true|<center>[[File:Icon-Color.png|20px]] Colorable</center>[[Category:Colorable Cosmetics]]}}</format>
</data>
</data>
</group>
</group>
Line 57: Line 57:
<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:{{#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>
<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:{{#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>{{#if: {{#invoke:CosmeticInfo|canBeDonated|name={{{name}}}}}|
<format>{{#ifeq: {{#invoke:CosmeticInfo|canBeDonated|name={{{name}}}}}|true|
{{#switch: {{lc:{{#invoke:CosmeticInfo|getRarity|name={{{name}}}}}}}<!--
{{#switch: {{lc:{{#invoke:CosmeticInfo|getRarity|name={{{name}}}}}}}<!--
-->| common = 1<!--
-->| common = 1<!--
Line 106: Line 106:
</infobox>
</infobox>
{{#if:{{#iferror:{{#invoke:CosmeticInfo|getDescription|name={{{name}}}}}|}}|<blockquote>{{#invoke:CosmeticInfo|getDescription|name={{{name}}}}}</blockquote>}}
{{#if:{{#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 in [[Patch {{{added_in}}}]]. {{{unlock_method}}}{{#if:{{#invoke:CosmeticInfo|isColorable|name={{{name}}}}}|<br /><br />It is {{Colorable}}, meaning players can apply [[Chroma Pack|chroma packs]] to it, allowing them to change its colour.<br /><br />Owning it rewards the player with a total of {{{{#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.|
'''{{{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 in [[Patch {{{added_in}}}]]. {{{unlock_method}}}{{#ifeq:{{#invoke:CosmeticInfo|isColorable|name={{{name}}}}}|true|<br /><br />It is {{Colorable}}, meaning players can apply [[Chroma Pack|chroma packs]] to it, allowing them to change its colour.<br /><br />Owning it rewards the player with a total of {{{{#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.|
It rewards the player with a total of {{Style Trophy|{{#invoke:CosmeticInfo|getTrophiesAwarded|name={{{name}}}}}|text = yes}}.}}{{#if:{{{scavenge_cosmetic|}}}|<br /><br />Its token form can be scavenged for {{Silver|{{#switch: {{lc:{{#invoke:CosmeticInfo|getRarity|name={{{name}}}}}}}<!--
It rewards the player with a total of {{Style Trophy|{{#invoke:CosmeticInfo|getTrophiesAwarded|name={{{name}}}}}|text = yes}}.}}{{#if:{{{scavenge_cosmetic|}}}|<br /><br />Its token form can be scavenged for {{Silver|{{#switch: {{lc:{{#invoke:CosmeticInfo|getRarity|name={{{name}}}}}}}<!--
     -->| common = 200<!--
     -->| common = 200<!--

Revision as of 13:41, 15 March 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
rarity2rarity2

The (special) rarity of the cosmetic

Suggested values
seasonal limited
Stringoptional
unlock_hintunlock_hint

The in-game string for how this cosmetic is obtained. Not required if legacy cosmetic

Stringsuggested
legacylegacy

Whether the cosmetic is obtained from the Legacy Machine. Overrides unlock_hint.

Suggested values
yes
Stringoptional
added_inadded_in

The patch version the cosmetic was added

Example
0.8.0
Stringrequired
unlock_methodunlock_method

Sentences to be used to explain the unlocking method of the cosmetic

Stringrequired
blueprintblueprint

Does the cosmetic have a blueprint form?

Suggested values
yes
Unknownoptional
scavenge_blueprintscavenge_blueprint

Is the blueprint scavengeable?

Booleansuggested
scavenge_cosmeticscavenge_cosmetic

Is the cosmetic token scavengeable?

Booleansuggested
crafting_materialscrafting_materials

The required crafting materials for the cosmetic's blueprint, if it has one. Use a break tag between each material.

Stringoptional