Szablon:Item infobox

Z Terraria Wiki
Skocz do: nawigacja, szukaj

This template defines the table "Items_new". View table. A replacement table has been generated for this table; View replacement table.

Ten szablon jest zgodny z i18n, co oznacza, że jest łatwa do zlokalizowania dla różnych języków. Więcej informacji można znaleźć w I18n i l10n dla szablonów.
Lua logo.svg
This template uses Module:Iteminfo, a script written in the Lua programming language. Please see wikipedia:Lua and mw:Extension:Scribunto to learn more about Lua.
Template-info.svg Dokumentacja Poniższa dokumentacja jest załączona do Szablon:Item infobox/doc. (edytuj | historia)

This template is used for displaying the infobox for an item. It is one of the most important and most powerful infobox templates.

Usage[edytuj kod]

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 auto and set it to the ID of the item (alternatively: 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[edytuj kod]

  • 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)
{{item infobox
Box-related parameters
| boxwidth Width of the infobox 27em 21em Number with unit. Default is 21em or stretching to image width
| float Position of the infobox left right
| css
| style
CSS style affecting the entire infobox Any width or float properties defined here will override the template's $boxwidth and $float parameters, respectively.
| auto Enables automatic data 465 Can also be yes (see text above).
| id ID of the item Tango Tick1.png 465 The automatic data gathering for $tooltip is based on this.
| name Name of the item Tango Tick1.png Wood Page name Will be displayed as heading of the infobox.
| lname Localized name of the item Tango Tick1.png Legno
(Italian for "Wood")
{{tr|$name}} Will be displayed as heading of the infobox; only to be used if $name is not existent in the {{tr}} database of the specific language.
| showenglishname Display of English name of this item yes
no for languanges which has in-game translation,
yes for other languages.
for, there are en/de/es/fr/it/pl/pt/ru/zh in-game.
| 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 $image 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 .gif and then for the .png.
| 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 $imagebreak is set to (i.e, setting it to no will also enable it – so refrain from doing that).
| imageinfo Prevents the internal usage of {{image}} no Setting it to no will cause the template to use the standard [[File:]] 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 Tango Tick1.png yes Displays Autoswing, Autofire, or Auto-use in the top-right corner of the infobox. Hover text is determined by $damagetype ("Autoswing" for melee, "Autofire" for ranged and magic, and "Auto-use" for anything else).
| stack Maximum possible stack size Tango Tick1.png[1] 99 1 max quantity of this item that can be stacked in a single inventory slot
| pick Pickaxe power Tango Tick1.png[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: Pickaxe icon.png Hammer icon.png Axe icon.png
| hammer Hammer power Tango Tick1.png[1] 75
| axe Axe power Tango Tick1.png[1] 50
| pickreq Required pickaxe power for destroying Tango Cross1.png 150 Without percentage sign (%)!
| hammerreq Required hammer power for destroying Tango Cross1.png 80 Without percentage sign (%)! Prints the following behind it: "(tylko w Hardmodzie)"
| type
| type2)
Classification and categorization Tango Tick1.png 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 Tango Tick1.png Without percentage sign (%)!
| damage Damage Tango Tick1.png[1]
| damagetype Damage type Tango Tick1.png Melee, ranged, magic, summon, or thrown.
| knockback Knockback Tango Tick1.png[1] If more than one value is needed, you should wrap the values with {{kb}}, e.g. {{kb|7.5}}/{{kb|6}}.
| defense Defense Tango Tick1.png[1]
| tileboost Tile range boost Tango Tick1.png
| bonus Miscellaneous bonuses Tango Cross1.png
| setbonus Set bonus Tango Tick1.png For armor sets, where $type contains Set. Note that because this parameter is only sensible for set item infoboxes – which don't use $auto since it doesn't work with sets – its data will always be generated automatically (instead of only when $auto is set). Set this parameter to an empty value to hide the automatically generated set bonus.
| placeable Placeable Tango Tick1.png yes no
| width Width when placed Tango Cross1.png In tiles.
| height Height when placed Tango Cross1.png In tiles.
| consumable Consumable Tango Tick1.png True if the item leaves the player's inventory with Użycie / Atak; includes placeable items. It is found in the game's source code.
| mana Mana cost Tango Tick1.png[1]
| mheal Mana restoration Tango Tick1.png[1]
| hheal Health restoration Tango Tick1.png[1]
| critical Critical strike chance Tango Tick1.png[1] 11 Without percentage sign (%), unless more complex wikitext is used. If no value is entered and the main $type is Weapon, a default value of 4 will be used.
| body slot Body slot Tango Tick1.png
| use Use time Tango Tick1.png
| velocity
| sspeed)
Velocity Tango Tick1.png
| toolspeed Tool speed Tango Tick1.png[1]
| tooltip Tooltip Tango Tick1.png[1]
| rare Rarity Tango Tick1.png[1] See {{rare}} for possible values.
| buy Buy value Tango Tick1.png[1] Enter the value 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 Tango Tick1.png[1] Also enter the value using the coin template.
| value Value Tango Tick1.png Mostly used internally. Will not be displayed directly, but serves as the base for $buy and $sell.
Buff- & Debuff-related parameters
| bufftype Type of the status effect Tango Tick1.png Mostly used internally. Can be buff or debuff.
| idbuff Buff ID Tango Tick1.png
| buff Buff provided Tango Tick1.png
| bufflink Buff link target Tango Tick1.png
| bufftip Buff tooltip Tango Tick1.png
| duration Buff duration Tango Tick1.png[1]
| debuff Debuff inflicted Tango Cross1.png As a shortcut for $debuffduration and $debuffchance, append them to this value, separated with a slash: | debuff = <name> / <duration> / <chance> (optional).
| debufflink Debuff link target Tango Cross1.png
| debufftip Debuff tooltip Tango Cross1.png
| debuffchance Debuff chance Tango Cross1.png
| debuffduration Debuff duration Tango Cross1.png
Sound-related parameters
| sounduse Use sound effect Tango Tick1.png Item_1.wav Can be a comma-separated list for multiple sounds. Caption is "Use".
| 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 Tango Tick1.png
Projectile-related parameters
| idprojectile
| shoot)
Projectile ID Tango Tick1.png Can be a comma-separated list for multiple IDs.
| projectilename Projectile name Tango Tick1.png
| projectileimage Projectile image Tango Tick1.png
| projectileblock Projectile images arrangement Tango Cross1.png Operates similarly to $imagebreak.
ID-related parameters
| showids Display of ID section Tango Cross1.png no ID section is not hidden by default.
| idshow Vanity item ID Tango Cross1.png
| idtile Tile ID Tango Tick1.png
| idtileshow Vanity tile ID Tango Cross1.png
| idtilesub Tile sub-ID Tango Tick1.png Internally known as placeStyle in Terraria.
| idwall Wall ID Tango Tick1.png
| idarmor Armor ID Tango Tick1.png
| idbuffshow Vanity buff ID Tango Cross1.png
Back-end-related parameters
| cate Toggles categorization Tango Cross1.png no Set to yes to force categorization when it is disabled by default (on non-mainspace pages). Set to no to disable categorization.
| listexclude Toggles categorization Tango Cross1.png yes no Set to yes to disable categorization. Overrides cate=yes, but not cate=no.
| cargo Toggles cargo data storage Tango Cross1.png no Set to force to force cargo data storage when it is disabled by default (on non-mainspace pages). Set to no to disable cargo data storage. Note that setting it to anything else (e.g. yes) also disables cargo data storage, so please stick to the unambiguous no.
| listcat Categorization Tango Tick1.png Supplemental category names to include the current item in a DPL list, e.g. arrows causes the item to display at the Arrows page. Separate multiple categories with a slash character (/). The following categories will be added automatically:
| tag
| tags
Categorization Tango Tick1.png Supplemental category names to appropriately categorize the item. Can contain any of the following (separate multiple with a slash character (/):
  • buy/buyable/vendor (equal to buy=yes)
  • hardmodeonly/hardmode (equal to hardmode=yes)
  • allversions (equal to allversions=yes)
  • dd2 (means that this item is to be purchased with Medal obrońcy.)
  • drop (equal to listcat=drop items)
  • loot (equal to listcat=loot items)
  • plunder (equal to listcat=plunder items)
  • fished (equal to listcat=fished items)
  • unobtainable (equal to listcat=unobtainable items)
  • developer (equal to listcat=developer items).
  • storage (equal to listcat=storage items).
  • informational (equal to listcat=informational items).
  • quest rewards (equal to listcat=quest rewards).
  • light source (equal to listcat=light source items).
  • novelty (equal to listcat=novelty items).
  • mechanism (equal to listcat=mechanism items).
  • potion ingredients (equal to listcat=potion ingredients).
  • bag loot/bagloot (equal to listcat=bag loot items).
  • treasure bag loot (equal to listcat=Treasure Bag loot items).
  • minion (equal to type=weapon and listcat=minion summon items).
  • sentry (equal to type=weapon and listcat=sentry summon items).

All other values will have no effect. All tags will be stored to cargo for querying.

| allversions Platform version availability Tango Tick1.png Set to yes 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 $tags does not contain allversions, it will be detected automatically based on the result of {{eversions|<item name>}} (even though $auto might not be set!). Categorizes the page in all five version content categories (with the exception of Category:Japanese console content), if yes is determined.
| hardmode Hardmode-exclusivity Tango Tick1.png yes Set to yes 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.

Subpages[edytuj kod]

There are numerous supplemental subpages which are mainly used for formatting certain data:

See also[edytuj kod]

Footnotes[edytuj kod]

  1. 1,00 1,01 1,02 1,03 1,04 1,05 1,06 1,07 1,08 1,09 1,10 1,11 1,12 1,13 1,14 1,15 1,16 Any occurrence of the string @@@@ in the parameter value will be replaced by the automatically generated data. This can be used to mix automatic and manual data.