Template:Health: Difference between revisions
imported>Ttv pedro270707 (Redirected page to Template:Healthbar) |
imported>Ttv pedro270707 mNo edit summary |
||
(10 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
# | <includeonly>{{#ifeq: {{bl|{{{notag|}}}}} | y | | {{{1|0}}} ( }}{{#ifexpr: {{{1|0}}} <= 10 | {{healthbar|size={{{2|9}}}|value={{{1|0}}}|total={{{total|}}}}} | {{healthbar|size={{{2|9}}}|value=2|total={{{total|}}}}} × {{#expr: {{{1|0}}} / 2}}}}{{#ifeq: {{bl|{{{notag|}}}}} | y | | ) }}</includeonly><noinclude> | ||
{{Documentation}} | |||
<!-- Put categories on the documentation page --> | |||
</noinclude> |
Latest revision as of 21:01, 25 March 2023
[view | | | ]Documentation
This template displays health points and visualizes these with the help of a health bar.
For a more compact display, all health point values above 10 (5 hearts) are replaced by × [hp / 2].
All health point values which are not whole numbers are also replaced by × [hp / 2].
Parameter | Function | Default value |
---|---|---|
1 |
Amount of hearts to show. | 0 |
2 |
Size of hearts in pixels. | 9 |
notag |
Remove number and parenthesis. | None |
total |
Total or minimum amount of hearts to show, any more than the set amount in Template:P are shown as empty. | 0 |
Code | Result |
---|---|
{{hp}} |
0 (♥) |
{{hp|0}} |
0 (♥) |
{{hp|4}} |
4 ( |
{{hp|4|total=20}} |
4 ( |
{{hp|4|18px}} |
4 ( |
{{hp|20|notag=1}} |
|
{{hp|26|notag=1}} |
|
{{hp|10}} |
10 ( |
{{hp|2.5}} |
2.5 ( |
{{hp|41}} |
41 ( |
[view | | | ]The above documentation is transcluded from Template:Health/doc.