Template:Hp: Difference between revisions

From bg3.wiki
Jump to navigation Jump to search
(Created page with "<includeonly>{{#ifexpr: {{{1|2}}} > 1 | {{#lvardef:plural|true}}}}{{#if:{{{plural|}}}|{{#lvardef:plural|true}}}}{{Icon|HP Icon.png|{{{2|25}}}}} {{{1|}}} {{#if:{{{temp|}}}|Temporary Hit Point{{#if:{{#lvar:plural}}|s}}|Hit Point{{#if:{{#lvar:plural}}|s}}}}</includeonly><noinclude> {{underConstruction}} Represents HP or Temp HP. See also Template:Temp hp for a simpler way to display temporary HP. {| class="wikitable" !...")
 
No edit summary
 
(5 intermediate revisions by one other user not shown)
Line 1: Line 1:
<includeonly>{{#ifexpr: {{{1|2}}} > 1 | {{#lvardef:plural|true}}}}{{#if:{{{plural|}}}|{{#lvardef:plural|true}}}}{{Icon|HP Icon.png|{{{2|25}}}}} {{{1|}}} {{#if:{{{temp|}}}|[[Hit Points#Temporary Hit Points|Temporary Hit Point{{#if:{{#lvar:plural}}|s}}]]|[[Hit Points|Hit Point{{#if:{{#lvar:plural}}|s}}]]}}</includeonly><noinclude>
<includeonly>{{Icon|HP Icon.png|{{{size|25}}}}} {{{1|}}} {{#ifeq:{{{1|}}}|1|[[Hit points|hit point]]|[[hit points]]}}</includeonly><noinclude>Represents HP or Temp HP. See also [[Template:Temp hp]] for the equivalent template for temporary HP.
{{underConstruction}}
Represents HP or Temp HP. See also [[Template:Temp hp]] for a simpler way to display temporary HP.


{| class="wikitable"
{| class="wikitable"
Line 7: Line 5:
|-
|-
| <code><nowiki>{{Hp}}</nowiki></code> || {{Hp}}
| <code><nowiki>{{Hp}}</nowiki></code> || {{Hp}}
|-
| <code><nowiki>{{Hp|temp=1}}</nowiki></code> || {{Hp|temp=1}}
|-
|-
| <code><nowiki>{{Hp|1}}</nowiki></code> || {{Hp|1}}
| <code><nowiki>{{Hp|1}}</nowiki></code> || {{Hp|1}}
Line 14: Line 10:
| <code><nowiki>{{Hp|2}}</nowiki></code> || {{Hp|2}}
| <code><nowiki>{{Hp|2}}</nowiki></code> || {{Hp|2}}
|-
|-
| <code><nowiki>{{Hp|1|temp=1}}</nowiki></code> || {{Hp|1|temp=1}}
| <code><nowiki>{{Hp|2d4}}</nowiki></code> || {{Hp|2d4}}
|-
| <code><nowiki>{{Hp|2|temp=1}}</nowiki></code> || {{Hp|2|temp=1}}
|-
|-
| <code><nowiki>{{Hp|1|plural=t}}</nowiki></code> || {{Hp|1|plural=t}}
| <code><nowiki>{{Hp|3|size=40}}</nowiki></code> || {{Hp|3|size=40}}
|-
| <code><nowiki>{{Hp|2d4}}</nowiki></code> || {{Hp|2d4}}
|}
|}


Line 35: Line 27:
"type": "number"
"type": "number"
},
},
"2": {
"size": {
"label": "size",
"description": "The icon size.",
"description": "The icon size.",
"default": "25"
"default": "25"
},
"plural": {
"description": "If specified, will force plural.",
"type": "boolean"
},
"temp": {
"description": "If specified, will format as temporary HP"
}
}
},
},
"paramOrder": [
"paramOrder": [
"1",
"1",
"2",
"size"
"plural",
],
"temp"
"format": "inline"
]
}
}
</templatedata></noinclude>
</templatedata></noinclude>

Latest revision as of 22:20, 25 October 2023

Represents HP or Temp HP. See also Template:Temp hp for the equivalent template for temporary HP.

Code Result
{{Hp}} HP Icon.png hit points
{{Hp|1}} HP Icon.png 1 hit point
{{Hp|2}} HP Icon.png 2 hit points
{{Hp|2d4}} HP Icon.png 2d4 hit points
{{Hp|3|size=40}} HP Icon.png 3 hit points

Template data

No description.

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
value1

The number of hitpoints to represent.

Numberoptional
sizesize

The icon size.

Default
25
Unknownoptional