Шаблон:Object infobox — различия между версиями
Материал из Guild Wars 2 wiki
Blood (обсуждение | вклад) |
|||
(не показана 1 промежуточная версия этого же участника) | |||
Строка 1: | Строка 1: | ||
− | {{infobox status|{{{status|{{ | + | <includeonly>{{#set:Has context=Object}}<!-- |
+ | -->{{infobox status|{{{status|}}}|{{{status notes|}}}|date={{{status date|}}}}}<!-- | ||
+ | -->{{infobox requires|{{{requires|}}} }}<!-- | ||
− | --><div class="infobox npc">{{# | + | --><div class="infobox npc"> |
− | <div class="icon">{{# | + | {{#if:{{{icon|}}} |
− | + | | <div class="icon">[[Has game icon::File:{{#vardefineecho:icon|{{{icon}}}}}|40x40px]]</div> | |
| {{#switch:{{lc:{{{type|}}}}} | | {{#switch:{{lc:{{{type|}}}}} | ||
− | | | + | | hero challenge = <div class="icon">[[Has game icon::File:{{#vardefineecho:icon|Hero challenge.png}}|40x40px]]</div> |
− | | | + | | mastery insight (central tyria) = <div class="icon">[[Has game icon::File:{{#vardefineecho:icon|Mastery point (Central Tyria).png}}|40x40px]]</div> |
− | | # | + | | mastery insight (heart of thorns) = <div class="icon">[[Has game icon::File:{{#vardefineecho:icon|Mastery point (Heart of Thorns).png}}|40x40px]]</div> |
+ | | mastery insight (path of fire) = <div class="icon">[[Has game icon::File:{{#vardefineecho:icon|Mastery point (Path of Fire).png}}|40x40px]]</div> | ||
+ | | mastery insight (icebrood saga) = <div class="icon">[[Has game icon::File:{{#vardefineecho:icon|Mastery point (Icebrood Saga).png}}|40x40px]]</div> | ||
+ | | mastery insight (end of dragons) = <div class="icon">[[Has game icon::File:{{#vardefineecho:icon|Mastery point (End of Dragons).png}}|40x40px]]</div> | ||
+ | | #default = {{ifimage|{{PAGENAME}}.png|<div class="icon">[[Has game icon::File:{{#vardefineecho:icon|{{PAGENAME}}.png}}|40x40px]]</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">{{#ifeq: {{{image}}} | no | <!-- Not visible or necessary--> | <p class="image_wrapper">{{#if: {{{image|}}} |
− | + | | [[Has appearance::File:{{{image}}}|240x300px]] | |
− | + | | {{#vardefine:default|File:{{#replace:{{#titleparts:{{PAGENAME}}}}|:|-}}.jpg}} {{#ifexist:{{#var:default}} <!-- Default file name to display --> | |
− | | {{# | + | | [[Has appearance::{{#var:default}}|240x300px]] |
− | + | | [[{{#var:default}}|Upload an image of this object.]]<!-- Red link to file upload page --> | |
− | |||
}} | }} | ||
}} | }} | ||
− | </p> | + | </p> }} |
− | {{#if:{{{summon|}}}| | + | {{#if: {{{summon|}}} | |
;[[Summon]] | ;[[Summon]] | ||
− | :{{ | + | :{{cname|{{ucfirst:{{{summon}}}}}}} |
− | + | }}{{#if: {{{location|}}} | {{infobox location|{{{location}}}}} | |
− | |||
− | |||
− | |||
− | |||
− | }}{{#if: {{{location | ||
}}{{#if: {{{region|}}} | | }}{{#if: {{{region|}}} | | ||
;[[Region]] | ;[[Region]] | ||
:{{#arraymap: {{{region}}} |,|@@@|[[@@@]]|<br>}} | :{{#arraymap: {{{region}}} |,|@@@|[[@@@]]|<br>}} | ||
}}{{#if: {{{type|}}} | | }}{{#if: {{{type|}}} | | ||
− | ;[[Object| | + | ;[[Object|Тип]] |
:{{#switch:{{lc: {{{type|}}} }} | :{{#switch:{{lc: {{{type|}}} }} | ||
− | | tree | mine | plant = [[Has object type:: | + | | tree | mine | plant | resource node = [[Gathering#Resource nodes|Resource node]]{{#set:Has object type=Resource node}}{{#if: {{{resource type|}}} | {{#set:Has gathering node type={{ucfirst:{{{resource type}}}}}}} }} |
| bundle | | bundle | ||
| environmental | | environmental | ||
| environmental weapon = [[Has object type::Bundle]] | | environmental weapon = [[Has object type::Bundle]] | ||
− | | | + | | static weapon = [[Has object type::Bundle|Static Environmental Weapon]] |
| hero challenge = [[Has object type::Hero challenge]] | | hero challenge = [[Has object type::Hero challenge]] | ||
+ | | mastery insight (central tyria) | ||
+ | | mastery insight (heart of thorns) | ||
+ | | mastery insight (path of fire) | ||
+ | | mastery insight (icebrood saga) | ||
+ | | mastery insight (end of dragons) = [[Has object type::Mastery Insight]] | ||
| #default = [[Has object type::{{ucfirst:{{{type}}}}}]] | | #default = [[Has object type::{{ucfirst:{{{type}}}}}]] | ||
}} }}{{ #if: {{{goal|}}} | | }} }}{{ #if: {{{goal|}}} | | ||
− | ; | + | ;Часть |
− | :[[{{{goal}}}]] | + | :[[{{{goal}}}]] |
}}{{ #if: {{{req|}}} | | }}{{ #if: {{{req|}}} | | ||
− | ; | + | ;Требует |
− | :[[{{{req}}}]] | + | :[[Has tool requirement::{{{req}}}]] |
}}{{ #if: {{{gives|}}} | | }}{{ #if: {{{gives|}}} | | ||
− | ; | + | ;Дает |
− | :{{#arraymap:{{{gives|}}}|,|@@@| | + | :{{#arraymap:{{{gives|}}}|,|@@@|{{cname|@@@}}|<br>}} |
}} | }} | ||
− | ; | + | ;Взаимодействие |
− | :{{# | + | :{{#switch:{{lc:{{{interact|y}}}}}|y|yes=[[Is interactive::Y|Да]]|n|no=[[Is interactive::N|Нет]]}} |
− | ; | + | ;Разрушаемость |
− | :{{# | + | :{{#switch:{{lc:{{{destruct|n}}}}}|y|yes=[[Is destructible::Y|Да]]|n|no=[[Is destructible::N|Нет]]}} |
</div> | </div> | ||
− | {{#if: {{ | + | {{#if: {{{gallery1|}}}{{ifimage|{{PAGENAME}} location.jpg|exists}}{{{coordinates|}}}{{{path|}}} | |
− | {{!}}''' | + | {{{!}} class="collapsible" style="width:100%;" |
− | {{!}}- | + | {{!}} '''Other images''' |
− | + | {{!}}- style="text-align:center;" | |
− | + | {{!}} | |
− | + | {{#if: {{{gallery1|}}}{{ifimage|{{PAGENAME}} location.jpg|exists}} | [[File:{{{gallery1|{{PAGENAME}} location.jpg}}}|250x200px]] | |
− | + | <p style="font-size:.9em;">{{{gallery1-text|Click to enlarge.}}}</p> }}{{#if: {{{gallery2|}}} | [[File:{{{gallery2|}}}|250x200px]] | |
− | + | <p style="font-size:.9em;">{{{gallery2-text|Click to enlarge.}}}</p> }}{{#if: {{{gallery3|}}} | [[File:{{{gallery3|}}}|250x200px]] | |
+ | <p style="font-size:.9em;">{{{gallery3-text|Click to enlarge.}}}</p> }}{{#if: {{{gallery4|}}} | [[File:{{{gallery4|}}}|250x200px]] | ||
+ | <p style="font-size:.9em;">{{{gallery4-text|Click to enlarge.}}}</p> }}{{#if: {{{gallery5|}}} | [[File:{{{gallery5|}}}|250x200px]] | ||
+ | <p style="font-size:.9em;">{{{gallery5-text|Click to enlarge.}}}</p> }}{{#if: {{{coordinates|}}}{{{path|}}} | ||
+ | | {{Infobox map | coordinates = {{{coordinates|}}} | path = {{{path|}}} | localtiles = {{{localtiles|}}} | requires = {{{requires|{{{release|}}}}}} | icon = {{#replace:{{#var:icon|{{{icon|}}}}}|Mastery point|Mastery insight}} }} }} | ||
{{!}}} | {{!}}} | ||
| {{clear}} }} | | {{clear}} }} | ||
Строка 72: | Строка 81: | ||
{{#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:{{{type}}}}} | + | {{#ifeq: {{lc:{{{name}}}}} | unknown | [[Category:Unnamed objects]] | }} |
− | | | + | {{#switch:{{lc:{{{type}}}}} |
− | | | + | | book = [[Category:Books]][[Category:Objects]] |
− | | | + | | chest = [[Category:Chests]] |
− | + | | crafting station = [[Category:Crafting]][[Category:Objects]] | |
− | | | + | | dead ship = [[Category:Dead Ships]] |
− | | environmental | + | | environmental |
− | | environmental weapon | + | | environmental weapon |
− | | bundle = [[Category:Bundles]] | + | | bundle = [[Category:Bundles]] |
− | | | + | | gravestone = [[Category:Gravestones]] |
− | + | | mastery insight (central tyria) | |
− | | | + | | mastery insight (heart of thorns) |
− | | | + | | mastery insight (path of fire) |
− | | | + | | mastery insight (icebrood saga) |
− | | | + | | mastery insight (end of dragons) = [[Category:Mastery insights]] |
− | | | + | | mine |
− | | #default = [[Category:Objects]] | + | | tree |
− | }}{{# | + | | plant |
− | }}<noinclude> | + | | node |
+ | | resource node = [[Category:Resource nodes]] | ||
+ | | hero challenge = [[Category:Hero challenges]] | ||
+ | | siege weapon = [[Category:Siege weapons]] | ||
+ | | static weapon = [[Category:Static environmental weapons]] | ||
+ | | statue = [[Category:Statues]] | ||
+ | | #default = [[Category:Objects]] | ||
+ | }} | ||
+ | {{#ifeq: {{lc:{{{destruct|n}}}}} | y | [[Category:Destructible objects]] }} | ||
+ | {{#if: {{{coordinates|}}} | | ||
+ | {{#set: | ||
+ | | Has x coordinate = {{#replace:{{#explode: {{{coordinates|}}} |,|0}}|[|}} | ||
+ | | Has y coordinate = {{#replace:{{#explode: {{{coordinates|}}} |,|1}}|]|}} | ||
+ | }} | ||
+ | }} | ||
+ | {{#switch: {{lc:{{{type}}}}} | ||
+ | | hero challenge = {{#set: | Has hero challenge id = {{{id|-1-999}}} }} | ||
+ | | mastery insight | mastery insight (central tyria) | mastery insight (heart of thorns) | mastery insight (path of fire) | mastery insight (icebrood saga) | mastery insight (end of dragons) = {{#set: | Has mastery id = {{{id|-999}}} }} | ||
+ | }} | ||
+ | }}</includeonly><noinclude> | ||
{{clear}} | {{clear}} | ||
− | == | + | == Description == |
This infobox is used for [[object]]s in the game world. | This infobox is used for [[object]]s in the game world. | ||
+ | == Usage == | ||
<pre> | <pre> | ||
{{Object infobox | {{Object infobox | ||
| name = | | name = | ||
− | | icon = | + | | icon = |
− | | image = | + | | image = |
− | | location | + | | location = |
− | + | | type = | |
− | | type = | ||
| req = | | req = | ||
− | | gives = | + | | gives = |
| goal = | | goal = | ||
− | | interact = | + | | interact = |
| destruct = | | destruct = | ||
− | | | + | | gallery1...gallery5 = |
− | | | + | | gallery1-text...gallery5-text = |
+ | | requires = | ||
+ | | status = | ||
}} | }} | ||
</pre> | </pre> | ||
=== Parameters === | === Parameters === | ||
− | ; name : Optional. Defaults the name of the article (<code><nowiki>{{PAGENAME}}</nowiki></code>). | + | ;name |
− | ; icon : Optional. Map icon of object. | + | : Optional. Defaults the name of the article (<code><nowiki>{{PAGENAME}}</nowiki></code>). |
− | ; image : Optional. The interactive object image should not include any text. Defaults to the page name (<code><nowiki>{{PAGENAME}}.jpg</nowiki></code>). | + | ;icon |
− | ; location : Required. The area or areas that the object can be found in. Use a | + | : Optional. Map icon of object. |
− | ; type : Optional. Specify the type of object. | + | ;image |
− | ; summon : Optional. The source of the object. | + | : Optional. The interactive object image should not include any text. Defaults to the page name (<code><nowiki>{{PAGENAME}}.jpg</nowiki></code>). |
− | ; goal : Optional. Specific any events or tasks this object is affiliated with. | + | ;location |
+ | : Required. The area or areas that the object can be found in. Use a semi-colon separated list. | ||
+ | ;coordinates / path | ||
+ | : Optional. The X and Y coordinates for the location. Displays an interactive map with a marker at the given location. e.g. <code>[12345, 31321]</code>. See [[Template:Infobox map]] for details on how to capture coordinates. | ||
+ | ;localtiles | ||
+ | : Optional. If set, uses local wiki tiles instead of the API raster tiles. See [[:Category:Map raster tiles]] | ||
+ | ;type | ||
+ | : Optional. Specify the type of object. | ||
+ | ::Book | ||
+ | ::Chest | ||
+ | ::Crafting station | ||
+ | ::Bundle | ||
+ | ::Gravestone | ||
+ | ::mastery insight (Central Tyria) | ||
+ | ::mastery insight (Heart of Thorns) | ||
+ | ::mastery insight (Path of Fire) | ||
+ | ::mastery insight (Icebrood Saga) | ||
+ | ::mastery insight (End of Dragons) | ||
+ | ::Mine | ||
+ | ::Tree | ||
+ | ::Plant | ||
+ | ::Resource node | ||
+ | ::Hero challenge | ||
+ | ::Siege weapon | ||
+ | ::Static weapon | ||
+ | ::Statue | ||
+ | ;resource type | ||
+ | : Optional. If "type" is set to "Resource node", setting the "resource type" parameter sets [[Property:Has gathering node type]]. | ||
+ | ;summon | ||
+ | : Optional. The source of the object. | ||
+ | ;goal | ||
+ | : Optional. Specific any events or tasks this object is affiliated with. | ||
;interact | ;interact | ||
− | :Optional. If the object can be interacted with. Defaults to ''y''. | + | : Optional. If the object can be interacted with. Defaults to ''y''. |
− | ; destruct | + | ;destruct |
− | :Optional. If the object can be destroyed and therefore has a health bar. Defaults to ''n''. | + | : Optional. If the object can be destroyed and therefore has a health bar. Defaults to ''n''. |
− | ; req : Optional. Specify any requirements for interacting with the object (mostly nodes). | + | ;req |
− | ; gives : Optional. Specify any item/items resulting from interacting with the object. Use a comma-separated list of values. | + | : Optional. Specify any requirements for interacting with the object (mostly nodes). |
− | ; | + | ;gives |
− | ; | + | : Optional. Specify any item/items resulting from interacting with the object. Use a comma-separated list of values. |
− | ; 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. | + | ;gallery1 |
− | ; status : Optional. Status of content. Only set if not currently obtainable ingame, displays relevant notice. Available options: "historical", "discontinued", "future", "unimplemented", "current" (default). | + | : Optional. Image related to the object. Defaults to <code><nowiki>{{PAGENAME}} location.jpg</nowiki></code>. |
− | ; | + | ;gallery2 ... gallery5 |
+ | : Optional. Images related to the object. | ||
+ | ;gallery1-text ... gallery5-text | ||
+ | : Optional. Image descriptions. | ||
+ | ;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. | ||
+ | ;status date | ||
+ | : Optional. Sets the date of the update that marked this skill as historical (in YYYY-MM-DD format). | ||
+ | ;requires | ||
+ | : Optional. The expansion or living world season required to access the content. Displays a notice of the required release. See {{tl|infobox requires}} for options. | ||
− | == Examples == | + | === Examples === |
<pre> | <pre> | ||
{{Object infobox | {{Object infobox | ||
| name = Blueberry Bush | | name = Blueberry Bush | ||
− | |||
| type = Resource node | | type = Resource node | ||
| req = Harvesting sickle | | req = Harvesting sickle | ||
Строка 148: | Строка 220: | ||
{{Object infobox | {{Object infobox | ||
| name = Blueberry Bush | | name = Blueberry Bush | ||
− | | | + | | image = Blueberry Bush.jpg |
| type = plant | | type = plant | ||
| req = Harvesting sickle | | req = Harvesting sickle | ||
Строка 157: | Строка 229: | ||
{{Object infobox | {{Object infobox | ||
| name = Ethereal Vanguard Monument | | name = Ethereal Vanguard Monument | ||
− | | | + | | location = Devast District |
| type = Hero challenge | | type = Hero challenge | ||
| goal = Defeat Captain Mattox and his Ethereal Vanguard | | goal = Defeat Captain Mattox and his Ethereal Vanguard | ||
Строка 164: | Строка 236: | ||
{{Object infobox | {{Object infobox | ||
| name = Ethereal Vanguard Monument | | name = Ethereal Vanguard Monument | ||
− | | | + | | image = Ethereal Vanguard Monument.jpg |
+ | | location = Devast District | ||
| type = Hero challenge | | type = Hero challenge | ||
| goal = Defeat Captain Mattox and his Ethereal Vanguard | | goal = Defeat Captain Mattox and his Ethereal Vanguard | ||
}} | }} | ||
+ | {{clear}} | ||
+ | |||
+ | == See also == | ||
+ | * [[Guild Wars 2 Wiki:Object formatting]] | ||
+ | |||
[[Category:Infobox templates|Object]] | [[Category:Infobox templates|Object]] | ||
</noinclude> | </noinclude> |
Текущая версия на 07:12, 30 сентября 2022
Содержание
Description[править]
This infobox is used for objects in the game world.
Usage[править]
{{Object infobox | name = | icon = | image = | location = | type = | req = | gives = | goal = | interact = | destruct = | gallery1...gallery5 = | gallery1-text...gallery5-text = | requires = | status = }}
Parameters[править]
- name
- Optional. Defaults the name of the article (
{{PAGENAME}}
). - icon
- Optional. Map icon of object.
- image
- Optional. The interactive object image should not include any text. Defaults to the page name (
{{PAGENAME}}.jpg
). - location
- Required. The area or areas that the object can be found in. Use a semi-colon separated list.
- coordinates / path
- Optional. The X and Y coordinates for the location. Displays an interactive map with a marker at the given location. e.g.
[12345, 31321]
. See Template:Infobox map for details on how to capture coordinates. - localtiles
- Optional. If set, uses local wiki tiles instead of the API raster tiles. See Category:Map raster tiles
- type
- Optional. Specify the type of object.
- Book
- Chest
- Crafting station
- Bundle
- Gravestone
- mastery insight (Central Tyria)
- mastery insight (Heart of Thorns)
- mastery insight (Path of Fire)
- mastery insight (Icebrood Saga)
- mastery insight (End of Dragons)
- Mine
- Tree
- Plant
- Resource node
- Hero challenge
- Siege weapon
- Static weapon
- Statue
- resource type
- Optional. If "type" is set to "Resource node", setting the "resource type" parameter sets Property:Has gathering node type.
- summon
- Optional. The source of the object.
- goal
- Optional. Specific any events or tasks this object is affiliated with.
- interact
- Optional. If the object can be interacted with. Defaults to y.
- destruct
- Optional. If the object can be destroyed and therefore has a health bar. Defaults to n.
- req
- Optional. Specify any requirements for interacting with the object (mostly nodes).
- gives
- Optional. Specify any item/items resulting from interacting with the object. Use a comma-separated list of values.
- gallery1
- Optional. Image related to the object. Defaults to
{{PAGENAME}} location.jpg
. - gallery2 ... gallery5
- Optional. Images related to the object.
- gallery1-text ... gallery5-text
- Optional. Image descriptions.
- 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.
- status date
- Optional. Sets the date of the update that marked this skill as historical (in YYYY-MM-DD format).
- requires
- Optional. The expansion or living world season required to access the content. Displays a notice of the required release. See {{infobox requires}} for options.
Examples[править]
{{Object infobox | name = Blueberry Bush | type = Resource node | req = Harvesting sickle | gives = Blueberry }}
Blueberry Bush
- Тип
- Resource node
- Требует
- Harvesting sickle
- Дает
- Blueberry
- Взаимодействие
- Да
- Разрушаемость
- Нет
{{Object infobox | name = Ethereal Vanguard Monument | location = Devast District | type = Hero challenge | goal = Defeat Captain Mattox and his Ethereal Vanguard }}
Ethereal Vanguard Monument
- Локация
- Devast District
(Равнины Эшфорда) - Тип
- Hero challenge
- Часть
- Defeat Captain Mattox and his Ethereal Vanguard
- Взаимодействие
- Да
- Разрушаемость
- Нет