Template:Cosmetic: Difference between revisions
Template page
More actions
iferror usage |
Infobox revamp |
||
Line 1: | Line 1: | ||
<infobox> | <infobox> | ||
<title source="name"> | |||
<default>{{PAGENAME}}</default> | |||
</title> | |||
<data source="name"> | |||
<format>{{AFix|{{{image}}}|270px}}</format> | |||
<default>{{#ifexist: File:{{{name}}}.png|{{AFix|{{{name}}}.png|270px}}|{{AFix|{{{image}}}|270px}}}}</default> | |||
</data> | |||
<group> | |||
<header><center>Details</center></header> | |||
<data source="name"> | |||
<format>{{#switch: {{lc:{{#invoke:CosmeticInfo|getType|name={{{name}}}}}}}<!-- | |||
-->| hat = [[File:Hat.png|x18px|center|link=]] [[Category:Hats]]<!-- | |||
-->| accessory = [[File:Accessory.png|x18px|center|link=]] [[Category:Accessories]]<!-- | |||
-->| 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> | ||
</group> | |||
<group layout="horizontal"> | |||
<header><center>Scavenging</center></header> | |||
<data source="scavenge_cosmetic"> | |||
<label>Cosmetic Token</label> | |||
<format>{{#switch: {{lc:{{#invoke:CosmeticInfo|getRarity|name={{{name}}}}}}}<!-- | |||
-->| 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:{{#invoke:CosmeticInfo|getRarity|name={{{name}}}}}}}<!-- | |||
-->| 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:CosmeticInfo|lastUpdatedIcon}}</center></header> | |||
<data source="name"> | |||
<format>{{#if:{{#invoke:CosmeticInfo|getOwnershipNumber|name={{PAGENAME}}}}|<center>{{#invoke:CosmeticInfo|getOwnershipNumber|name={{PAGENAME}}}}</center>}}</format> | |||
</data> | |||
</group> | |||
</infobox> | |||
{{#if:{{#invoke:CosmeticInfo|getDescription|name={{#titleparts: {{PAGENAME}}}}}}|<blockquote>{{#invoke:CosmeticInfo|getDescription|name={{#titleparts: {{PAGENAME}}}}}}</blockquote>}} | |||
</infobox>{{#if | |||
<noinclude> | <noinclude> | ||
<templatedata> | <templatedata> |
Revision as of 08:01, 15 March 2025
No data found
Creates a cosmetic infobox
Parameter | Description | Type | Status | |
---|---|---|---|---|
title | title | Give the infobox a custom title (defaults to page name) | String | optional |
image | image | Image or GIF of the cosmetic | File | suggested |
type | type | The cosmetic type
| String | suggested |
rarity | rarity | The rarity of the cosmetic
| String | suggested |
rarity2 | rarity2 | The (special) rarity of the cosmetic
| String | optional |
chroma_applicable | chroma_applicable | Is cosmetic chroma applicable | Boolean | suggested |
added | added | Patch (& date) the cosmetic was added | String | suggested |
collection | collection | The collection the cosmetic is part of.
| String | suggested |
obtaining | obtaining | A short description of how this cosmetic is obtained | String | suggested |
trophies | trophies | The amount of trophies received for having this cosmetic | String | suggested |
bonus_trophies | bonus_trophies | The amount of bonus trophies received for having this cosmetic | String | optional |
reputation | reputation | The amount of reputation earned for scavenging this cosmetic | Number | suggested |
scavenge_cosmetic | scavenge_cosmetic | Is item scavengeable | Boolean | suggested |
scavenge_blueprint | scavenge_blueprint | Is blueprint scavengeable | Boolean | suggested |