Шаблон:Trait infobox — различия между версиями
Материал из Guild Wars 2 wiki
Blood (обсуждение | вклад) |
Blood (обсуждение | вклад) |
||
Строка 2: | Строка 2: | ||
-->{{infobox status|{{{status|}}}|{{{status notes|}}}|date={{{status date|}}}}}<!-- | -->{{infobox status|{{{status|}}}|{{{status notes|}}}|date={{{status date|}}}}}<!-- | ||
-->{{infobox requires|{{{requires|}}} }}<!-- | -->{{infobox requires|{{{requires|}}} }}<!-- | ||
− | -->{{#if: | + | -->{{#if: <!-- Hide whitespace for SMW PROPERTIES --> |
+ | |||
{{#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}}}} }} | ||
Строка 16: | Строка 17: | ||
| necromancer = 9 | | necromancer = 9 | ||
}}}} | }}}} | ||
+ | |||
{{#ifeq:{{#show: {{#var:traitline}}|?Has specialization type|default=}}|Elite| | {{#ifeq:{{#show: {{#var:traitline}}|?Has specialization type|default=}}|Elite| | ||
{{#vardefine:specialization|{{#var:traitline}}}} | {{#vardefine:specialization|{{#var:traitline}}}} | ||
Строка 38: | Строка 40: | ||
| scourge = 2 | | scourge = 2 | ||
}}}}|{{#vardefine:specialization_number|0}}<!-- set core to 0 to ensure proper sorting -->}} | }}}}|{{#vardefine:specialization_number|0}}<!-- set core to 0 to ensure proper sorting -->}} | ||
− | {{#set:Is in trait line={{#var:traitline}}|Is for profession={{ucfirst:{{#var:profession}}}}|Has profession sort order={{#var:profession_number}}|Is for specialization={{#var:specialization}}|Has specialization sort order={{#var:specialization_number}}}} | + | |
+ | <!-- Generic for all traits --> | ||
+ | {{#set: | ||
+ | | Is in trait line ={{#var:traitline}} | ||
+ | | Is for profession ={{ucfirst:{{#var:profession}}}} | ||
+ | | Has profession sort order ={{#var:profession_number}} | ||
+ | | Is for specialization ={{#var:specialization}} | ||
+ | | Has specialization sort order ={{#var:specialization_number}} | ||
+ | }} | ||
+ | |||
+ | <!-- Training panel --> | ||
+ | {{#vardefine:hero points|0}} | ||
+ | {{#if: {{{type|}}} | ||
+ | | {{#if: {{{tier|}}} | ||
+ | | {{#if: {{{line|}}} | ||
+ | | {{#vardefine:hero points|{{#if: {{{hero points|}}}<!-- unfortunately some traits, such as "Renewing Oasis", don't line up with the usual pattern ---> | ||
+ | | {{{hero points}}} | ||
+ | | {{#switch: {{lc:{{{line|}}}}} | ||
+ | | berserker | dragonhunter | herald | druid | scrapper | daredevil | chronomancer | tempest | reaper | ||
+ | | spellbreaker | firebrand | renegade | soulbeast | holosmith | deadeye | mirage | weaver | scourge = {{#switch:{{lc:{{{tier|}}}}} | ||
+ | | proficiency = 30 | ||
+ | | #default = 10 | ||
+ | }} | ||
+ | | #default = {{#switch:{{lc:{{{type|}}}{{{tier|}}}}} | ||
+ | | minoradept = 2 | ||
+ | | majoradept = 3 | ||
+ | | minormaster = 4 | ||
+ | | majormaster = 5 | ||
+ | | minorgrandmaster = 6 | ||
+ | | majorgrandmaster = 8 | ||
+ | }} | ||
+ | }} | ||
+ | }}}} | ||
+ | {{#ifeq: {{#var:hero points}} | 0 || {{#set: Has training hero point cost ={{#var:hero points}} }} }} | ||
+ | }} | ||
+ | }} | ||
+ | }} | ||
+ | {{#if: {{{training order|}}} | ||
+ | | {{#set: | ||
+ | | Is for training track ={{{training track|{{{line|Track missing}}}}}} | ||
+ | | Has training unlock order ={{{training order|-1}}} | ||
+ | }} | ||
+ | }} | ||
+ | |||
+ | <!-- UI position --> | ||
+ | {{#set: Has trait position number={{{position|0}}} }} | ||
+ | |||
}}<!-- | }}<!-- | ||
-->{{#if:{{{split|}}}|{{Game mode version|{{{split}}}}}<!-- | -->{{#if:{{{split|}}}|{{Game mode version|{{{split}}}}}<!-- | ||
Строка 79: | Строка 127: | ||
; Тип | ; Тип | ||
: [[Has trait type::{{ucfirst:{{{type}}}}}|{{#switch:{{lc:{{{type}}}}}|minor=Младшая|major=Старшая}}]]{{#set:Has trait type number={{#switch:{{lc:{{{type}}}}}|minor=1|major=2}}}} | : [[Has trait type::{{ucfirst:{{{type}}}}}|{{#switch:{{lc:{{{type}}}}}|minor=Младшая|major=Старшая}}]]{{#set:Has trait type number={{#switch:{{lc:{{{type}}}}}|minor=1|major=2}}}} | ||
− | }}{{#if:{{{id|}}} | | + | }}{{#ifeq: {{#var:hero points}} | 0 || |
+ | ; [[Training|Изучение]] | ||
+ | : {{#var:hero points}} [[Hero point|Очки героя]] | ||
+ | }}{{#if: {{{id|}}} | | ||
; Игр. ссылка | ; Игр. ссылка | ||
: {{#arraymap:{{{id}}}|,|@@@|{{trait link|@@@}}{{#set:Has game id=@@@}}|<br>}} | : {{#arraymap:{{{id}}}|,|@@@|{{trait link|@@@}}{{#set:Has game id=@@@}}|<br>}} | ||
Строка 90: | Строка 141: | ||
</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\]\]}}}}|''Описание отсутствует.''}} | ||
{{#vardefine:enable facts|true}}{{{facts|}}}{{#vardefine:enable facts|false}}}}{{#if: {{{facts|}}} | {{#set: Has trait facts = {{{facts}}} }} }}<!-- | {{#vardefine:enable facts|true}}{{{facts|}}}{{#vardefine:enable facts|false}}}}{{#if: {{{facts|}}} | {{#set: Has trait facts = {{{facts}}} }} }}<!-- | ||
− | + | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
AUTOCATEGORIZATION | AUTOCATEGORIZATION | ||
-->{{#if: {{NAMESPACE}}<!-- no categories if outside of article namespace --> | -->{{#if: {{NAMESPACE}}<!-- no categories if outside of article namespace --> | ||
Строка 164: | Строка 194: | ||
; description : Required. The in-game description. | ; 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 {{tl|skill fact}} template. | ; facts : Optional. The trait facts displayed in-game below the description. Each fact should be presented as an individual instance of the {{tl|skill fact}} template. | ||
+ | ; training track : Optional, should be automatically calculated. Used to indicate the associated training track. Sets [[Property:Is for training track]]. | ||
+ | ; training order : Optional. Used to identify the unlock order. Sets [[Property:Has training unlock order]]. | ||
+ | ; hero points : Optional, should be automatically calculated. Used to indicate how many hero points required to unlock the skill. Sets [[Property:Has training hero point cost]]. | ||
; id : Optional. The game id required to produce the chat link to the trait ingame. | ; 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. | ; 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. |
Версия 00:18, 14 мая 2020
Description
{{Trait infobox | name = | icon = | split = | 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
. - split
- Optional. Game modes that this skill applies to. See {{Game mode version}}. Calls {{Trait infobox/subobject}} for each game mode beside PvE to create subobjects.
- 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. (0 for Minor traits, 1 for the top Major trait, 2 for the middle Major trait, and 3 for the bottom Major trait).
- recharge
- Optional. The trait's recharge time, if any.
- To set this parameter for a specific game mode: use the -wvw and -pvp parameters to set it. If the split is PvE | WvW + PvP, set only one of these parameters for the wvw+pvp version.
- 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.
- training track
- Optional, should be automatically calculated. Used to indicate the associated training track. Sets Property:Is for training track.
- training order
- Optional. Used to identify the unlock order. Sets Property:Has training unlock order.
- hero points
- Optional, should be automatically calculated. Used to indicate how many hero points required to unlock the skill. Sets Property:Has training hero point cost.
- 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.
- 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 release. See {{infobox requires}} 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%
— Внутриигровое описание