Template:Resource: Difference between revisions
(Test change: Removed surrounding <span/> so that mediawiki's auto-pluralization of links can apply) |
(Updated documentation) |
||
Line 179: | Line 179: | ||
| {{#lvar: type}} | | {{#lvar: type}} | ||
}}</includeonly><noinclude> | }}</includeonly><noinclude> | ||
Display action resources, including specific class resources, in a standardized and consistent format. This template is intended to be inline. | |||
Refer to the table below for all the supported resource types and their aliases. | |||
== | == Template data == | ||
< | ; Usage | ||
: {{c|<nowiki>{{Resource | <type> | [count] | [icononly] | [nameonly] | [forceplural]}}</nowiki>}} | |||
< | : {{c|< ... >}} denotes mandatory parameters and {{c|[ ... ]}} denotes optional parameters. | ||
<templatedata> | |||
{ | |||
"description": "Display an action resource with its accompanying icon.", | |||
"format": "inline", | |||
"params": { | |||
"1": { | |||
"label": "Type", | |||
"aliases": ["type"], | |||
"description": "The name of the resource. For shorter aliases for these options, refer to the full list on the template page.", | |||
"suggestedvalues": ["action", "bonus", "reaction", "movement", "movement m", "spell1", "spell2", "spell3", "spell4", "spell5", "spell6", "arcane recovery", "bardic inspiration", "channel divinity", "channel oath", "fnginf", "ki", "lay on hands", "luck point", "natural recovery", "rage", "shadowspell3", "sorcery", "superiority die", "tides of chaos", "war priest", "wild shape"], | |||
"type": "string", | |||
"required": true | |||
}, | |||
"2": { | |||
"label": "Count", | |||
"aliases": ["count"], | |||
"description": "The number of the specified resources consumed.", | |||
"default": "1", | |||
"type": "string", | |||
== | "required": false | ||
}, | |||
"nameonly": { | |||
"label": "Name only", | |||
"description": "Hide the resource icon leaving just the name of resource and the count.", | |||
"type": "boolean" | |||
}, | |||
"icononly": { | |||
"label": "Icon only", | |||
"description": "Hide the resource name leaving just the resource icon and the count.", | |||
"type": "boolean" | |||
}, | |||
"forceplural": { | |||
"label": "Force plural", | |||
"description": "Force the output use the plural form even when count is 1.", | |||
"type": "boolean" | |||
} | |||
} | |||
} | |||
</templatedata> | |||
== Supported resources == | |||
Below is a table of all the resource options this template accepts as well as their aliases. | |||
This should cover all the resources in the game. | |||
{| class="wikitable mw-collapsible" | {| class="wikitable mw-collapsible" | ||
|+ name parameter | |+ name parameter | ||
Line 320: | Line 342: | ||
| <nowiki>{{r|reaction}}s</nowiki> | | <nowiki>{{r|reaction}}s</nowiki> | ||
}} | }} | ||
[[Category:Templates]] | |||
[[Category:Icon templates]] | |||
</noinclude> | </noinclude> |
Revision as of 19:28, 20 December 2024
Display action resources, including specific class resources, in a standardized and consistent format. This template is intended to be inline.
Refer to the table below for all the supported resource types and their aliases.
Template data
- Usage
{{Resource | <type> | [count] | [icononly] | [nameonly] | [forceplural]}}
< ... >
denotes mandatory parameters and[ ... ]
denotes optional parameters.
Display an action resource with its accompanying icon.
Parameter | Description | Type | Status | |
---|---|---|---|---|
Type | 1 type | The name of the resource. For shorter aliases for these options, refer to the full list on the template page.
| String | required |
Count | 2 count | The number of the specified resources consumed.
| String | optional |
Name only | nameonly | Hide the resource icon leaving just the name of resource and the count. | Boolean | optional |
Icon only | icononly | Hide the resource name leaving just the resource icon and the count. | Boolean | optional |
Force plural | forceplural | Force the output use the plural form even when count is 1. | Boolean | optional |
Supported resources
Below is a table of all the resource options this template accepts as well as their aliases. This should cover all the resources in the game.
Resource | Input |
---|---|
![]() |
action
|
![]() |
bonus, bonus action, ba
|
![]() |
reaction
|
![]() |
movement (no value)
|
![]() |
movement m (value in meters)
|
![]() |
movement ft (value in feet)
|
![]() |
half movement
|
![]() |
ar, arcrec, arcane recovery
|
![]() |
bi, bardin, bardic inspiration
|
![]() |
cd, chadiv, channel divinity
|
![]() |
co, chaoat, channel oath
|
![]() |
fi, fnginf
|
![]() |
ki
|
![]() |
l1, s1, spell1, level1
|
![]() |
l2, s2, spell2, level2
|
![]() |
l3, s3, spell3, level3
|
![]() |
l4, s4, spell4, level4
|
![]() |
l5, s5, spell5, level5
|
![]() |
l6, s6, spell6, level6
|
![]() |
shadowspell3, ss3, shadowlevel3, sl3
|
![]() |
lh, layonh, lay on hands
|
![]() |
nr, natrec, natural recovery
|
![]() |
rg, rage
|
![]() |
sp, srcpnt, sorcery
|
![]() |
sd, supdie, superiority die
|
![]() |
wp, warpri, war priest
|
![]() |
ws, wldshp, wild shape
|
![]() |
toc, tides of chaos
|
![]() |
lp, lukpnt, luck point
|
Examples
Markup | Renders as |
---|---|
{{Resource | invalid}} | ![]() |
{{Resource}} | ![]() |
{{Resource | supdie}} | ![]() |
{{Resource | SuPdIe | 2}} | 2![]() |
{{Resource | supdie| forceplural=yes}} | ![]() |
{{Resource | ki | count = 200}} | 200![]() |
{{Resource | lh | icononly = yes}} | ![]() |
{{Resource | movement m | count = 1.5}} | ![]() ![]() |
Costs: {{Resource | ki | count = 2 | icononly = yes}} | Costs: 2![]() |
Costs: {{Resource | l2 | count = 2 | nameonly = yes}} | Costs: 2 Level 2 Spell Slots |
Recover half of your max {{Resource | ki | forceplural = yes}}, once per short rest. | Recover half of your max ![]() |
{{Resource | type = ar | 1 | forceplural = yes}} | ![]() |
{{Resource | type = shadowspell3 | 1 }} | ![]() |
{{Resource | type = eyestalk | 1 }} | ![]() |
{{r|reaction}}s | ![]() |