Owl.png Wiki reading hard on the eyes? Try out our Dark Theme! Visit the preferences page while logged in and select Hydra Dark. Owl.png

Template:Hp

From Terraria Wiki
Jump to: navigation, 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.
Template-info.svg Documentation The documentation below is transcluded from Template:Hp/doc. (edit | history)

A template that displays health values in a similar fashion to Terraria.

Usage[edit source]

{{ hp | <health value> | small = 1 (optional) | link = 1 (optional) }}

ParameterDescriptionTypeStatus
Health value1
Health value to display.
Example:
150
Numberrequired
Compressedsmall
Reduces the display to a compact format, useful when space is an issue.
Auto value:
True (1)
Booleanoptional

Format: inline

Examples[edit source]

  • {{hp|100}} returns
    PlayerHeart.pngPlayerHeart.pngPlayerHeart.pngPlayerHeart.pngPlayerHeart.png
  • {{hp|100|small=1}} returns
    Heart.png × 5
  • {{hp|460}} returns
PlayerHeart2.pngPlayerHeart2.pngPlayerHeart2.pngPlayerHeart2.pngPlayerHeart2.pngPlayerHeart2.pngPlayerHeart2.pngPlayerHeart2.pngPlayerHeart2.pngPlayerHeart2.pngPlayerHeart2.pngPlayerHeart2.pngPlayerHeart.pngPlayerHeart.pngPlayerHeart.pngPlayerHeart.pngPlayerHeart.pngPlayerHeart.pngPlayerHeart.pngPlayerHeart.png
  • {{hp|460|small=1}} returns
    Heart.png × 20 + Life Fruit.png × 12

Notes[edit source]

  • The standard form of the template cannot round values and does not account for the Lifeforce Potion. Between 0 and 400, use increments of 20. Between 400 and 500, increments of 5.
    • The small parameter will allow rounded values, but rounds down regardless of value, i.e, {{hp|119|small=1}} returns
      Heart.png × 5
  • By default, the template's output is provided with a hover text, displaying the health value that was used as the input. Use the parameter link=1 to suppress this hover text and make the icons clickable:
{{hp|100|link=1}} returns
PlayerHeart.pngPlayerHeart.pngPlayerHeart.pngPlayerHeart.pngPlayerHeart.png
{{hp|460|small=1|link=1}} returns
Heart.png × 20 + Life Fruit.png × 12