Predefinição:Item infobox
Essa predefinição é usada para exibir uma infobox para um item. É uma das mais importantes e mais poderosas predefinições de infobox.
Uso
Apesar de que a predefinição seja extremamente versátil, sua funcionalidade primária é exibir a infobox padrão.
Os dados que serão exibidos podem ser manualmente colocados quando chamando a predefinição, mas graças à {{iteminfo}}, a grande maioria dos dados é gerado automáticamente. Para ativar dados automáticos, use o parâmetro
e defina-o para o ID do item (alternativamente:auto
auto=yes
e ou id=<item ID>
, name=<item name>
, ou nada, os dois últimos métodos farão que a predefinição automáticamente gere o ID usando {{itemNameFromId}}, sendo que o último método usa o título da página como referência para o nome). Dessa maneira, todos os parâmetros relevantes de um item serão definidos automáticamente. Veja a tabela abaixo para os parâmetros afetados. Contudo, eles ainda podem ser substituídos e parâmetros colocados manualmente sempre terão precedência sobre os automáticos.
Parâmetros básicos
- Notes:
- O cifrão (
) é usado para significar que a palavra depois dele é o nome de um parâmetro de predefinição.$
- Todos os parâmetros os quais têm um valor padrão listados podem normalmente serem omitidos. Mantenha em mente que isso não significa que os parâmetros que não tenham um valor padrão listado devem sempre serem preenchidos.
Parâmetro | Descrição | Auto | Exemplo | Valor padrão (se omitido) |
Nota |
---|---|---|---|---|---|
{{item infobox
| |||||
Parâmetros relacionados à Caixa | |||||
| boxwidth |
Largura da infobox | 27em |
21em |
Número com unidade. Código padrão é ou esticar para a largura da imagem
| |
| float |
Posição da infobox | left |
right |
||
| css or | style |
Estilo CSS afetando a infobox inteira | Qualquer propriedade ou definida aqui substituirá os parâmetros e da predefinição, respectivamente
| |||
| auto |
Ativa data automática | 465 |
Também pode ser (veja o texto acima).
| ||
| id |
ID do item | ✔️ | 465 |
A coleção de dados automática para é baseada nisso.
| |
| name |
Nome do item | ✔️ | Wood |
Nome da página |
Será exibido como o cabeçalho da infobox. |
| lname |
Nome localizado do item | ✔️ | Legno (Italiano para "Madeira") |
{{tr|$name}} |
Será exibido como o cabeçalho da infobox; só para ser usado se não existir no banco de dados {{tr}} da língua específica.
|
| showenglishname |
Exibição do nome Inglês desse item | yes no |
O padrão é para línguas que possuem uma tradução dentro do jogo ( , (German), (Spanish), (French), (Italian), (Polish), (Portuguese), (Russian), (Chinese)), e para para todas as outras línguas.
| ||
| namesub |
Sub-cabeçalho para o nome | Informação adicional diretamente abaixo do título da infobox; raramente útil para infoboxes de item. | |||
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 . 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: "(apenas no Modo Difícil)"
| |
| 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.
| |
| 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 ⚒ Usar / Atacar; 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. | |
| 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 .
| ||
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 | ❌ | As a shortcut for and , append them to this value, separated with a slash: | debuff = <name> / <duration> / <chance> (optional) .
| ||
| debufflink |
Debuff link target | ❌ | |||
| debufftip |
Debuff tooltip | ❌ | |||
| debuffchance |
Debuff chance | ❌ | |||
| debuffduration |
Debuff duration | ❌ | |||
Sound-related parameters | |||||
| sounduse |
Use sound effect | ✔️ | Item_1.wav |
Can be a comma-separated list for multiple sounds. Caption is "Uso". | |
| 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 | ❌ | |||
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:Hardmode-only items.
|
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. Requires a parameter with 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.)
|
/customView |
(default) |
Standard infobox-style output. | /infoboxView |
|
Displays the item as formatted by {{item}} .
|
/itemView |
|
Displays an entire table row (including the row separator, |- ). Requires a parameter that defines which columns are to be displayed.
|
/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 |
Subpages
There are numerous supplemental subpages which are mainly used for formatting certain data:
- Predefinição:Item infobox/customView
- Predefinição:Item infobox/damagetype
- Predefinição:Item infobox/infoboxView
- Predefinição:Item infobox/initOptions
- Predefinição:Item infobox/itemView
- Predefinição:Item infobox/l10n
- Predefinição:Item infobox/options
- Predefinição:Item infobox/rangebonus
- Predefinição:Item infobox/tableView
- Predefinição:Item infobox/tableView/baitpower
- Predefinição:Item infobox/tableView/buff
- Predefinição:Item infobox/tableView/buffduration
- Predefinição:Item infobox/tableView/bufftip
- Predefinição:Item infobox/tableView/buy
- Predefinição:Item infobox/tableView/damage
- Predefinição:Item infobox/tableView/dimensions
- Predefinição:Item infobox/tableView/dimensions-compact
- Predefinição:Item infobox/tableView/fishing
- Predefinição:Item infobox/tableView/idtile
- Predefinição:Item infobox/tableView/idtile-sortbysubid
- Predefinição:Item infobox/tableView/idwall
- Predefinição:Item infobox/tableView/imagebuff
- Predefinição:Item infobox/tableView/imageequipped
- Predefinição:Item infobox/tableView/imageplaced
- Predefinição:Item infobox/tableView/item
- Predefinição:Item infobox/tableView/item2cells
- Predefinição:Item infobox/tableView/item2cells-anchor
- Predefinição:Item infobox/tableView/item2cells-anchor-nolink
- Predefinição:Item infobox/tableView/item2cells-nolink
- Predefinição:Item infobox/tableView/makenpcid
- Predefinição:Item infobox/tableView/mount
- Predefinição:Item infobox/tableView/projectile
- Predefinição:Item infobox/tableView/projectile2cells
- Predefinição:Item infobox/tableView/rarity
- Predefinição:Item infobox/tableView/sacrifices
- Predefinição:Item infobox/tableView/sell
- Predefinição:Item infobox/tableView/sell-alignright
- Predefinição:Item infobox/tableView/size-compact
- Predefinição:Item infobox/tableView/source
- Predefinição:Item infobox/tableView/stack
- Predefinição:Item infobox/tableView/tileboost
- Predefinição:Item infobox/tableView/tooltip
- Predefinição:Item infobox/tableView/usetime
- Predefinição:Item infobox/tableView/velocity
- Predefinição:Item infobox/voidView
See also
- {{npc infobox}}
Footnotes
- Pages setting LuaCache keys
- Templates using Cargo
- Predefinições prontas para i18n
- Predefinições utilizando Lua
- Item infobox