Template:Cosmetic: Difference between revisions
Template page
More actions
oh... |
scavenging/blueprint info now automated + updated templatedata |
||
(13 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| | <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=" | <data source="name"> | ||
<format>{{#switch: {{ | <format>{{#switch: {{#invoke:CosmeticInfo|getType|name={{{name}}}}}<!-- | ||
-->| | -->| #default = [[File:{{#invoke:CosmeticInfo|getType|name={{{name}}}}}.png|x18px|center|link=]]<!-- | ||
-->| | -->| 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 50: | Line 56: | ||
<header><center>Unlock Hint</center></header> | <header><center>Unlock Hint</center></header> | ||
<data source="name"> | <data source="name"> | ||
<format> | <format><center>{{#invoke:CosmeticInfo|getObtainmentHint|name={{{name}}}}}</center></format> | ||
</data> | </data> | ||
</group> | </group> | ||
Line 63: | Line 66: | ||
</data> | </data> | ||
<data source="name"> | <data source="name"> | ||
<label>[[File: | <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>{{# | <format>{{#ifexpr:{{#invoke:CosmeticInfo|getReputationAmount|name={{{name}}}}}>0|{{#invoke:CosmeticInfo|getReputationAmount|name={{{name}}}}}}}</format> | ||
</data> | </data> | ||
</group> | </group> | ||
<group layout="horizontal"> | <group layout="horizontal"> | ||
<header><center>Scavenging</center></header> | <header><center>Scavenging</center></header> | ||
<data source=" | <data source="name"> | ||
<label>Cosmetic Token</label> | <label>Cosmetic Token</label> | ||
<format>{{# | <format>{{#ifexpr:{{#invoke:CosmeticInfo|getReputationAmount|name={{{name}}}}}>0|{{CosmeticScavengeRewards|name={{{name}}}}}}}</format> | ||
</data> | </data> | ||
<data source=" | <data source="name"> | ||
<label>Blueprint</label> | <label>Blueprint</label> | ||
<format>{{# | <format>{{#ifexpr:{{#invoke:CosmeticInfo|getReputationAmount|name={{{name}}}}}>0|{{CosmeticScavengeRewards|name={{{name}}}|Blueprint}}}}</format> | ||
</data> | </data> | ||
</group> | </group> | ||
Line 108: | Line 92: | ||
</group> | </group> | ||
</infobox> | </infobox> | ||
{{#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|}}}|crafting_materials={{{crafting_materials|}}}}}</includeonly><noinclude><templatedata> | |||
| | |||
}}}}</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" | ||
}, | }, | ||
"added_in": { | "added_in": { | ||
Line 167: | Line 116: | ||
"type": "string", | "type": "string", | ||
"example": "June 12th, 2024" | "example": "June 12th, 2024" | ||
}, | }, | ||
"unlock_method": { | "unlock_method": { | ||
"description": " | "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": " | "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" | ||
} | } | ||
}, | }, | ||
Line 210: | Line 131: | ||
"name", | "name", | ||
"image", | "image", | ||
"added_in", | "added_in", | ||
"added_date", | "added_date", | ||
"unlock_method", | "unlock_method", | ||
"crafting_materials" | "crafting_materials" | ||
] | ] |
Latest revision as of 15:28, 30 August 2025
Creates an infobox and various standard sentences for Cosmetics pages.
Parameter | Description | Type | Status | |
---|---|---|---|---|
name | name | The name of the cosmetic
| String | required |
image | image | The (animated) image of the cosmetic, if the file is not found at File:{{{name}}}.png | File | optional |
added_in | added_in | The patch version the cosmetic was added
| String | required |
added_date | added_date | If not added in a patch, the date on which the cosmetic was added
| String | optional |
unlock_method | unlock_method | If non-standard unlock method, sentences to be used to explain it | String | required |
crafting_materials | crafting_materials | If cosmetic has blueprint with a non-standard recipe, the required crafting materials with a break tag between each material. | String | optional |