Template:ItemTooltip

From Terraria Wiki
Jump to navigation Jump to search
This template is i18n-ready, which means it is easy to localize for different languages. Please see I18n & l10n for templates to learn more.
See Template:ItemTooltip/l10n for the localization of this template.
Important.svg
CAUTION: Terraria Wiki code is complex!!!
If you want to use this code on another wiki, wiki.gg staff are not able to assist you.
Please consider picking a different wiki to adapt code from, or making your own templates!
Remember that content on a wiki is more important than fancy formatting.
Template-info.svg Documentation The documentation below is transcluded from Template:ItemTooltip/doc. (edit | history)

This template displays the tooltip of an item by its ID.

Usage

{{ itemTooltip | <item ID> | left = <text> (optional) | right = <text> (optional) | grapple = <text> (optional) | lang = <language code> (optional) }}

First unnamed parameter

ID of the item.

left

Custom replacement for <left> in the tooltip. The default replacement is Left click.

right

Custom replacement for <right> in the tooltip. The default replacement is Right click.

grapple

Custom replacement for {InputTrigger_Grapple} in the tooltip. The default replacement is "Grapple".

lang

Language code, one of the following 11 (as in-game): de (German), en (English), es (Spanish), fr (French), it (Italian), ja (Japanese), ko (Korean), pl (Polish), pt (Portuguese), ru (Russian), zh (Chinese). All other languages will use the English database. If this parameter is omitted, it defaults to {{lang}}.

Examples

Code Result Note
{{itemTooltip|937}} Explodes when stepped on or signalled
{{itemTooltip|3006}} Drains life from enemies
{{itemTooltip| 3006 }} Drains life from enemies
{{itemTooltip|757}} The Terra Blade (ID 757) has no tooltip.
{{itemTooltip|1774}} Right click to open The tooltip contains <right>, which was automatically replaced by the default Right click here.
{{itemTooltip|1774|right={{key|open}}}} Open / Activate to open Using Open / Activate for <right>.
{{itemTooltip|1774|right= Double tap }} Double tap to open
{{itemTooltip|3623|grapple=the "Grapple" key}} Press the "Grapple" key to launch hook Using a custom string for the {InputTrigger_Grapple} placeholder.
{{itemTooltip|3006|lang=es}} Absorbe vida de los enemigos Internationalization is supported.