Template:GetArmorInfo

From Terraria Wiki
Jump to: navigation, search
Template-info.svg Documentation The documentation below is transcluded from Template:GetArmorInfo/doc. (edit | history)

This template is used to retrieve information about an equipable "armor" item. The term "armor" here is used in Terraria's source code, hence it is used here as well, although it is different from the the one generally used on the wiki, Armor. See Armor IDs for a list of all "armor" items.

Usage

{{getArmorInfo| head/body/legs | <ID> | <field> }}

First and second unnamed parameters

Identification of the item; see Armor IDs.

Third unnamed parameter

Which piece of information to get. Can be one of the following: name, link, image, count.

Use {{getArmorInfo|head||count}} to retrieve the maximum ID of all "head armor" items ("body" and "legs" equivalently) and {{getArmorInfo|||count}} to retrieve the maximum out of the three counts (a shortcut for {{max|{{getArmorInfo|head||count}}|{{getArmorInfo|body||count}}|{{getArmorInfo|legs||count}}}}, which gets the same result).

Examples

Code Result
{{getArmorInfo|body|41|name}} Princess Dress
[[{{getArmorInfo|body|41|link}}]] Princess Dress (Clothier)

Notes

  • For the reverse functionality, retrieving body slot and armor ID from an item name, use {{iteminfo}}, like in the following example:
Code Result
head: {{iteminfo|Princess Dress|headSlot}}
body: {{iteminfo|Princess Dress|bodySlot}}
legs: {{iteminfo|Princess Dress|legSlot}}
head:
body: 88
legs:

See also

  • {{getSetInfo}} for retrieving information about armor sets