Шаблон:Pet infobox — различия между версиями
Материал из Guild Wars 2 wiki
Blood (обсуждение | вклад) |
|||
Строка 1: | Строка 1: | ||
− | {{infobox status|{{{status|{{ | + | <includeonly>{{#set:Has context=Pet}}<!-- |
+ | -->{{infobox status|{{{status|}}}|{{{status notes|}}}}}<!-- | ||
+ | -->{{infobox requires|{{{requires|{{{release|}}}}}} }}<!-- | ||
− | --><div class="infobox npc"> | + | --><div class="infobox npc" style="overflow:hidden;"> |
<div class="icon infobox-icon"><div style="overflow: visible; width: 44px; height: 40px; display:inline-block; vertical-align:middle;"><div style="margin: -24px; overflow: visible;">[[Has game icon::File:{{{icon|{{{name|{{PAGENAME}}}}}.png}}}|96px]]</div></div></div> | <div class="icon infobox-icon"><div style="overflow: visible; width: 44px; height: 40px; display:inline-block; vertical-align:middle;"><div style="margin: -24px; overflow: visible;">[[Has game icon::File:{{{icon|{{{name|{{PAGENAME}}}}}.png}}}|96px]]</div></div></div> | ||
<p class="heading">[[Has canonical name::{{{name|{{#titleparts:{{PAGENAME}}}}}}}]]</p> | <p class="heading">[[Has canonical name::{{{name|{{#titleparts:{{PAGENAME}}}}}}}]]</p> | ||
<div class="wrapper"> | <div class="wrapper"> | ||
− | <p class="image_wrapper">[[File:{{{image|{{PAGENAME}}.jpg}}}| | + | <p class="image_wrapper">[[File:{{{image|{{PAGENAME}}.jpg}}}|200x250px]]</p> |
;[[Pet#Families and species|Family]] | ;[[Pet#Families and species|Family]] | ||
:{{#if: {{{family|}}} | [[Has pet family::{{ucfirst:{{{family}}}}}]] | <nowiki>{{{family}}}</nowiki> }}<!-- avoids SMW bug which corrupts PAGENAME + PRETAG entities --> | :{{#if: {{{family|}}} | [[Has pet family::{{ucfirst:{{{family}}}}}]] | <nowiki>{{{family}}}</nowiki> }}<!-- avoids SMW bug which corrupts PAGENAME + PRETAG entities --> | ||
;[[Region]] | ;[[Region]] | ||
:{{#if: {{{region|}}} | {{#arraymap: {{{region}}} |,|@@@|[[{{ucfirst:@@@}}]]}} | ''Unknown'' }} | :{{#if: {{{region|}}} | {{#arraymap: {{{region}}} |,|@@@|[[{{ucfirst:@@@}}]]}} | ''Unknown'' }} | ||
+ | ;[[Archetype]] | ||
+ | :{{#if: {{{archetype|}}} | {{#switch: {{lc:{{{archetype}}}}} | ||
+ | | deadly = {{effect|Deadly (Archetype)}} ({{attribute icon|Condition Damage|notext}} {{attribute icon|Precision|notext}}) | ||
+ | | ferocious = {{effect|Ferocious (Archetype)}} ({{attribute icon|Power|notext}} {{attribute icon|Ferocity|notext}}) | ||
+ | | stout = {{effect|Stout (Archetype)}} ({{attribute icon|Toughness|notext}} {{attribute icon|Vitality|notext}}) | ||
+ | | supportive = {{effect|Supportive (Archetype)}} ({{attribute icon|Vitality|notext}} [[File:Healing Power.png|link=Healing|18px|Outgoing Healing]]) | ||
+ | | versatile = {{effect|Versatile (Archetype)}} ({{attribute icon|Vitality|notext}} {{attribute icon|Concentration|notext}}) | ||
+ | }}{{#set: Has pet archetype={{ucfirst:{{{archetype}}}}} (Archetype)}} | ''Unknown'' }} | ||
</div> | </div> | ||
{{clear}} | {{clear}} | ||
</div> | </div> | ||
− | {{quotation|Acht|{{{description|''No description available.''}}}}}<!-- | + | {{quotation|Acht|[[Has game description::{{{description|''No description available.''}}}]]}}<!-- |
AUTOCATEGORIZATION | AUTOCATEGORIZATION | ||
-->{{#if: {{NAMESPACE}}<!-- no categories if outside of article namespace --> | -->{{#if: {{NAMESPACE}}<!-- no categories if outside of article namespace --> | ||
{{#ifeq: {{{categorize|y}}} | n | do not categorize | <!-- categorize --> }} | {{#ifeq: {{{categorize|y}}} | n | do not categorize | <!-- categorize --> }} | ||
{{#switch: {{lc:{{{status|}}}}} | historical | unimplemented | future = do not categorize }} | {{#switch: {{lc:{{{status|}}}}} | historical | unimplemented | future = do not categorize }} | ||
− | |||
| <!-- Do not categorize --> | | | <!-- Do not categorize --> | | ||
{{#switch: {{lc:{{{family|}}}}} | {{#switch: {{lc:{{{family|}}}}} | ||
− | | | + | | armored fish |
− | | shark | + | | shark |
+ | | fish = [[Category:Fish pets]] | ||
+ | | iboga | ||
+ | | jacaranda | ||
+ | | plant = [[Category:Plant pets]] | ||
+ | | smokescale | ||
+ | | bristleback | ||
+ | | saurian = [[Category:Saurian pets]] | ||
| bear | | bear | ||
| bird | | bird | ||
Строка 32: | Строка 48: | ||
| moa | | moa | ||
| porcine | | porcine | ||
+ | | wyvern | ||
| spider = [[Category:{{ucfirst:{{{family}}}}} pets]] | | spider = [[Category:{{ucfirst:{{{family}}}}} pets]] | ||
+ | | animal | ||
+ | | rock gazelle = <!-- no category --> | ||
| #default = [[Category:Pets with unrecognized family]] | | #default = [[Category:Pets with unrecognized family]] | ||
}}{{#arraymap: {{lc:{{{region}}}}} |,|@@@| {{#switch: @@@ | }}{{#arraymap: {{lc:{{{region}}}}} |,|@@@| {{#switch: @@@ | ||
| ascalon = [[Category:Ascalonian pets]] | | ascalon = [[Category:Ascalonian pets]] | ||
+ | | crystal desert = [[Category:Crystal Desert pets]] | ||
| far shiverpeaks = [[Category:Hall of Monuments pets]] | | far shiverpeaks = [[Category:Hall of Monuments pets]] | ||
+ | | heart of maguuma = [[Category:Heart of Maguuma pets]] | ||
| kryta = [[Category:Krytan pets]] | | kryta = [[Category:Krytan pets]] | ||
| maguuma jungle = [[Category:Maguuma pets]] | | maguuma jungle = [[Category:Maguuma pets]] | ||
Строка 42: | Строка 63: | ||
| the mists = [[Category:The Mists pets]] | | the mists = [[Category:The Mists pets]] | ||
| #default = [[Category:Pets with unrecognized region]] | | #default = [[Category:Pets with unrecognized region]] | ||
− | }} |}} | + | }} |
− | }}<noinclude> | + | |}}{{#switch: {{lc:{{{archetype|}}}}} |
+ | | deadly | ||
+ | | ferocious | ||
+ | | stout | ||
+ | | supportive | ||
+ | | versatile = [[Category:{{ucfirst:{{{archetype|}}}}} archetype pets]] | ||
+ | }} | ||
+ | }}</includeonly><noinclude> | ||
===Parameters=== | ===Parameters=== | ||
; name : Optional. Defaults to the name of the article. (<code><nowiki>{{PAGENAME}}</nowiki></code>). | ; name : Optional. Defaults to the name of the article. (<code><nowiki>{{PAGENAME}}</nowiki></code>). | ||
Строка 51: | Строка 79: | ||
; region : Required. [[Region]] where pet is found, not using the parameter will result in ''Unknown''. If pet is found in multiple regions, separate with commas, e.g.: ''Ascalon, Kryta''. | ; region : Required. [[Region]] where pet is found, not using the parameter will result in ''Unknown''. If pet is found in multiple regions, separate with commas, e.g.: ''Ascalon, Kryta''. | ||
; description : Required. The description shown when you charm the pet. | ; description : Required. The description shown when you charm the pet. | ||
+ | ; archetype : Required. The [[soulbeast]] archetype of a given pet. Available options: "deadly", "ferocious", "stout", "supportive", "versatile" | ||
; categorize : Optional. "y" or "n" to turn on/off categorization. Default is on for main namespace articles and off for others. If using "status", don't set this parameter. | ; categorize : Optional. "y" or "n" to turn on/off categorization. Default is on for main namespace articles and off for others. If using "status", don't set this parameter. | ||
; status : Optional. Status of content. Only set if not currently obtainable ingame, displays relevant notice. Available options: "historical", "discontinued", "future", "unimplemented", "current" (default). | ; status : Optional. Status of content. Only set if not currently obtainable ingame, displays relevant notice. Available options: "historical", "discontinued", "future", "unimplemented", "current" (default). | ||
− | ; | + | ; release : Optional. The expansion or living world season required to access the content. Displays a notice of the release. See {{tl|infobox requires}} for options. |
+ | ; status notes : Optional. Allows provision of additional reason for the given status. | ||
+ | ; release : Optional. The expansion or living world season required to access the content. Displays a notice of the release. See {{tl|infobox requires}} for options. | ||
<pre>{{Pet infobox | <pre>{{Pet infobox |
Версия 21:44, 2 мая 2019
Parameters
- name
- Optional. Defaults to the name of the article. (
{{PAGENAME}}
). - icon
- Optional. The pet icon. Do not include the File: namespace prefix or the file extension; the template assumes .png format. Defaults to
name
. - image
- Optional. The pet image. Do not include the File: namespace prefix. Defaults to the page name (
{{PAGENAME}}.jpg
). - family
- Required. Pet family name: moa, bear, drake, etc.
- region
- Required. Region where pet is found, not using the parameter will result in Unknown. If pet is found in multiple regions, separate with commas, e.g.: Ascalon, Kryta.
- description
- Required. The description shown when you charm the pet.
- archetype
- Required. The soulbeast archetype of a given pet. Available options: "deadly", "ferocious", "stout", "supportive", "versatile"
- categorize
- Optional. "y" or "n" to turn on/off categorization. Default is on for main namespace articles and off for others. If using "status", don't set this parameter.
- status
- Optional. Status of content. Only set if not currently obtainable ingame, displays relevant notice. Available options: "historical", "discontinued", "future", "unimplemented", "current" (default).
- release
- Optional. The expansion or living world season required to access the content. Displays a notice of the release. See {{infobox requires}} for options.
- status notes
- Optional. Allows provision of additional reason for the given status.
- release
- Optional. The expansion or living world season required to access the content. Displays a notice of the release. See {{infobox requires}} for options.
{{Pet infobox | name = | icon = | image = | family = | region = | description = }}