Шаблон:Item infobox/doc

Материал из Dota 2 Вики
Перейти к: навигация, поиск

The Item infobox is used within Item pages to convey an item's function, cost, and place of purchase. The template will automatically hide any unused parameters.

Usage[править]

To implement the infobox, you simply add {{Item infobox}} to the top of a page, and define the item's cost and recipe cost (if any) in {{Item cost}} and {{Recipe cost}} respectively. However, there are several attributes you should define, otherwise the infobox will have no useful information.

To set attributes, you simply add a few lines before closing the template call (before the closing squiggly brackets - }}), and add each attribute and it's values with | attribute = value.

Below is the code you should add to each Item page. Remember to add additional attributes to the infobox depending on the item's properties.

{{Item infobox
 | shop = 
}}

Availability[править]

Identify an item's primary shop with the following parameter. "Secret Shop" and "Drop Only" are valid shops.

 | shop = 

If an item is available at the Secret Shop or Side Lane Shop, identify this with the following parameters.

 | secret = true
 | side lane shop = true

Availability[править]

If an item has lore, provide it with following parameter.

 | lore = 

Items with Bonuses[править]

Because unused attributes are hidden, if you do not specify one of the bonus parameters, the infobox will not display one. Use the following code for items with a bonus:

 | bonus strength = 
 | bonus agility = 
 | bonus intelligence = 
 | bonus health = 
 | bonus mana = 
 | bonus health regeneration flat = 
 | bonus mana regeneration percent = 
 | bonus mana regeneration flat = 
 | bonus damage = 
 | bonus spell damage = 
 | bonus armor = 
 | bonus evasion = 
 | bonus magic resistance = 
 | bonus movement speed flat = 
 | bonus movement speed percent = 
 | bonus attack speed = 

Passive Items[править]

Because unused attributes are hidden, if you do not specify an passive parameter, the infobox will not display one. Use the following code for items with passive abilities:

 | passive = 
 | passive2 = 

Active Items and Consumables[править]

Because unused attributes are hidden, if you do not specify an active parameter, the infobox will not display one. Use the following code for consumables and items with active abilities:

 | active = 
 | charges = 

The charges parameter will show the number of charges the item has underneath the active ability. Disregarding it will only show the active ability.

You can combine this with the above section for items that provide a bonus and have an active ability.

Recipes[править]

If an item is used to craft another item, identify the recipes it's used in with the used in parameter.

 | used in 1 = 
 | used in 2 = 
 | used in 3 = 
 ...

If an item is made of other items in a recipe, you can identify the other items that are used to make it with the recipe parameter.

 | recipe 1 = 
 | recipe 2 = 
 | recipe 3 = 
 ...

Attributes[править]

Attribute Description
image The infobox's image. Defaults to {{BASEPAGENAME}}.png.
lore The item's lore.
shop The location that the item can be purchased at. Defaults to Consumables.
secret Whether the item can be purchased at the Secret Shop. Defaults to no.
side lane shop Whether the item can be purchased at the Side Lane Shop. Defaults to no.
bonus strength Provide any bonuses as raw numbers.
bonus agility
bonus intelligence
bonus health
bonus mana
bonus health regeneration flat
bonus mana regeneration percent
bonus mana regeneration flat
bonus damage
bonus spell damage
bonus armor
bonus evasion
bonus magic resistance
bonus movement speed flat
bonus movement speed percent
bonus attack speed
active Any active ability provided by the item.
passive Any passive ability provided by the item.
passive 2 An additional passive ability provided by the item.
charges The number of times an item's active ability can be used. Requires that active be defined.
used in # Any recipes this item is used to complete.
recipe # Any items required to complete this item's recipe.
can-disassemble If the item can be disassembled, any other value than "false" will display "Yes"; false by default.
can-alert-allies If the item can alert allies, any other value than "false" will display "Yes"; false by default.