Template:Resistance: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
HiddenDragon (talk | contribs) (Use template demo/documentation templates) |
||
Line 64: | Line 64: | ||
}}.png }} | }}.png }} | ||
}}[[File:{{#lvar:filename}}|link=|{{{3|28px}}}|{{#lvar:wording}}]]{{#if:{{{nocat|}}}||{{Main only|[[Category:{{#lvar:wording}}]]}}}}</includeonly><noinclude> | }}[[File:{{#lvar:filename}}|link=|{{{3|28px}}}|{{#lvar:wording}}]]{{#if:{{{nocat|}}}||{{Main only|[[Category:{{#lvar:wording}}]]}}}}</includeonly><noinclude>{{Documentation|content= | ||
Displays a resistance icon. | |||
< | {{Template demo | ||
{{resistance|acid|vuln}} | | style = table | ||
{{resistance|cold|resist nm}} | | <nowiki>{{resistance|acid|vuln}}</nowiki> | ||
{{resistance|fire|resist m}} | | <nowiki>{{resistance|cold|resist nm}}</nowiki> | ||
{{resistance|force|resist full}} | | <nowiki>{{resistance|fire|resist m}}</nowiki> | ||
{{resistance|thunder|immune}} | | <nowiki>{{resistance|force|resist full}}</nowiki> | ||
{{resistance|piercing|immune nm}} | | <nowiki>{{resistance|thunder|immune}}</nowiki> | ||
{{resistance|slashing|immune nm plus}} | | <nowiki>{{resistance|piercing|immune nm}}</nowiki> | ||
</ | | <nowiki>{{resistance|slashing|immune nm plus}}</nowiki> | ||
}} | |||
Here are the "keys" for the resistance/vulnerability/immunity type: | Here are the "keys" for the resistance/vulnerability/immunity type: | ||
Line 98: | Line 91: | ||
You can also make the icon bigger like so: | You can also make the icon bigger like so: | ||
{{Template demo | |||
{{ | | style = table | ||
| <nowiki>{{resistance|acid|immune|40px}}</nowiki> | |||
}} | |||
This template also adds automatic [[:Category:Resistances|resistance categories]]. If you are using this template on a non-creature page, please add {{InfoBlob|<nowiki>|nocat=1</nowiki>}} so that page doesn't get included in the respective resistance category. | This template also adds automatic [[:Category:Resistances|resistance categories]]. If you are using this template on a non-creature page, please add {{InfoBlob|<nowiki>|nocat=1</nowiki>}} so that page doesn't get included in the respective resistance category. | ||
Line 144: | Line 135: | ||
"format": "inline" | "format": "inline" | ||
} | } | ||
</templatedata></noinclude> | </templatedata> | ||
}} | |||
[[Category:Templates]] | |||
</noinclude> |
Latest revision as of 21:40, 19 January 2025
Template documentation
Displays a resistance icon.
Markup | Renders as |
---|---|
{{resistance|acid|vuln}} | ![]() |
{{resistance|cold|resist nm}} | ![]() |
{{resistance|fire|resist m}} | ![]() |
{{resistance|force|resist full}} | ![]() |
{{resistance|thunder|immune}} | ![]() |
{{resistance|piercing|immune nm}} | ![]() |
{{resistance|slashing|immune nm plus}} | ![]() |
Here are the "keys" for the resistance/vulnerability/immunity type:
vuln
: Self-explanatoryresist nm
: Resistant to non-magicalresist m
: Resistant to magical onlyresist full
: Resistant to all (non-magical and magical)immune nm
: Immune to non-magicalimmune full
: Immune to all (non-magical and magical)immune nm plus
: Immune to non-magical and resistant to magical
The abbreviations "vuln", "resist", and "immune" can be written out in full as well, like "vulnerable", "vulnerability", "resistant", "resistance", or "immunity". The template will recognize all ways to write these words.
You can also make the icon bigger like so:
Markup | Renders as |
---|---|
{{resistance|acid|immune|40px}} | ![]() |
This template also adds automatic resistance categories. If you are using this template on a non-creature page, please add |nocat=1 so that page doesn't get included in the respective resistance category.
Template data
No description.
Parameter | Description | Type | Status | |
---|---|---|---|---|
type | 1 | The damage type | String | required |
resistance | 2 | How resistant?
| String | required |
size | 3 | Size of the icon.
| Number | optional |
nocat | nocat | If specified, does not insert categories. | Unknown | optional |