Шаблон:Default item parameter — различия между версиями
Материал из Guild Wars 2 wiki
Blood (обсуждение | вклад) |
|||
Строка 1: | Строка 1: | ||
{{#set:Has context=Item}}{{#if: {{{collection|}}} | | {{#set:Has context=Item}}{{#if: {{{collection|}}} | | ||
− | ;[[Collections| | + | ;[[Collections|Коллекция]] |
:{{#arraymap:{{{collection}}}|,|@@@|[[Is part of collection::@@@|{{#replace:@@@|(achievement)}}]]|<br>}} | :{{#arraymap:{{{collection}}}|,|@@@|[[Is part of collection::@@@|{{#replace:@@@|(achievement)}}]]|<br>}} | ||
}}{{#if: {{{rarity|}}} | | }}{{#if: {{{rarity|}}} | | ||
− | ;[[Item#Quality| | + | ;[[Item#Quality|Редкость]] |
:{{#arraymap:{{lc:{{{rarity}}}}}|,|@@@|{{#switch:@@@ | :{{#arraymap:{{lc:{{{rarity}}}}}|,|@@@|{{#switch:@@@ | ||
|gray|junk={{#set:Has item rarity=Junk}} | |gray|junk={{#set:Has item rarity=Junk}} | ||
Строка 16: | Строка 16: | ||
}} {{rarity|@@@}} | }} {{rarity|@@@}} | ||
|<br>}}}}{{#if: {{{level|}}}| | |<br>}}}}{{#if: {{{level|}}}| | ||
− | ;[[Character#Progression| | + | ;[[Character#Progression|Треб. уровень]] |
:{{#arraymap: {{{level}}} |,|@@@|[[Has level requirement::@@@]]}} | :{{#arraymap: {{{level}}} |,|@@@|[[Has level requirement::@@@]]}} | ||
}}{{#if: {{{race|}}} | | }}{{#if: {{{race|}}} | | ||
− | ;[[Playable races| | + | ;[[Playable races|Треб. раса]] :[[Is for race::{{ucfirst:{{{race|}}}}}]] |
}}{{#ifeq: {{{unique}}} | y | {{#set:Is unique=Y}} | }}{{#ifeq: {{{unique}}} | y | {{#set:Is unique=Y}} | ||
− | ;[[Unique]] | + | ;[[Unique|Уникальность]] |
:Yes | :Yes | ||
| {{#switch: {{lc:{{{rarity|}}}}} | pink | ascended = {{#set:Is unique=N}} }} }}{{#vardefine:tradable|{{#var:tradable|{{#if:{{{tradable|}}}|{{{tradable}}}|yes}}}}}}{{#if:{{{bound|}}}|{{#ifeq: {{lc:{{{bound}}}}} | no | | | | {{#switch: {{lc:{{{rarity|}}}}} | pink | ascended = {{#set:Is unique=N}} }} }}{{#vardefine:tradable|{{#var:tradable|{{#if:{{{tradable|}}}|{{{tradable}}}|yes}}}}}}{{#if:{{{bound|}}}|{{#ifeq: {{lc:{{{bound}}}}} | no | | | ||
− | ;[[Binding]] | + | ;[[Binding|Привязка]] |
:{{#switch: {{lc:{{{bound}}}}} | :{{#switch: {{lc:{{{bound}}}}} | ||
− | |u|use|on use = [[Soulbound]] | + | |u|use|on use = [[Soulbound|Привязка к персонажу]] при использовании {{#set:Has item binding=SoulBindOnUse}} |
− | |a|acquire|on acquire = [[Soulbound]] | + | |a|acquire|on acquire = [[Soulbound|Привязка к персонажу]] при получении {{#vardefine:tradable|no}} {{#set:Has item binding=SoulbindOnAcquire}} |
− | |ab|account|account bound|account bound on acquire = [[Account Bound]]{{#vardefine:tradable|no}} {{#set:Has item binding=AccountBound}} | + | |ab|account|account bound|account bound on acquire = [[Account Bound|Привязка к аккаунту]] {{#vardefine:tradable|no}} {{#set:Has item binding=AccountBound}} |
− | |absb|accountsoul|account soul = [[Account Bound]]<br>[[Soulbound]] | + | |absb|accountsoul|account soul = [[Account Bound|Привязка к аккаунту]]<br>[[Soulbound|Привязка к персонажу]] при использовании {{#vardefine:tradable|no}} {{#set:Has item binding=AccountBound,SoulBindOnUse|+sep=,}} |
− | |abu|accountuse|account on use = [[Account Bound]] | + | |abu|accountuse|account on use = [[Account Bound|Привязка к аккаунту]] при использовании {{#set:Has item binding=AccountBindOnUse}} |
|#default = ''Unknown'' | |#default = ''Unknown'' | ||
}} }} }}{{#if: {{{cost|}}} | | }} }} }}{{#if: {{{cost|}}} | | ||
− | ;[[Currency#Cost versus Value| | + | ;[[Currency#Cost versus Value|Стоимость]] |
:{{{cost|}}} | :{{{cost|}}} | ||
}}{{#if: {{{value|}}} | | }}{{#if: {{{value|}}} | | ||
− | ;[[Currency#Cost versus Value| | + | ;[[Currency#Cost versus Value|Ценность]]{{#set:Has vendor value={{{value|}}}}} |
:{{coin|{{{value|}}}}} | :{{coin|{{{value|}}}}} | ||
}}{{#if: {{{id|}}} | | }}{{#if: {{{id|}}} | | ||
− | ;[[Chat link format|{{#if:{{{skin id|}}}| | + | ;[[Chat link format|{{#if:{{{skin id|}}}|Ссылка на предмет|Игр. ссылка}}]] |
:{{#arraymap:{{{id}}}|,|@@@|{{#set:Has game id=@@@}}{{item link|@@@}}|<br>}} | :{{#arraymap:{{{id}}}|,|@@@|{{#set:Has game id=@@@}}{{item link|@@@}}|<br>}} | ||
}}{{#if: {{{skin id|}}} | | }}{{#if: {{{skin id|}}} | | ||
− | ;[[Chat link format| | + | ;[[Chat link format|Ссылка на шкурку]] |
:{{#arraymap:{{{skin id}}}|,|@@@| {{skin link|@@@}} |<br>}} | :{{#arraymap:{{{skin id}}}|,|@@@| {{skin link|@@@}} |<br>}} | ||
}}{{#if: {{{id|}}} | | }}{{#if: {{{id|}}} | | ||
{{#ifeq:{{#var:tradable}}|yes|{{#ifeq: {{#switch: {{{status|}}} | unimplemented | future | historical = true | #default = false }} |false|<!-- only show if it's not historical, they'd only lead to 404's otherwise -->{{#vardefine:firstId|{{#explode:{{{id}}}|,|0}}}} | {{#ifeq:{{#var:tradable}}|yes|{{#ifeq: {{#switch: {{{status|}}} | unimplemented | future | historical = true | #default = false }} |false|<!-- only show if it's not historical, they'd only lead to 404's otherwise -->{{#vardefine:firstId|{{#explode:{{{id}}}|,|0}}}} | ||
− | ; | + | ;Торговый пост |
:<span class="gw2-tpprice" data-id="{{#var:firstId}}">…</span>{{#Widget:TP prices}} | :<span class="gw2-tpprice" data-id="{{#var:firstId}}">…</span>{{#Widget:TP prices}} | ||
}}}}}}{{#if:{{#varexists:firstId}}| | }}}}}}{{#if:{{#varexists:firstId}}| | ||
− | ; | + | ;Внешние ссылки |
:[https://www.gw2bltc.com/en/item/{{#var:firstId}} GW2BLTC]<br>[https://www.gw2spidy.com/item/{{#var:firstId}} GW2Spidy]<br>[https://www.gw2tp.com/item/{{#var:firstId}} GW2TP] | :[https://www.gw2bltc.com/en/item/{{#var:firstId}} GW2BLTC]<br>[https://www.gw2spidy.com/item/{{#var:firstId}} GW2Spidy]<br>[https://www.gw2tp.com/item/{{#var:firstId}} GW2TP] | ||
}}{{#if: {{{other ids|}}} | {{#arraymap:{{{other ids}}}|,|@@@|{{#set:Has game id=@@@}}|}} | }}{{#if: {{{other ids|}}} | {{#arraymap:{{{other ids}}}|,|@@@|{{#set:Has game id=@@@}}|}} |
Версия 16:25, 20 октября 2018
Содержание
Documentation
Usage
This template defines values available on all items and is implemented as a subtemplate on all infobox templates for items.
{{default item parameter | status = | collection = | rarity = | level = | race = | unique = | bound = | cost = | value = | id = | skin id = }}
Parameters
The following parameters are handled by the {{Default item parameter}} template:
- collection
- Optional. If the item is part of any collections.
- rarity
- Specified rarity: junk, basic, fine, masterwork, rare, exotic, ascended, legendary. Will be set to Unspecified per default.
- level
- Optional. Required level to use the item.
- race
- Optional. Required race to use item. Currently only used for cultural armor and cultural weapons.
- unique
- Optional. Whether the item is unique. "y" for yes, omit parameter if no.
- bound
- Optional. Under what conditions the item becomes bound: no binding (default), use (soulbound on use), acquire (soulbound on acquisition), account, account soul (account bound on acquire, soul bound on use)
- cost
- Optional. Currency cost of the item when purchased from a vendor. To match it to the display in any vendor window, use the amount and the appropriate icon template, e.g. {{coin|500}}, 500 {{item icon|zhaitaffy}}, or 500 {{token|Guild Commendation}}
- value
- Optional. The number of coins a vendor will pay for this item; use only the number, since the template assumes copper coins.
- id
- Optional. The item id. Does allow multiple ids to be set by using a comma-separated list.
- other ids
- Optional. Other item ids that are not displayed as chat links.
- skin id
- Optional. If given, an additional skin chat link will be displayed above the item chat link.
Implemented on
- {{Armor infobox}} for armor
- {{Back item infobox}} for back items
- {{Crafting infobox}} for crafting materials for crafting professions and the Mystic Forge
- {{Dye infobox}} for dyes (reference to #var:tradable here)
- {{Inventory infobox}} for bags, packs and boxes
- {{Item infobox}} for general items
- {{Trinket infobox}} for accessories
- {{Upgrade component infobox}} for upgrade components
- {{Weapon infobox}} for weapons