Шаблон:Pet infobox — различия между версиями
Материал из Guild Wars 2 wiki
Blood (обсуждение | вклад) |
Blood (обсуждение | вклад) |
||
(не показана 1 промежуточная версия этого же участника) | |||
Строка 1: | Строка 1: | ||
<includeonly>{{#set:Has context=Pet}}<!-- | <includeonly>{{#set:Has context=Pet}}<!-- | ||
-->{{infobox status|{{{status|}}}|{{{status notes|}}}}}<!-- | -->{{infobox status|{{{status|}}}|{{{status notes|}}}}}<!-- | ||
− | -->{{infobox requires|{{{requires|{{{ | + | -->{{infobox requires|{{{requires|}}} }}<!-- |
− | + | -->{{wikipopup|{{{description|}}}}}{{wikipopup quotation|Acht}}<!-- | |
--><div class="infobox npc" style="overflow:hidden;"> | --><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> | + | {{#if: {{ifimage|{{{icon|{{{name|{{PAGENAME}}}}}.png}}}|+}} | <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}}}|200x250px]]</p> | <p class="image_wrapper">[[File:{{{image|{{PAGENAME}}.jpg}}}|200x250px]]</p> | ||
− | ;[[Pet# | + | ;[[Pet#Taxonomy|Family]] |
− | :{{#if: {{{family|}}} | [[Has pet family::{{ucfirst:{{{family}}}}}]] | <nowiki>{{{family}}}</nowiki> }}<!-- avoids SMW bug which corrupts PAGENAME + PRETAG entities --> | + | :{{#if: {{{family|}}} | {{#switch: {{lc:{{{family}}}}} |
+ | | armored fish | ||
+ | | aether hunter | ||
+ | | fanged iboga | ||
+ | | jacaranda | ||
+ | | smokescale | ||
+ | | bristleback | ||
+ | | rock gazelle | ||
+ | | phoenix | ||
+ | | shark | ||
+ | | turtle | ||
+ | | wallow = {{#set:Has pet family={{ucfirst:{{{family}}}}}}} Unique | ||
+ | | #default = [[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]] | ;[[Archetype]] | ||
:{{#if: {{{archetype|}}} | {{#switch: {{lc:{{{archetype}}}}} | :{{#if: {{{archetype|}}} | {{#switch: {{lc:{{{archetype}}}}} | ||
− | | deadly = {{effect|Deadly (Archetype)}} | + | | deadly = {{effect|Deadly (Archetype)}}: {{attribute icon|Condition Damage|notext}}{{attribute icon|Precision|notext}} |
− | | ferocious = {{effect|Ferocious (Archetype)}} | + | | ferocious = {{effect|Ferocious (Archetype)}}: {{attribute icon|Power|notext}}{{attribute icon|Ferocity|notext}} |
− | | stout = {{effect|Stout (Archetype)}} | + | | stout = {{effect|Stout (Archetype)}}: {{attribute icon|Toughness|notext}}{{attribute icon|Vitality|notext}} |
− | | supportive = {{effect|Supportive (Archetype)}} | + | | supportive = {{effect|Supportive (Archetype)}}: {{attribute icon|Vitality|notext}}[[File:Healing Power.png|link=Healing|18px|Outgoing Healing]] |
− | | versatile = {{effect|Versatile (Archetype)}} | + | | versatile = {{effect|Versatile (Archetype)}}: {{attribute icon|Vitality|notext}}{{attribute icon|Concentration|notext}} |
}}{{#set: Has pet archetype={{ucfirst:{{{archetype}}}}} (Archetype)}} | ''Unknown'' }} | }}{{#set: Has pet archetype={{ucfirst:{{{archetype}}}}} (Archetype)}} | ''Unknown'' }} | ||
+ | ;Environment | ||
+ | :{{#switch: {{{underwater|no}}} | no = Terrestrial | yes = Amphibious | only = Aquatic }}{{#set: Is usable underwater={{#switch: {{{underwater|no}}} | no = Land only | yes = Land and Underwater | only = Underwater only }} }} | ||
</div> | </div> | ||
{{clear}} | {{clear}} | ||
</div> | </div> | ||
− | {{quotation|Acht|[[Has game description::{{{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 --> | ||
Строка 30: | Строка 44: | ||
| <!-- Do not categorize --> | | | <!-- Do not categorize --> | | ||
{{#switch: {{lc:{{{family|}}}}} | {{#switch: {{lc:{{{family|}}}}} | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
| bear | | bear | ||
| bird | | bird | ||
Строка 49: | Строка 54: | ||
| porcine | | porcine | ||
| wyvern | | wyvern | ||
− | | spider | + | | spider = [[Category:{{ucfirst:{{{family}}}}} pets]] |
− | | | + | | fanged iboga |
− | | rock gazelle = | + | | jacaranda |
+ | | smokescale | ||
+ | | bristleback | ||
+ | | rock gazelle | ||
+ | | phoenix (race) | ||
+ | | phoenix | ||
+ | | turtle | ||
+ | | wallow = [[Category:Unique terrestrial family pets]] | ||
+ | | armored fish | ||
+ | | shark = [[Category:Unique aquatic family pets]] | ||
+ | | aether hunter = [[Category:Unique terrestrial family pets]] | ||
| #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]] | ||
+ | | cantha = [[Category:Canthan pets]] | ||
| crystal desert = [[Category:Crystal Desert pets]] | | crystal desert = [[Category:Crystal Desert pets]] | ||
| far shiverpeaks = [[Category:Hall of Monuments pets]] | | far shiverpeaks = [[Category:Hall of Monuments pets]] | ||
+ | | horn of maguuma = [[Category:Horn of Maguuma pets]] | ||
| heart of maguuma = [[Category:Heart of Maguuma 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]] | ||
+ | | maguuma wastes = [[Category:Maguuma Wastes pets]] | ||
+ | | ruins of orr = [[Category:Orrian pets]] | ||
+ | | ring of fire = [[Category:Ring of Fire pets]] | ||
| shiverpeak mountains = [[Category:Shiverpeak pets]] | | shiverpeak mountains = [[Category:Shiverpeak pets]] | ||
| the mists = [[Category:The Mists pets]] | | the mists = [[Category:The Mists pets]] | ||
Строка 72: | Строка 92: | ||
}} | }} | ||
}}</includeonly><noinclude> | }}</includeonly><noinclude> | ||
− | ===Parameters=== | + | == Usage == |
+ | <pre>{{Pet infobox | ||
+ | | name = | ||
+ | | icon = | ||
+ | | image = | ||
+ | | description = | ||
+ | | family = | ||
+ | | region = | ||
+ | }}</pre> | ||
+ | |||
+ | === 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>). | ||
; icon : Optional. The pet icon. Do not include the File: namespace prefix or the file extension; the template assumes .png format. Defaults to <code>name</code>. | ; icon : Optional. The pet icon. Do not include the File: namespace prefix or the file extension; the template assumes .png format. Defaults to <code>name</code>. | ||
; image : Optional. The pet image. Do not include the File: namespace prefix. Defaults to the page name (<code><nowiki>{{PAGENAME}}.jpg</nowiki></code>). | ; image : Optional. The pet image. Do not include the File: namespace prefix. Defaults to the page name (<code><nowiki>{{PAGENAME}}.jpg</nowiki></code>). | ||
+ | ; description : Required. The description shown when you charm the pet. | ||
; family : Required. Pet family name: moa, bear, drake, etc. | ; 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''. | ; 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''. | ||
− | |||
; archetype : Required. The [[soulbeast]] archetype of a given pet. Available options: "deadly", "ferocious", "stout", "supportive", "versatile" | ; archetype : Required. The [[soulbeast]] archetype of a given pet. Available options: "deadly", "ferocious", "stout", "supportive", "versatile" | ||
+ | ; underwater : Optional. Defaults to "no", i.e. defaults to stating that a pet is terrestrial. Sets the semantic property [[Property:Is usable underwater|Is usable underwater]]. Options: "yes" (amphibious), "no" (terrestrial), or "only" (aquatic). | ||
; 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). | ||
− | |||
; status notes : Optional. Allows provision of additional reason for the given status. | ; status notes : Optional. Allows provision of additional reason for the given status. | ||
− | ; | + | ; requires : Optional. The expansion or living world season required to access the content. Displays a notice of the release. See {{tl|infobox requires}} for options. |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
+ | === Example === | ||
+ | <pre> | ||
+ | {{Pet infobox | ||
+ | | name = Juvenile Armor Fish | ||
+ | | image = Juvenile Armor Fish.jpg | ||
+ | | description = This durable fish's armor can withstand a tremendous amount of punishment. Armor fish overwhelm their foes with disorienting bash attacks while shrugging off their counterattacks. | ||
+ | | family = Armored Fish | ||
+ | | region = Ascalon, Kryta, Maguuma Jungle, The Mists | ||
+ | | archetype = Stout | ||
+ | | underwater = only | ||
+ | }} | ||
+ | </pre> | ||
+ | {{Pet infobox | ||
+ | | name = Juvenile Armor Fish | ||
+ | | image = Juvenile Armor Fish.jpg | ||
+ | | description = This durable fish's armor can withstand a tremendous amount of punishment. Armor fish overwhelm their foes with disorienting bash attacks while shrugging off their counterattacks. | ||
+ | | family = Armored Fish | ||
+ | | region = Ascalon, Kryta, Maguuma Jungle, The Mists | ||
+ | | archetype = Stout | ||
+ | | underwater = only | ||
+ | }} | ||
[[Category:Infobox templates]]</noinclude> | [[Category:Infobox templates]]</noinclude> |
Текущая версия на 18:17, 3 января 2024
Usage[править]
{{Pet infobox | name = | icon = | image = | description = | family = | region = }}
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
). - description
- Required. The description shown when you charm the pet.
- 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.
- archetype
- Required. The soulbeast archetype of a given pet. Available options: "deadly", "ferocious", "stout", "supportive", "versatile"
- underwater
- Optional. Defaults to "no", i.e. defaults to stating that a pet is terrestrial. Sets the semantic property Is usable underwater. Options: "yes" (amphibious), "no" (terrestrial), or "only" (aquatic).
- 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 notes
- Optional. Allows provision of additional reason for the given status.
- requires
- Optional. The expansion or living world season required to access the content. Displays a notice of the release. See {{infobox requires}} for options.
Example[править]
{{Pet infobox | name = Juvenile Armor Fish | image = Juvenile Armor Fish.jpg | description = This durable fish's armor can withstand a tremendous amount of punishment. Armor fish overwhelm their foes with disorienting bash attacks while shrugging off their counterattacks. | family = Armored Fish | region = Ascalon, Kryta, Maguuma Jungle, The Mists | archetype = Stout | underwater = only }}
“This durable fish's armor can withstand a tremendous amount of punishment. Armor fish overwhelm their foes with disorienting bash attacks while shrugging off their counterattacks.
— Acht