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
iferror usage
Infobox revamp
Line 1: Line 1:
<infobox>
<infobox>
  <title source="title">
<title source="name">
    <default>{{PAGENAME}}</default>
<default>{{PAGENAME}}</default>
  </title>
</title>
  <data source="image"><format>{{AFix|{{{image}}}|270px}}</format></data>
<data source="name">
  <group>
<format>{{AFix|{{{image}}}|270px}}</format>
    <header><center>Details</center></header>
<default>{{#ifexist: File:{{{name}}}.png|{{AFix|{{{name}}}.png|270px}}|{{AFix|{{{image}}}|270px}}}}</default>
    <data source="type">
</data>
      <format>{{#switch: {{lc:{{{type}}}}}<!--
<group>
  -->| hat = [[File:Hat.png|x18px|center|link=]] [[Category:Hats]]<!--
<header><center>Details</center></header>
  -->| accessory = [[File:Accessory.png|x18px|center|link=]] [[Category:Accessories]]<!--
<data source="name">
  -->| aura = [[File:Aura.png|x18px|center|link=]] [[Category:Auras]]<!--
<format>{{#switch: {{lc:{{#invoke:CosmeticInfo|getType|name={{{name}}}}}}}<!--
  -->| trail = [[File:Trail.png|x18px|center|link=]] [[Category:Trails]]<!--
-->| hat = [[File:Hat.png|x18px|center|link=]] [[Category:Hats]]<!--
  -->| cloak = [[File:Cloak.png|x18px|center|link=]] [[Category:Cloaks]]<!--
-->| accessory = [[File:Accessory.png|x18px|center|link=]] [[Category:Accessories]]<!--
      -->| rod = [[File:Rod.png|x18px|center|link=]] [[Category:Rods]]}}</format>
-->| aura = [[File:Aura.png|x18px|center|link=]] [[Category:Auras]]<!--
-->| trail = [[File:Trail.png|x18px|center|link=]] [[Category:Trails]]<!--
-->| cloak = [[File:Cloak.png|x18px|center|link=]] [[Category:Cloaks]]<!--
-->| rod = [[File:Rod.png|x18px|center|link=]] [[Category:Rods]]}}</format>
</data>
<data source="name">
<format>{{#switch: {{lc:{{#invoke:CosmeticInfo|getRarity|name={{{name}}}}}}}<!--
-->| common = [[File:Common.png|x18px|center|link=]]<!--
-->| uncommon = [[File:Uncommon.png|x18px|center|link=]]<!--
-->| rare = [[File:Rare.png|x18px|center|link=]]<!--
-->| epic = [[File:Epic.png|x18px|center|link=]]<!--
-->| legendary = [[File:Legendary.png|x18px|center|frameless|link=]]<!--
-->| mythic = [[File:Mythic.png|x18px|center|link=]]}}[[Category:{{ucfirst:{{{rarity}}}}} Cosmetics]]</format>
</data>
<data source="rarity2">
<format>{{#switch: {{lc:{{{rarity2}}}}}<!--
-->| seasonal = [[File:Seasonal.png|x18px|center|link=]]<!--
-->| limited = [[File:Limited.png|x18px|center|link=]]}}[[Category:{{ucfirst:{{{rarity2}}}}} Cosmetics]]</format>
</data>
<data source="name">
<format>{{#if:{{#invoke:CosmeticInfo|isColorable|name={{{name}}}}}|<center>[[File:Icon-Color.png|20px]] Colorable</center>[[Category:Colorable Cosmetics]]}}</format>
</data>
</group>
<data source="added">
<format><center>Added in [[{{{added}}}]]<br />({{PatchDate|{{{added}}}}})</center></format>
</data>
<group>
<header><center>Collection</center></header>
<data source="name">
<format><center>{{#switch: {{lc:{{#invoke:CosmeticInfo|getCollection|name={{{name}}}}}}}<!--
-->| oceanic | natural | mechanical | magical | royal | hidden | special | bonus =<!--
-->[[File:{{ucfirst:{{{collection}}}}} Collection.png|32px|center|link={{ucfirst:{{{collection}}}}} Collection]]<!--
--> [[{{ucfirst:{{{collection}}}}} Collection]] [[Category:{{ucfirst:{{{collection}}}}} Collection Cosmetics]]<!--
-->| mythic gate = [[File:Icon-Mastery-Gate.png|32px|center|link=Mythic Gate Collection]] [[Mythic Gate Collection]]<!--
--> [[Category:Mythic Gate Collection Cosmetics]]<!--
-->| secret styles = [[File:Secret Styles Collection.png|32px|center|link=Secret Styles Collection]] [[Secret Styles Collection]]<!--
--> [[Category:Secret Styles Collection Cosmetics]]<!--
-->| pose one = [[File:Icon-Pose.png|32px|center|link=Pose One Collection]] [[Pose One Collection]]<!--
--> [[Category:Pose One Collection Cosmetics]]<!--
-->| pose two = [[File:Pose Two Collection.png|32px|center|link=Pose Two Collection]] [[Pose Two Collection]]<!--
--> [[Category:Pose Two Collection Cosmetics]]<!--
-->| splinters = [[File:Icon-Splinters-Workshop.png|32px|center|link=Splinters Collection]] [[Splinters Collection]]<!--
--> [[Category:Splinters Collection Cosmetics]]<!--
-->| tgttos = [[File:Icon TGTTOS.png|32px|center|link=TGTTOS Collection]] [[TGTTOS Collection]]<!--
--> [[Category:TGTTOS Collection Cosmetics]]<!--
-->| hitw = [[File:Icon HITW .png|32px|center|link=HITW Collection]] [[HITW Collection]]<!--
--> [[Category:HITW Collection Cosmetics]]<!--
-->| battle box | bb = [[File:Icon BB.png|32px|center|link=Battle Box Collection]] [[Battle Box Collection]]<!--
--> [[Category:Battle Box Collection Cosmetics]]<!--
-->| sky battle | skb | sb = [[File:Icon SB.png|32px|center|link=Sky Battle Collection]] [[Sky Battle Collection]]<!--
--> [[Category:Sky Battle Collection Cosmetics]]<!--
-->| parkour warrior | pkw = [[File:Icon PKW.png|32px|center|link=Parkour Warrior Collection]] [[Parkour Warrior Collection]]<!--
--> [[Category:Parkour Warrior Collection Cosmetics]]<!--
-->| dynaball | dyb = [[File:Icon DYB.png|32px|center|link=Dynaball Collection]] [[Dynaball Collection]]<!--
--> [[Category:Dynaball Collection Cosmetics]]<!--
-->| mystical aquatic | season 1 | season one = [[File:Mystical Aquatic Token.png|32px|center|link=Mystical Aquatic Collection]]<!--
--> [[Mystical Aquatic Collection]] [[Category:Mystical Aquatic Collection Cosmetics]]<!--
-->| neon galaxy | season 2 | season two = [[File:Neon Galaxy Token.png|32px|center|link=Neon Galaxy Collection]] [[Neon Galaxy Collection]]<!--
--> [[Category:Neon Galaxy Collection Cosmetics]]<!--
-->| candy factory | season 3 | season three = [[File:Candy Factory Token.png|32px|center|link=Candy Factory Collection]]<!--
--> [[Candy Factory Collection]] [[Category:Candy Factory Collection Cosmetics]]<!--
-->| ancient jungle | season 4 | season four = [[File:Ancient Jungle Token.png|32px|center|link=Ancient Jungle Collection]]<!--
--> [[Ancient Jungle Collection]] [[Category:Ancient Jungle Collection Cosmetics]]<!--
-->| squidtek = [[File:Squidtek Ambassador Badge.png|32px|center|link=Squidtek Collection]] [[Squidtek Collection]]<!--
--> [[Category:Squidtek Collection Cosmetics]]<!--
-->| spooky = [[File:Spooky Huntmaster Badge.png|32px|center|link=Spooky Collection]] [[Spooky Collection]]<!--
--> [[Category:Spooky Collection Cosmetics]]<!--
-->| aura | trail = [[File:Icon-{{ucfirst:{{{collection}}}}}.png|32px|center|link={{ucfirst:{{{collection}}}}} Collection]]<!--
--> [[{{ucfirst:{{{collection}}}}} Collection]] [[Category:{{ucfirst:{{{collection}}}}} Collection Cosmetics]]}}</center></format>
</data>
</group>
<group>
<header><center>Obtaining</center></header>
<data source="obtaining">
<format><center>{{{obtaining}}}</center></format>
</data>
</group>
<group layout="horizontal">
<header><center>Value</center></header>
<data source="name">
<label>[[File:Style Trophy.png|32px]]</label>
<format>{{#if: {{#invoke:CosmeticInfo|isBonusTrophies|name={{{name}}}}}||{{#invoke:CosmeticInfo|getTrophiesAwarded|name={{{name}}}}} {{#if:{{#invoke:CosmeticInfo|isColorable|name={{{name}}}}}|([[File:Icon-Color.png|20px]]+10)|}}}}</format>
</data>
<data source="name">
<label>[[File:Icon-Champion Score Bonus.png|32px]]</label>
<format>{{#if: {{#invoke:CosmeticInfo|isBonusTrophies|name={{{name}}}}}|{{#invoke:CosmeticInfo|getTrophiesAwarded|name={{{name}}}}} {{#if:{{#invoke:CosmeticInfo|isColorable|name={{{name}}}}}|([[File:Icon-Color.png|20px]]+10)|}}</format>
</data>
<data source="name">
<label>[[File:Royal Reputation.png|32px]]</label>
<format>{{#if: {{#invoke:CosmeticInfo|canBeDonated|name={{{name}}}}}|
{{#switch: {{lc:{{#invoke:CosmeticInfo|getRarity|name={{{name}}}}}}}<!--
-->| common = 1<!--
-->| uncommon = 2<!--
-->| rare = 3<!--
-->| epic = 5<!--
-->| legendary = 7<!--
-->| mythic = 10}}</format>
     </data>
     </data>
    <data source="rarity">
</group>
      <format>{{#switch: {{lc:{{{rarity}}}}}<!--
<group layout="horizontal">
  -->| common = [[File:Common.png|x18px|center|link=]]<!--
<header><center>Scavenging</center></header>
  -->| uncommon = [[File:Uncommon.png|x18px|center|link=]]<!--
<data source="scavenge_cosmetic">
  -->| rare = [[File:Rare.png|x18px|center|link=]]<!--
<label>Cosmetic Token</label>
  -->| epic = [[File:Epic.png|x18px|center|link=]]<!--
<format>{{#switch: {{lc:{{#invoke:CosmeticInfo|getRarity|name={{{name}}}}}}}<!--
  -->| legendary = [[File:Legendary.png|x18px|center|frameless|link=]]<!--
-->| common = 200 [[File:Silver.png|20px]]<!--
  -->| mythic = [[File:Mythic.png|x18px|center|link=]]}}[[Category:{{ucfirst:{{{rarity}}}}} Cosmetics]]</format>
-->| uncommon = 750 [[File:Silver.png|20px]]<!--
    </data>
-->| rare = 2,000 [[File:Silver.png|20px]]<!--
    <data source="rarity2">
-->| epic = 3,750 [[File:Silver.png|20px]]<!--
      <format>{{#switch: {{lc:{{{rarity2}}}}}<!--
-->| legendary = 6,250 [[File:Silver.png|20px]]<!--
  -->| seasonal = [[File:Seasonal.png|x18px|center|link=]]<!--
-->| mythic = 18,000 [[File:Silver.png|20px]]}}</format>
  -->| limited = [[File:Limited.png|x18px|center|link=]]}}[[Category:{{ucfirst:{{{rarity2}}}}} Cosmetics]]</format>
</data>
    </data>
<data source="scavenge_blueprint">
    <data source="chroma_applicable">
<label>Blueprint</label>
      <format><center>[[File:Icon-Color.png|20px]] Chroma Applicable</center>[[Category:Chroma Applicable Cosmetics]]</format>
<format>{{#switch: {{lc:{{#invoke:CosmeticInfo|getRarity|name={{{name}}}}}}}<!--
    </data>
-->| common = 50 [[File:Silver.png|20px]]<!--
  </group>
-->| uncommon = 150 [[File:Silver.png|20px]]<!--
  <data source="added">
-->| rare = 300 [[File:Silver.png|20px]]<!--
    <format><center>Added in [[{{{added}}}]]<br />({{PatchDate|{{{added}}}}})</center></format>
-->| epic = 850 [[File:Silver.png|20px]]<!--
  </data>
-->| legendary = 1,200 [[File:Silver.png|20px]]<!--
  <data source="added_date">
-->| mythic = 3,500 [[File:Silver.png|20px]]}}</format>
    <format><center>Added on {{{added_date}}}</center></format>
</data>
  </data>
</group>
  <group>
<group>
    <header><center>Collection</center></header>
<header><center>Global Number Owned{{#invoke:CosmeticInfo|lastUpdatedIcon}}</center></header>
    <data source="collection">
<data source="name">
      <format><center>{{#switch: {{lc:{{{collection}}}}}<!--
<format>{{#if:{{#invoke:CosmeticInfo|getOwnershipNumber|name={{PAGENAME}}}}|<center>{{#invoke:CosmeticInfo|getOwnershipNumber|name={{PAGENAME}}}}</center>}}</format>
  -->| oceanic | natural | mechanical | magical | royal | hidden | special | bonus =<!--
</data>
  -->[[File:{{ucfirst:{{{collection}}}}} Collection.png|32px|center|link={{ucfirst:{{{collection}}}}} Collection]]<!--
</group>
  --> [[{{ucfirst:{{{collection}}}}} Collection]] [[Category:{{ucfirst:{{{collection}}}}} Collection Cosmetics]]<!--
</infobox>
  -->| mythic gate = [[File:Icon-Mastery-Gate.png|32px|center|link=Mythic Gate Collection]] [[Mythic Gate Collection]]<!--
{{#if:{{#invoke:CosmeticInfo|getDescription|name={{#titleparts: {{PAGENAME}}}}}}|<blockquote>{{#invoke:CosmeticInfo|getDescription|name={{#titleparts: {{PAGENAME}}}}}}</blockquote>}}
  --> [[Category:Mythic Gate Collection Cosmetics]]<!--
  -->| secret styles = [[File:Secret Styles Collection.png|32px|center|link=Secret Styles Collection]] [[Secret Styles Collection]]<!--
  --> [[Category:Secret Styles Collection Cosmetics]]<!--
  -->| pose one = [[File:Icon-Pose.png|32px|center|link=Pose One Collection]] [[Pose One Collection]]<!--
  --> [[Category:Pose One Collection Cosmetics]]<!--
  -->| pose two = [[File:Pose Two Collection.png|32px|center|link=Pose Two Collection]] [[Pose Two Collection]]<!--
  --> [[Category:Pose Two Collection Cosmetics]]<!--
  -->| splinters = [[File:Icon-Splinters-Workshop.png|32px|center|link=Splinters Collection]] [[Splinters Collection]]<!--
  --> [[Category:Splinters Collection Cosmetics]]<!--
  -->| tgttos = [[File:Icon TGTTOS.png|32px|center|link=TGTTOS Collection]] [[TGTTOS Collection]]<!--
  --> [[Category:TGTTOS Collection Cosmetics]]<!--
  -->| hitw = [[File:Icon HITW .png|32px|center|link=HITW Collection]] [[HITW Collection]]<!--
  --> [[Category:HITW Collection Cosmetics]]<!--
  -->| battle box | bb = [[File:Icon BB.png|32px|center|link=Battle Box Collection]] [[Battle Box Collection]]<!--
  --> [[Category:Battle Box Collection Cosmetics]]<!--
  -->| sky battle | skb | sb = [[File:Icon SB.png|32px|center|link=Sky Battle Collection]] [[Sky Battle Collection]]<!--
  --> [[Category:Sky Battle Collection Cosmetics]]<!--
  -->| parkour warrior | pkw = [[File:Icon PKW.png|32px|center|link=Parkour Warrior Collection]] [[Parkour Warrior Collection]]<!--
  --> [[Category:Parkour Warrior Collection Cosmetics]]<!--
  -->| dynaball | dyb = [[File:Icon DYB.png|32px|center|link=Dynaball Collection]] [[Dynaball Collection]]<!--
  --> [[Category:Dynaball Collection Cosmetics]]<!--
  -->| mystical aquatic | season 1 | season one = [[File:Mystical Aquatic Token.png|32px|center|link=Mystical Aquatic Collection]]<!--
  --> [[Mystical Aquatic Collection]] [[Category:Mystical Aquatic Collection Cosmetics]]<!--
  -->| neon galaxy | season 2 | season two = [[File:Neon Galaxy Token.png|32px|center|link=Neon Galaxy Collection]] [[Neon Galaxy Collection]]<!--
  --> [[Category:Neon Galaxy Collection Cosmetics]]<!--
  -->| candy factory | season 3 | season three = [[File:Candy Factory Token.png|32px|center|link=Candy Factory Collection]]<!--
  --> [[Candy Factory Collection]] [[Category:Candy Factory Collection Cosmetics]]<!--
  -->| ancient jungle | season 4 | season four = [[File:Ancient Jungle Token.png|32px|center|link=Ancient Jungle Collection]]<!--
  --> [[Ancient Jungle Collection]] [[Category:Ancient Jungle Collection Cosmetics]]<!--
  -->| squidtek = [[File:Squidtek Ambassador Badge.png|32px|center|link=Squidtek Collection]] [[Squidtek Collection]]<!--
  --> [[Category:Squidtek Collection Cosmetics]]<!--
  -->| spooky = [[File:Spooky Huntmaster Badge.png|32px|center|link=Spooky Collection]] [[Spooky Collection]]<!--
  --> [[Category:Spooky Collection Cosmetics]]<!--
  -->| aura | trail = [[File:Icon-{{ucfirst:{{{collection}}}}}.png|32px|center|link={{ucfirst:{{{collection}}}}} Collection]]<!--
  --> [[{{ucfirst:{{{collection}}}}} Collection]] [[Category:{{ucfirst:{{{collection}}}}} Collection Cosmetics]]}}</center></format>
    </data>
  </group>
  <group>
    <header><center>Obtaining</center></header>
    <data source="obtaining">
    <format><center>{{{obtaining}}}</center></format>
    </data>
  </group>
  <group layout="horizontal">
    <header><center>Value</center></header>
    <data source="trophies">
    <label>[[File:Style Trophy.png|32px]]</label>
      <format>{{{trophies}}} {{#ifeq: {{{chroma_applicable|}}}|yes|([[File:Icon-Color.png|20px]]+10)|}}</format>
    </data>
    <data source="bonus_trophies">
    <label>[[File:Icon-Champion Score Bonus.png|32px]]</label>
      <format>{{{bonus_trophies}}} {{#ifeq: {{{chroma_applicable|}}}|yes|([[File:Icon-Color.png|20px]]+10)|}}</format>
    </data>
    <data source="reputation">
    <label>[[File:Royal Reputation.png|32px]]</label>
    <format>{{#switch: {{lc:{{{rarity}}}}}<!--
  -->| common = 1<!--
  -->| uncommon = 2<!--
  -->| rare = 3<!--
  -->| epic = 5<!--
  -->| legendary = 7<!--
  -->| mythic = 10}}</format>
    </data>
  </group>
  <group layout="horizontal">
    <header><center>Scavenging</center></header>
    <data source="scavenge_cosmetic">
    <label>Cosmetic Token</label>
    <format>{{#switch: {{lc:{{{rarity}}}}}<!--
  -->| common = 200 [[File:Silver.png|20px]]<!--
  -->| uncommon = 750 [[File:Silver.png|20px]]<!--
  -->| rare = 2,000 [[File:Silver.png|20px]]<!--
  -->| epic = 3,750 [[File:Silver.png|20px]]<!--
  -->| legendary = 6,250 [[File:Silver.png|20px]]<!--
  -->| mythic = 18,000 [[File:Silver.png|20px]]}}</format>
    </data>
    <data source="scavenge_blueprint">
    <label>Blueprint</label>
    <format>{{#switch: {{lc:{{{rarity}}}}}<!--
  -->| common = 50 [[File:Silver.png|20px]]<!--
  -->| uncommon = 150 [[File:Silver.png|20px]]<!--
  -->| rare = 300 [[File:Silver.png|20px]]<!--
  -->| epic = 850 [[File:Silver.png|20px]]<!--
  -->| legendary = 1,200 [[File:Silver.png|20px]]<!--
      -->| mythic = 3,500 [[File:Silver.png|20px]]}}</format>
    </data>
  </group>
  <group>
    <header><center>Global Number Owned{{#invoke:CosmeticOwnership|lastUpdatedIcon}}</center></header>
    <data source="image">
    <format>{{#if:{{#invoke:CosmeticOwnership|getOwnershipNumber|name={{PAGENAME}}}}|<center>{{#invoke:CosmeticOwnership|getOwnershipNumber|name={{PAGENAME}}}}</center>}}</format>
    </data>
  </group>
</infobox>{{#if:{{#iferror:{{#invoke:CosmeticDescription|getDescription|name={{#titleparts: {{PAGENAME}}}}}}|}}|<blockquote>{{#invoke:CosmeticDescription|getDescription|name={{#titleparts: {{PAGENAME}}}}}}</blockquote>}}
<noinclude>
<noinclude>
<templatedata>
<templatedata>

Revision as of 08:01, 15 March 2025

No data found

Creates a cosmetic infobox

Template parameters[Edit template data]

ParameterDescriptionTypeStatus
titletitle

Give the infobox a custom title (defaults to page name)

Stringoptional
imageimage

Image or GIF of the cosmetic

Filesuggested
typetype

The cosmetic type

Suggested values
hat accessory aura trail cloak rod
Stringsuggested
rarityrarity

The rarity of the cosmetic

Suggested values
common uncommon rare epic legendary mythic
Stringsuggested
rarity2rarity2

The (special) rarity of the cosmetic

Suggested values
seasonal limited
Stringoptional
chroma_applicablechroma_applicable

Is cosmetic chroma applicable

Booleansuggested
addedadded

Patch (& date) the cosmetic was added

Stringsuggested
collectioncollection

The collection the cosmetic is part of.

Suggested values
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
Stringsuggested
obtainingobtaining

A short description of how this cosmetic is obtained

Stringsuggested
trophiestrophies

The amount of trophies received for having this cosmetic

Stringsuggested
bonus_trophiesbonus_trophies

The amount of bonus trophies received for having this cosmetic

Stringoptional
reputationreputation

The amount of reputation earned for scavenging this cosmetic

Numbersuggested
scavenge_cosmeticscavenge_cosmetic

Is item scavengeable

Booleansuggested
scavenge_blueprintscavenge_blueprint

Is blueprint scavengeable

Booleansuggested