Szablon:Item new infobox

Z Terraria Wiki
Skocz do: nawigacja, szukaj

This template defines the table "Items_new". View table.

This template is i18n-ready, which means it is easy to localize for different languages. Please see I18n & l10n for Templates to learn more.
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.

Provides the functionality to automatically gather base statistics of an item from Module:Iteminfo. See that page for documentation and which statistics are affected.

In order to enable automatic gathering of data, set auto=yes. The template will try to gather the Item ID from the page name. If this fails, use auto=<Item ID> (alternatively: auto=yes with id=<Item ID>). If auto is not set, no data will be gathered automatically. The functionality of {{item new infobox}} is retained, hence every parameter that is entered manually always overwrites the automatic one. Additionally, a set of "disabling parameters" is available: norare, nocritical, nobait, noidprojectile, etc. Use them to suppress display of the respective automatically created data.

Note: 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). Buy / Sell handling is the only difference from {{item new infobox}}: In order to enable double-line display, use sellnewline=yes.

Parameter tooltip2 is to be used for tooltips of Old-gen console version Old-gen console and 3DS versionDS-exclusive items.

Usage[edytuj kod]

  • Everything is optional.
  • You can add a "name," "image," "imagefemale," and "imagebreak." Fill these values if the ROOTPAGENAME macro is not adequate (if the page name has a disambig qualifier for example)
{{item new infobox
| boxwidth = width of infobox; default = 21em or stretches to image width
| float = default is right
| css / style = css style for infobox box, if width:xx or float:xx inclueded it will override boxwidth= or float=.
| name = custom item name; default = page name
| namesub = custom item name, displays below name
| image = inventory image (filename); default = name.png (also used for sets)
| imageold = old inventory image (filename); default = name (old).png
| imagefemale = female equipped variant (filename); default = name female.png
| imageplaced = placed image (filename); default = name (placed).gif; if no GIF exists, default = name (placed).png
| imageequipped = equipped image (filename); default = name (equipped).gif; if no GIF exists, default = name (equipped).png
| imagebreak = if yes, placed/equipped image is pushed to a new line below the inventory image; default = no
| imagealt = custom images, full images code wikitext.
| type = eg. Weapon, Tool, Furniture, etc. "/" seperated. e.g. Weapon / Tool. "Crafting material" will be auto added if needed.
| damage = damage inflicted per hit. You can use "@@@@" as a placeholder for auto value.
| damageraw = deprecated; use "data-sort-type=number" in Damage column header instead;

(was used if damage had icons and/or formatting, to give an unformatted number for use in sorting lists)

| damagetype = melee, ranged, magic, summon, or thrown
| autoswing = yes, if weapon/item is capable of auto-use by holding the use key/button
| defense = defense provided
| bonus =
| setbonus = for armor sets, where type2 = Set
| pick = pickaxe power, without "%"
| pickreq = pickaxe power required, without "%"
| axe = axe power, without "%"
| hammer = hammer power, without "%"
| hammerreq = hammer power required, without "%"
| bait = bait power, without "%"
| knockback = knockback inflicted per hit, if more than one value needed, you should wrap the values with {{kb}}, e.g. {{kb|7.5}}/{{kb|6}}
| placeable = yes/no
| width = width when placed, tiles
| height = height when placed, in tiles
| mana = mana cost per use
| mregen = mana regeneration
| mheal = mana heal
| lregen = health (life) regeneration
| hheal = health heal
| tooltip = Tooltip. You can use "@@@@" as a placeholder for auto value.
| velocity =
| critical = if no value is entered and the main Type is "Weapon", a default value of 4% is displayed
| body slot =
| use = use time
| toolspeed =
| buff = buff provided
| bufflink = buff link target
| duration = buff duration
| bufftip = buff tooltip
| debuff = debuff provided. you can use shortcut: "[name] / [duration] / [chance(optional)]" for debuff/debuffderation/debuffchance.
| debufflink = debuff link target
| debuffduration = debuff duration
| debuffchance = debuff chance;
| debuffchancenote = additional notes about the debuff, will be displayed underneath the debuff icon
| debufftip = buff tooltip
| stack = max quantity of this item that can be stacked in a single inventory slot; defaults to 1 for all items
| rare = rarity value, eg. '1' for Blue, '2' for Green, 'q' for Amber (quest), 'rainbow' for expert-exclusive.
| buy = buy value in coins, enter using coin templates ({{cc}}, {{sc}}, {{gc}}, {{pc}}). y/yes for use auto value.
| sell = sell value in coins, also enter using coin templates
| consumable = true: (found in source code) leaves player's inventory with , includes placeable items
| id = internal item ID
| idbuff = internal buff ID
| idtile = internal tile ID
| idwall = internal wall ID
| idmount = internal mount ID
| idprojectile = internal projectile id (aka 'shoot', which is partially deprecated)
| listcat = supplemental category names to include the current item in a DPL list, eg. "arrows" causes the item to display at Arrows. "/" seperated. Note: some categories will be auto added: "vendor items"(if buy=true or tags include buy/buyable), "Craftable items"(if this item is result of any recipe), "arrows/coins/bullets/sands/darts/rockets/solutions/flares"(if this item is that kind of ammo).
| tags / tag = "/" seperated. Can be buy/buyable(equal to buy=yes), hardmodeonly/hardmode(equal to hardmode=yes), allversions(equal to allversions=yes), drop(equal to listcat= drop items), lootdrop(equal to listcat= loot items), fished(equal to listcat=fished items), unobtainable(equal to listcat=unobtainable items), developer(equal to listcat=developer items). All other values will have no output. All tags will stored to cargo for query.
| listexclude = yes, to exclude the current template from DPL lists
| allversions = yes/no is available on all versions?(only Desktop/Console/Old-gen Console/Mobile/3DS content, where no "___ content only" banner is present). if not set, will be detected based on {{eversions|[itemname]}}.
| hardmode = yes, for items that only become available in Hardmode worlds
| pagelink = pagename. Alt link page for main name title and cargo store value.