Modèle:Item infobox
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.
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") |
{{tr|$name}} |
Will be displayed as heading of the infobox; only to be used if is not existent in the {{tr}} database of the specific language.
|
| showenglishname |
Display of English name of this item | yes no |
Defaults to for languages that have an in-game translation ( , (allemand), (espagnol), (français), (italien), (polonais), (portugais), (russe), (chinois)), and to for all other languages.
| ||
| 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 (except for ).
If intending to manually reproduce the gray border that the infobox places automatically between | ||
| 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 . Due to the way the automatic image detection is handled internally, it will likely fail on items whose name contains a dot (e.g. S.D.M.G.). It is necessary to explicitly specify the image in that case. (This applies to all image-related parameters.)
| |
| 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).
| ||
| imagemode |
Controls image selection | placed/equipped |
full |
If set to (which will only be the default for the ), the template will attempt to display all different types of images mentioned above. If not set to , it will only attempt to display the main image (which will be the case for other s by default, e.g. ), for performance reasons. It is possible, however, to enable (attempted) display of certain image types even if the mode is not : Set the parameter to , , , or any combination of these three to cause the template to fetch these images as well.
| |
| imageinfo |
Prevents the internal usage of {{image}} |
no |
Setting it to will cause the template to use the standard syntax instead of {{image}} . {{image}} 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 |
Maximum quantity of this item that can be stacked in a single inventory slot. |
| pick |
Pickaxe power | ✔️[1] | 100 |
Without percentage sign ( ), unless more complex wikitext is used. If any of the three parameters is used, all three symbols will always be displayed:
| |
| hammer |
Hammer power | ✔️[1] | 75 |
||
| axe |
Axe power | ✔️[1] | 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: "(seulement en Hardmode)"
| |
| type (deprecated: | type2 ) |
Classification and categorization | ✔️ | Weapon/Tool |
Broad classifications like "Weapon", "Tool", "Furniture", etc. Separate multiple values with a slash ( ). Many types, such as "Crafting material", will be added automatically.
| |
| fishing |
Fishing power | ✔️[1] | Without percentage sign ( )!
| ||
| bait |
Bait power | ✔️ | Without percentage sign ( )!
| ||
| damage |
Damage | ✔️[1] | |||
| damagetype |
Damage type | ✔️[1] | Possible values: , , , , and . The infobox will automatically categorize the page in the appropriate weapon type category, but only for the automatically generated damage type. For any additional, manually added damage type, a |listcat=<damage type> weapons will be necessary.
| ||
| knockback |
Knockback | ✔️[1] | @@@@ / {{kb|5}} |
If more than one value is needed, wrap the individual values with {{kb}} in order to ensure correct styling. The string does not need {{}}.
| |
| defense |
Defense | ✔️[1] | |||
| tileboost |
Tile range boost | ✔️ | |||
| bonus |
Miscellaneous bonuses | ❌ | |||
| setbonus |
Set bonus | ✔️[1] | For armor sets, where contains . Note that because this parameter is only sensible for set item infoboxes – which don't use since it doesn't work with sets – its data will always be generated automatically (instead of only when is set). Set this parameter to an empty value to hide the automatically generated set bonus.
| ||
| placeable |
Placeable | ✔️ | yes |
no |
|
| width |
Width when placed | ❌ | In tiles. Defaults to for blocks.
| ||
| height |
Height when placed | ❌ | |||
| consumable |
Consumable | ✔️ | True if the item leaves the player's inventory with ⚒ Utiliser / Attaquer; includes placeable items. It is found in the game's source code. | ||
| mana |
Mana cost | ✔️[1] | |||
| mheal |
Mana restoration | ✔️[1] | |||
| hheal |
Health restoration | ✔️[1] | |||
| critical |
Critical strike chance | ✔️[1] | 11 |
Without percentage sign ( ), unless more complex wikitext is used. If no value is entered and the main is , a default value of will be used.
| |
| body slot |
Body slot | ✔️ | |||
| use |
Use time | ✔️[1] | @@@@ / {{ut|30}} |
If more than one value is needed, wrap the individual values with {{ut}} in order to ensure correct styling. The string does not need {{}}.
| |
| velocity (deprecated: | sspeed ) |
Velocity | ✔️[1] | |||
| toolspeed |
Tool speed | ✔️[1] | |||
| tooltip |
Tooltip | ✔️[1] | |||
| rare |
Rarity | ✔️[1] | @@@@ / {{rare|0}} |
Use the {{rare}} template. | |
| research |
Research required | ✔️ | 5 |
||
| buy |
Buy value | ✔️[1] | Enter the value using the coin template ({{coin}}). If using , use buy=y/yes/true/show to enable display of automatic buy price (disabled by default, since many items that can be sold cannot be bought). Alternatively, add , , or to .
| ||
| sell |
Sell value | ✔️[1] | Also enter the value using the coin template. | ||
| value |
Value | ✔️ | Mostly used internally. Will not be displayed directly, but serves as the base for and . It can be used to suppress buy and sell value display entirely by setting it to a blank value (|value= ).
| ||
Buff- & debuff-related parameters | |||||
| buff |
Buff provided | ✔️ | Name of the buff. As a shortcut for and , they can be appended to this value, separated with a slash: | buff = <name> / <duration> / <chance> . Chance may also be omitted.
| ||
| idbuff |
Buff ID | ✔️ | |||
| bufflink |
Buff link target | ✔️ | |||
| bufftip |
Buff tooltip | ✔️ | |||
| buffchance |
Buff chance | ✔️ | |||
| buffduration |
Buff duration | ✔️[1] | Enter the value using the {{duration}} template. | ||
| buff<n> |
Additional buff provided | ❌ | Can be continued nearly infinitely, e.g. buff2 , buff3 , etc.
| ||
| idbuff<n> |
Buff ID | ❌ | |||
| bufflink<n> |
Buff link target | ❌ | |||
| bufftip<n> |
Buff tooltip | ❌ | |||
| buffchance<n> |
Buff chance | ❌ | |||
| buffduration<n> |
Buff duration | ❌ | |||
| debuff |
Debuff inflicted | ✔️ | Name of the debuff. As a shortcut for and , they can be appended to this value, separated with a slash: | debuff = <name> / <duration> / <chance> . Chance may also be omitted.
| ||
| iddebuff |
Debuff ID | ✔️ | |||
| debufflink |
Debuff link target | ✔️ | |||
| debufftip |
Debuff tooltip | ✔️ | |||
| debuffchance |
Debuff chance | ✔️ | |||
| debuffduration |
Debuff duration | ✔️[1] | Enter the value using the {{duration}} template. | ||
| debuff<n> |
Additional debuff provided | ❌ | Can be continued nearly infinitely, e.g. debuff2 , debuff3 , etc.
| ||
| iddebuff<n> |
Debuff ID | ❌ | |||
| debufflink<n> |
Debuff link target | ❌ | |||
| debufftip<n> |
Debuff tooltip | ❌ | |||
| debuffchance<n> |
Debuff chance | ❌ | |||
| debuffduration<n> |
Debuff duration | ❌ | |||
Sound-related parameters | |||||
| sounduse |
Use sound effect | ✔️ | Item_1.wav |
Can be a comma-separated list for multiple sounds. Caption is "Utilisation". | |
| sound1 |
Custom additional sound effect | Can be a comma-separated list for multiple sounds. | |||
| soundcaption1 |
Caption for the sound effect | ||||
| sound2 |
Custom additional sound effect | Can be a comma-separated list for multiple sounds. | |||
| soundcaption2 |
Caption for the sound effect | ||||
| sound<n> |
Custom additional sound effect | Can be continued nearly infinitely. Sounds will only be displayed if there is a sound<n> parameter with a corresponding soundcaption<n> parameter.
| |||
| soundcaption<n> |
Caption for the sound effect | ||||
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 | ✔️ | |||
| idarmor |
Armor ID | ✔️ | |||
| idbuffshow |
Vanity buff ID | ❌ | 170–172 |
The values of these parameters require to be escaped, i.e., wikitext like templates or parser functions will need to be wrapped with <esc> and </esc> .
| |
| idbuffshow<n> |
Vanity buff ID | ❌ | 1007 <esc>{{3DS}}</esc> |
||
| iddebuffshow |
Vanity debuff ID | ❌ | |||
| iddebuffshow<n> |
Vanity debuff 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 {{exclusive}} banner is on the page. If omitted and if does not contain , it will be detected automatically based on the result of {{eversions|<item name>}} (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:Objets obtenables uniquement en Hardmode.
|
By default, an item infobox is displayed in the standard infobox style, a boxed, table-like listing of stats on the right of the article text. It is possible to change the display format (called "view"), however – there are four other views available:
, custom
, item
, and table
(additionally void
). They can be selected via the test
(aliases: $view
, $mode
) parameter. Each view has an own subpage which contains the code for the respective output.
$output
View | Description | Subpage |
---|---|---|
|
Completely custom output. | /customView |
(default) |
Standard infobox-style output. | /infoboxView |
|
Displays the item as formatted by {{item}} .
|
/itemView |
|
Displays an entire table row (including the row separator, |- ).
|
/tableView |
|
Does not display anything. This is useful when it is necessary to store item information to the Cargo database, but an own infobox for the item is unwanted (e.g. on group pages, where there is a main infobox for all items of the group). | /voidView |
Some views enable additional, view-exclusive parameters:
Parameter | Description | Example | Default value (if omitted) |
Note |
---|---|---|---|---|
{{item infobox
| ||||
Custom viewCustom view | ||||
| template |
Name of the formatting template | This parameter is required when using the custom view. It is to be set to the name of the template that contains the custom code for the output. (For instance, |view=custom|template=item infobox/infoboxView could also be used for a standard infobox style, because {{item infobox/infoboxView}} contains the code for the output.)
| ||
| extargs |
Additional custom parameters | Enable additional, custom parameters for the {{}} call that are handled by the formatting template. Separate multiple parameter names with a slash character ( ). This parameter should only be used if the parameters specified in it are used in the {{}} call.
| ||
Item viewItem view | ||||
(all {{item}} parameters) |
The following additional {{item}} parameters will be processed as if the template itself was called:
See | |||
Table viewTable view | ||||
| cols |
Columns to display | item2cells/sell |
This parameter defines which columns/cells are to be displayed in the resulting table row. The content and formatting of those cells is handled by the respective subpage of Template:Item infobox/tableView, by default. The following values are predefined:
However, it is also possible to include another page name, e.g. Moss/Placed on bricks (via In addition, it is possible to include columns for which the content is set in the same | |
| colsep |
Separator for
|
\ |
/ |
Specify the character that separates the column names in . This is useful when using column names that include slashes, since the default separator is a slash and would thus treat that column name as two different columns.
|
| extargs |
Additional custom parameters | Enable additional, custom parameters for the {{}} call that are handled by the column formatting page. Separate multiple parameter names with a slash character ( ). For instance, the item2cells column formatting page is able to process three exclusive parameters, , , and . These parameters can be specified in the {{}} call to influence the formatting carried out by , but they will have no effect unless explicitly specified via |extargs=anchor/nolink/rowspan . This parameter should only be used if the parameters specified in it are used in the {{}} call.
|
Options
This template supports options through {{options}} template. All valid options are listed below, see {{options}} for usage and other infomation.
See Template:item infobox/initOptions for the initial options setting of this template.
Name | Alias | Initial Value | Value Mapping[1] | Note |
---|---|---|---|---|
view | output mode | infobox | ||
cols | (empty) | |||
colsep | (empty) | |||
extargs | (empty) | |||
imagemode | (empty) | |||
imageinfo | (empty) | y → (empty) yes → (empty) on → (empty) no → n off → n | ||
autoimageold | (empty) | y → (empty) yes → (empty) on → (empty) no → n off → n | ||
autoimageplaced | (empty) | y → (empty) yes → (empty) on → (empty) no → n off → n | ||
autoimageequipped | (empty) | y → (empty) yes → (empty) on → (empty) no → n off → n | ||
extold | (empty) | |||
extplaced | (empty) | |||
extequipped | (empty) | |||
item2cells:anchor | (empty) | yes → y on → y n → (empty) no → (empty) off → (empty) | ||
item2cells:nolink | (empty) | yes → y on → y n → (empty) no → (empty) off → (empty) | ||
template | (empty) |
- ↑ Values with mapping will be stored and loaded as mapped value. Other values without mapping will be stored and loaded as-is.
Subpages
There are numerous supplemental subpages which are mainly used for formatting certain data:
- Modèle:Item infobox/customView
- Modèle:Item infobox/damagetype
- Modèle:Item infobox/infoboxView
- Modèle:Item infobox/initOptions
- Modèle:Item infobox/itemView
- Modèle:Item infobox/l10n
- Modèle:Item infobox/options
- Modèle:Item infobox/rangebonus
- Modèle:Item infobox/tableView
- Modèle:Item infobox/tableView/baitpower
- Modèle:Item infobox/tableView/buff
- Modèle:Item infobox/tableView/buffduration
- Modèle:Item infobox/tableView/bufftip
- Modèle:Item infobox/tableView/buy
- Modèle:Item infobox/tableView/damage
- Modèle:Item infobox/tableView/dimensions
- Modèle:Item infobox/tableView/dimensions-compact
- Modèle:Item infobox/tableView/fishing
- Modèle:Item infobox/tableView/idtile
- Modèle:Item infobox/tableView/idtile-sortbysubid
- Modèle:Item infobox/tableView/idwall
- Modèle:Item infobox/tableView/imagebuff
- Modèle:Item infobox/tableView/imageequipped
- Modèle:Item infobox/tableView/imageplaced
- Modèle:Item infobox/tableView/item
- Modèle:Item infobox/tableView/item2cells
- Modèle:Item infobox/tableView/item2cells-anchor
- Modèle:Item infobox/tableView/item2cells-anchor-nolink
- Modèle:Item infobox/tableView/item2cells-nolink
- Modèle:Item infobox/tableView/makenpcid
- Modèle:Item infobox/tableView/mount
- Modèle:Item infobox/tableView/projectile
- Modèle:Item infobox/tableView/projectile2cells
- Modèle:Item infobox/tableView/rarity
- Modèle:Item infobox/tableView/sacrifices
- Modèle:Item infobox/tableView/sell
- Modèle:Item infobox/tableView/sell-alignright
- Modèle:Item infobox/tableView/size-compact
- Modèle:Item infobox/tableView/source
- Modèle:Item infobox/tableView/stack
- Modèle:Item infobox/tableView/tileboost
- Modèle:Item infobox/tableView/tooltip
- Modèle:Item infobox/tableView/usetime
- Modèle:Item infobox/tableView/velocity
- Modèle:Item infobox/voidView
See also
- {{npc infobox}}