Шаблон:Trait infobox — различия между версиями
Материал из Guild Wars 2 wiki
Blood (обсуждение | вклад) |
Blood (обсуждение | вклад) |
||
Строка 1: | Строка 1: | ||
− | {{infobox status|{{{status| | + | <includeonly>{{#set:Has context=Trait}}<!-- |
+ | -->{{infobox status|{{{status|}}}|{{{status notes|}}}}}<!-- | ||
+ | -->{{infobox release|{{{release|}}} }}<!-- | ||
+ | -->{{#if: | ||
{{#vardefine:traitline| {{ifexists|{{{line}}} (specialization)|{{{line}}} (specialization)|{{{line|Profession}}}}} }} | {{#vardefine:traitline| {{ifexists|{{{line}}} (specialization)|{{{line}}} (specialization)|{{{line|Profession}}}}} }} | ||
{{#vardefine:profession| {{lc:{{#show:{{#var:traitline}}|?Is for profession|link=none|default=Any}}}} }} | {{#vardefine:profession| {{lc:{{#show:{{#var:traitline}}|?Is for profession|link=none|default=Any}}}} }} | ||
− | }}<div class="infobox trait {{#var:profession}}"> | + | }}<!-- |
+ | |||
+ | --><div class="infobox trait {{#var:profession}}"> | ||
<div class="icon infobox-icon">[[Has game icon::File:{{{icon|{{#titleparts:{{PAGENAME}}}}.png}}}|40x40px]]</div> | <div class="icon infobox-icon">[[Has game icon::File:{{{icon|{{#titleparts:{{PAGENAME}}}}.png}}}|40x40px]]</div> | ||
<p class="heading">[[Has canonical name::{{{name|{{#titleparts:{{PAGENAME}}}}}}}]]</p> | <p class="heading">[[Has canonical name::{{{name|{{#titleparts:{{PAGENAME}}}}}}}]]</p> | ||
Строка 32: | Строка 37: | ||
; Игр. ссылка | ; Игр. ссылка | ||
: {{#arraymap:{{{id}}}|,|@@@|{{trait link|@@@}}{{#set:Has game id=@@@}}|<br>}} | : {{#arraymap:{{{id}}}|,|@@@|{{trait link|@@@}}{{#set:Has game id=@@@}}|<br>}} | ||
− | }}{{#if: {{{id|}}} | {{#switch: {{{status| | + | }}{{#if: {{{id|}}} | {{#switch: {{{status|}}} | unimplemented | unimplemented | temporary | historical = | #default = |
; Внеш. ссылки | ; Внеш. ссылки | ||
: [https://api.guildwars2.com/v2/traits?ids={{{id}}} API] | : [https://api.guildwars2.com/v2/traits?ids={{{id}}} API] | ||
}} }} | }} }} | ||
</div> | </div> | ||
− | {{clear | + | {{clear}} |
</div>{{Quotation|game|{{#if:{{{description|}}}|{{{description}}}{{#set:Has game description={{#dplreplace:{{{description}}}|\[\[Category:Text errors\]\]}}}}|''Описание отсутствует.''}} | </div>{{Quotation|game|{{#if:{{{description|}}}|{{{description}}}{{#set:Has game description={{#dplreplace:{{{description}}}|\[\[Category:Text errors\]\]}}}}|''Описание отсутствует.''}} | ||
{{{facts|}}} | {{{facts|}}} | ||
Строка 66: | Строка 71: | ||
{{#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 --> | | ||
{{#if: {{{tier|}}} | {{#if: {{{tier|}}} | ||
Строка 85: | Строка 89: | ||
| #default = [[Category:{{ucfirst:{{{line|}}}}} traits]] | | #default = [[Category:{{ucfirst:{{{line|}}}}} traits]] | ||
}} | }} | ||
− | }}<noinclude> | + | }}</includeonly><noinclude> |
== Description == | == Description == | ||
<pre>{{Trait infobox | <pre>{{Trait infobox | ||
Строка 112: | Строка 116: | ||
; 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", "future", "unimplemented", "current" (default). | ; status : Optional. Status of content. Only set if not currently obtainable ingame, displays relevant notice. Available options: "historical", "future", "unimplemented", "current" (default). | ||
+ | ; 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 release}} for options. | ; release : Optional. The expansion or living world season required to access the content. Displays a notice of the release. See {{tl|infobox release}} for options. | ||
− | + | ||
+ | == Example == | ||
+ | <pre> | ||
+ | {{Trait infobox | ||
+ | | name = Retribution | ||
+ | | line = Radiance | ||
+ | | tier = Master | ||
+ | | type = Major | ||
+ | | position = 3 | ||
+ | | description = Gain increased damage while under the effects of [[retaliation]]. | ||
+ | | facts = {{skill fact|damage increase|10}} | ||
+ | | id = 565 | ||
+ | }} | ||
+ | </pre> | ||
+ | {{Trait infobox | ||
+ | | name = Retribution | ||
+ | | icon = Retribution (trait).png | ||
+ | | line = Radiance | ||
+ | | tier = Master | ||
+ | | type = Major | ||
+ | | position = 3 | ||
+ | | description = Gain increased damage while under the effects of [[retaliation]]. | ||
+ | | facts = {{skill fact|damage increase|10}} | ||
+ | | id = 565 | ||
+ | }} | ||
[[Category:Infobox templates]] | [[Category:Infobox templates]] | ||
</noinclude> | </noinclude> |
Версия 19:47, 25 мая 2017
Description
{{Trait infobox | name = | icon = | line = | tier = | type = | recharge = | description = | facts = | id = }}
Parameters
- name
- Optional. Trait name. Defaults to the page name.
- icon
- Optional. Icon filename. Defaults to
File:<page name>.png
. - line
- Required. The trait line that the trait is under.
- tier
- Required. The tier (Proficiency elite spec only, Adept, Master, Grandmaster) of the trait; displays Unspecified if omitted.
- type
- Required. The trait type (Minor or Major); displays Unspecified if omitted.
- position
- Required. The vertical position of the trait within the main trait selection panel.
- recharge
- Optional. The trait's recharge time, if any.
- description
- Required. The in-game description.
- facts
- Optional. The trait facts displayed in-game below the description. Each fact should be presented as an individual instance of the {{skill fact}} template.
- id
- Optional. The game id required to produce the chat link to the trait ingame.
- 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", "future", "unimplemented", "current" (default).
- 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 release}} for options.
Example
{{Trait infobox | name = Retribution | line = Radiance | tier = Master | type = Major | position = 3 | description = Gain increased damage while under the effects of [[retaliation]]. | facts = {{skill fact|damage increase|10}} | id = 565 }}
Retribution
- Специализация
- Сияние (список черт)
- Уровень
- Мастер
- Тип
- Старшая
- Изучение
- 5 очков героя
- Игр. ссылка
- API
- 565
“Gain increased damage while under the effects of retaliation.
- Увеличение урона: 10%
— Внутриигровое описание