Sablon:Item infobox/doc
This template is used for displaying the infobox for an item. It is one of the most important and most powerful infobox templates.
Usage
While the template is extremely versatile, its main functionality is to display the standard infobox.
The data which is to be displayed can be manually entered when calling the template, but thanks to {{iteminfo}}
, the vast majority of data is generated automatically. To enable automatic data, use the parameter
and set it to the ID of the item (alternatively: auto
auto=yes
and either id=<item ID>
, name=<item name>
, or nothing else – the latter two methods will cause the template to automatically generate the ID using {{itemNameFromId}}
, with the last method using the page title for name reference). This way, all relevant item parameters are set automatically. See the table below for affected parameters. However, they can still be overridden and manually entered parameters always take precedence over the automatic ones.
Basic parameters
- Notes:
- The dollar sign (
) is used to signify that the word after it is the name of a template parameter.$
- All parameters which have a default value listed can usually be omitted. Note that this does not mean that parameters which do not have a default value listed should always be filled in.
{{#css:
#no-border-bottom td{ border-bottom:0px; } #medium-border-top td{ border-top:2px #AFCFE2 solid; }
}}
Parameter | Description | Auto | Example | Default value (if omitted) |
Note |
---|---|---|---|---|---|
{{item infobox
| |||||
Box-related parameters | |||||
| boxwidth |
Width of the infobox | 27em |
21em |
Number with unit. Default is or stretching to image width
| |
| float |
Position of the infobox | left |
right |
||
| css or | style |
CSS style affecting the entire infobox | Any or properties defined here will override the template's and parameters, respectively.
| |||
| auto |
Enables automatic data | 465 |
Can also be (see text above).
| ||
| id |
ID of the item | 465 |
The automatic data gathering for is based on this.
| ||
| name |
Name of the item | Wood |
Page name |
Will be displayed as heading of the infobox. | |
| lname |
Localized name of the item | Legno (Italian for "Wood") |
|
Will be displayed as heading of the infobox; only to be used if is not existent in the database of the specific language.
| |
| namesub |
Name sub-heading | Additional information directly underneath the title of the infobox; rarely useful for item infoboxes. | |||
Image-related parameters | |||||
| imagealt |
Complete custom control over the entire image display | [[File:Wood.png]] |
Overrides all image parameters in this parameter category. | ||
| ext |
File extension of
|
gif |
png |
||
| image |
Main image of the inventory icon or equipped item/set | Wood.png |
$name.$ext |
||
| imageold |
Variant image of the older versions | Compass (old).png |
$name (old) |
Default value: First checks for the and then for the .
| |
| imageplaced |
Image of the placed item | Wood (placed).png |
$name (placed)
| ||
| imageequipped |
Image of the equipped item/set | Shackle (equipped).png |
$name (equipped)
| ||
| imagefemale |
Image of the female equipped item/set | Robe (equipped) female.png |
$name female.$ext |
||
| imageoldalt |
Complete custom control over the "old" image display | [[File:Compass (old).png]] |
|||
| imageplacedalt |
Complete custom control over the "placed" image display | [[File:Wood (placed).png]] |
|||
| imageequippedalt |
Complete custom control over the "equipped" image display | [[File:Shackle (equipped).png]] |
|||
| imagebreak |
Arranges multiple images in rows rather than in columns | yes |
Causes the main/"old", "placed", "equipped", and "female" images to all take up a separate row, with small horizontal bars in between (example: Book). Note that the main and "old" images will always be displayed in the same row. Also note that this effect is enabled regardless of what is set to (i.e, setting it to will also enable it – so refrain from doing that).
| ||
| imageinfo |
Prevents the internal usage of
|
no |
Setting it to will cause the template to use the standard syntax instead of . will increase the expensive function count, so if there are many item infoboxes on one page, the expensive function count limit may be exceeded. Using imageinfo=no can reduce the count to avoid exceeding it. In the vast majority of cases, this is not necessary.
| ||
Statistics-related parameters | |||||
| autoswing |
Auto-use capability | yes |
Displays in the top-right corner of the infobox. Hover text is determined by ("Autoswing" for melee, "Autofire" for ranged and magic, and "Auto-use" for anything else).
| ||
| stack |
Maximum possible stack size | [1] | 99 |
1 |
max quantity of this item that can be stacked in a single inventory slot |
| pick |
Pickaxe power | 100 |
Without percentage sign ( )! If any of the three parameters is used, all three symbols will always be displayed:
| ||
| hammer |
Hammer power | 75 |
|||
| axe |
Axe power | 50 |
|||
| pickreq |
Required pickaxe power for destroying | 150 |
Without percentage sign ( )!
| ||
| hammerreq |
Required hammer power for destroying | 80 |
Without percentage sign ( )! Prints the following behind it: "(csak nehézmódban)"
| ||
| type (deprecated: | type2 ) |
Classification and categorization | eg. Weapon, Tool, Furniture, etc. "/" separated. e.g. Weapon / Tool. "Crafting material" will be auto added if needed. | |||
| bait |
Bait power | Without percentage sign ( )!
| |||
| damage |
Damage | [1] | |||
| damagetype |
Damage type | melee, ranged, magic, summon, or thrown | |||
| knockback |
Knockback | [1] | If more than one value needed, you should wrap the values with {{kb}} , e.g. {{kb|7.5}}/{{kb|6}}.
| ||
| defense |
Defense | [1] | |||
| tileboost |
Tile range boost | ||||
| bonus |
Miscellaneous bonuses | ||||
| setbonus |
Set bonus | For armor sets, where contains . If possible, {{gameText}} should be used here.
| |||
| placeable |
Placeable | yes/no | |||
| width |
Width when placed | In tiles. | |||
| height |
Height when placed | In tiles. | |||
| consumable |
Consumable | true: (found in source code) leaves player's inventory with ⚒ Használat/Támadás, includes placeable items | |||
| mana |
Mana cost | [1] | |||
| mheal |
Mana restoration | [1] | |||
| hheal |
Health restoration | [1] | |||
| critical |
Critical strike chance | [1] | if no value is entered and the main Type is "Weapon", a default value of 4% is displayed | ||
| body slot |
Body slot | ||||
| use |
Use time | ||||
| velocity (deprecated: | sspeed ) |
Velocity | ||||
| toolspeed |
Tool speed | [1] | |||
| tooltip |
Tooltip | [1] | |||
| rare |
Rarity | [1] | eg. '1' for Blue, '2' for Green, 'q' for Amber (quest), 'rainbow' for expert-exclusive. | ||
| buy |
Buy value | [1] | enter using the coin template ({{coin}} ). Use buy=y/yes/true/show to enable display of buy price (disabled by default, since many items that can be sold cannot be bought).
| ||
| sell |
Sell value | [1] | also enter using coin template | ||
| value |
Value | Mostly used internally. Will not be displayed directly, but serves as the base for and .
| |||
Buff- & Debuff-related parameters | |||||
| bufftype |
Type of the status effect | Mostly used internally. Can be or .
| |||
| idbuff |
Buff ID | ||||
| buff |
Buff provided | ||||
| bufflink |
Buff link target | ||||
| bufftip |
Buff tooltip | ||||
| duration |
Buff duration | [1] | |||
| debuff |
Debuff inflicted | you can use shortcut: "[name] / [duration] / [chance(optional)]" for debuff/debuffduration/debuffchance. | |||
| debufflink |
Debuff link target | ||||
| debufftip |
Debuff tooltip | ||||
| debuffchance |
Debuff chance | ||||
| debuffduration |
Debuff duration | ||||
Mount-related parameter | |||||
| idmount |
Mount ID | ||||
Projectile-related parameters | |||||
| idprojectile (deprecated: | shoot ) |
Projectile ID | Can be a comma-separated list for multiple IDs. | |||
| projectilename |
Projectile name | ||||
| projectileimage |
Projectile image | ||||
| projectileblock |
Projectile images arrangement | Operates similarly to .
| |||
ID-related parameters | |||||
| showids |
Display of ID section | no |
ID section is not hidden by default. | ||
| idshow |
Vanity item ID | ||||
| idtile |
Tile ID | ||||
| idtileshow |
Vanity tile ID | ||||
| idtilesub |
Tile sub-ID | Internally known as in Terraria.
| |||
| idwall |
Wall ID | ||||
| idbuffshow |
Vanity buff ID | ||||
Back-end-related parameters | |||||
| cate |
Toggles categorization | no |
Set to to force categorization when it is disabled by default (on non-mainspace pages). Set to to disable categorization.
| ||
| listexclude |
Toggles categorization | yes |
no |
Set to to disable categorization. Overrides cate=yes , but not cate=no .
| |
| cargo |
Toggles cargo data storage | no |
Set to to force cargo data storage when it is disabled by default (on non-mainspace pages). Set to to disable cargo data storage. Note that setting it to anything else (e.g. ) also disables cargo data storage, so please stick to the unambiguous .
| ||
| listcat |
Categorization | Supplemental category names to include the current item in a DPL list, e.g. causes the item to display at the Arrows page. Separate multiple categories with a slash character ( ). The following categories will be added automatically:
| |||
| tag or | tags |
Categorization | Supplemental category names to appropriately categorize the item. Can contain any of the following (separate multiple with a slash character ( ):
All other values will have no effect. All tags will be stored to cargo for querying. | |||
| allversions |
Platform version availability | Set to to assert that the item is available on all platforms of Terraria. This is only to be used if no banner is on the page. If omitted and if does not contain , it will be detected automatically based on the result of (even though might not be set!). Categorizes the page in all five version content categories (with the exception of Category:Japanese console content), if is determined.
| |||
| hardmode |
Hardmode-exclusivity | yes |
Set to to assert that the item is not available in pre-Hardmode, but only becomes available in Hardmode. Categorizes the page in Category:Hardmode-only items.
|
See also
{{npc infobox}}
Footnotes
- Pages using DynamicPageList3 dplvar parser function
- Template documentation