Hello there! We are conducting a survey to better understand the user experience in making a first edit. If you have ever made an edit on Gamepedia, please fill out the survey. Thank you!

Template:Hp/doc

From Terraria Wiki
Jump to: navigation, search

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

Usage[edit source]

  • {{hp|100}} returns
    PlayerHeart.pngPlayerHeart.pngPlayerHeart.pngPlayerHeart.pngPlayerHeart.png
  • {{hp|100|small}} 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}} 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}} 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 ht=no to suppress this hover text and make the icons clickable:
{{hp|100|ht=no}} returns
PlayerHeart.pngPlayerHeart.pngPlayerHeart.pngPlayerHeart.pngPlayerHeart.png
{{hp|460|small|ht=no}} returns
Heart.png × 20 + Life Fruit.png × 12