Template:Resource/doc
- {{r}}
Display action resources, including specific class resources, in a standardised and consistent format. This template is intended to be inline. It can:
- Handle multiple resources at once. The input is a comma separated list of resource names.
- Display in multiple formats suitable for inline usage or for compact table columns.
- Handle auto-categorisation for actions based on resource consumption via the
categories
function. This is not done implicitly so page generators must call this additional function.
This template is a simple wrapper around Module:Resource. Refer there for additional details.
Usage
- Usage
{{Resource | <list of resources> | [icon only] | [force plural] | [show links]}}
< ... >
denotes mandatory parameters and[ ... ]
denotes optional parameters.- The first parameter is a list of resource names (see below) separated by commas. Each resource can have an optional count associated with it separated by a
:
.
- Legacy usage
{{Resource | <type> | [count] | [icononly] | [nameonly] | [forceplural]}}
< ... >
denotes mandatory parameters and[ ... ]
denotes optional parameters.- This old form can only display one resource rather than a list of resources.
Refer to the table below for all the supported resource types and their aliases.
Supported resources
Below is a table of all the resource options this template accepts as well as their aliases.
This should cover all in-game-visible resources. There are additional hidden resources like SneakAttack_Charge
not covered by this template.
Resource | Name and aliases |
---|---|
Actions | action |
Bonus Actions | bonus , ba , bonus action |
Reactions | reaction |
Movement Speed | movement , movement m , m |
Movement Speed (Half cost) | half movement , 1/2 movement |
Level 1 Spell Slots | spell1 , s1 , level1 , l1 |
Level 2 Spell Slots | spell2 , s2 , level2 , l2 |
Level 3 Spell Slots | spell3 , s3 , level3 , l3 |
Level 4 Spell Slots | spell4 , s4 , level4 , l4 |
Level 5 Spell Slots | spell5 , s5 , level5 , l5 |
Level 6 Spell Slots | spell6 , s6 , level6 , l6 |
Level 3 Shadow Spell Slots | shadowspell3 , shadow spell , ss3 , shadowlevel3 , sl3 |
Warlock Spell Slots | wspell , wsp |
Arcane Arrows | arcarr , aa , arcane arrow |
Arcane Recovery Charges | arcrec , ar , arcane recovery |
Bardic Inspirations | bi , bardin , bardic inspiration |
Bladesong Power | bladesong , bs , bsp , bladesong power |
Channel Divinity Charges | cd , chadiv , channel divinity |
Channel Oath Charges | co , oath , chao , chaoat , channel oath |
Cosmic Omens | cos , cosmic , omen , cosmic omen |
Eyestalk actions | es , eyestalk , eyestalk action |
Fungal Infestation Charges | fi , fnginf , fungal infestation |
Ki Points | ki |
Lay on Hands Charges | loh , lh , layonh , lay on hands |
Luck Points | luck , lp , lukpnt , luck point |
Natural Recovery Charges | natrec , nr , natural recovery |
Rage Charges | rage , rg |
Sorcery Points | sp , srcpnt , sorcery , sorcery point |
Star Maps | starmap , sm , star map |
Superiority Dice | supdie , sd , superiority die |
Tides of Chaos Charges | toc , tides , tides of chaos |
Writhing Currents | wc , writhing , writhing current |
Wild Shape Charges | ws , wldshp , wildshape , wild shape |
War Priest Charges | wp , warpri , war priest |
Examples
Example | Markup | Renders as |
---|---|---|
Basic usage | {{ Resource | action}} | Action |
Compact alias | {{r|bonus}} | Bonus Action |
Optional count specified | {{Resource | ki:3 }} | Ki Points | 3
Multiple resources | {{Resource | action, bonus, spell1}} | Action + Bonus Action + Level 1 Spell Slot |
Movement speed | {{Resource | bonus, m:3 }} | Bonus Action + 3 m / 10 ft Movement Speed |
Icons only | {{Resource | action, bonus, spell1 | icons only = yes}} | + + |
Show links | {{Resource | action, sp:2 | show links = yes}} | Action + 2 Sorcery Points |
Adjusted icon sizes | {{Resource | action, spell1 | icon size = 25}} | Action + Level 1 Spell Slot |
Legacy examples
Markup | Renders as |
---|---|
{{Resource | invalid}} | Unknown |
{{Resource}} | Unknown |
{{Resource | supdie}} | Superiority Die |
{{Resource | SuPdIe | 2}} | Superiority Dice | 2
{{Resource | supdie| forceplural=yes}} | Superiority Dice |
{{Resource | ki | count = 200}} | Ki Points | 200
{{Resource | lh | icononly = yes}} | |
{{Resource | movement m | count = 1.5}} | 1.5 m / 5 ft Movement Speed |
Costs: {{Resource | ki | count = 2 | icononly = yes}} | Costs: 2 |
Costs: {{Resource | l2 | count = 2 | nameonly = yes}} | Costs: Level 2 Spell Slots | 2
Recover half of your max {{Resource | ki | forceplural = yes}}, once per short rest. | Recover half of your max Ki Points, once per short rest. |
{{Resource | type = ar | 1 | forceplural = yes}} | Arcane Recovery Charges |
{{Resource | type = shadowspell3 | 1 }} | Level 3 Shadow Spell Slot |
{{Resource | type = eyestalk | 1 }} | Eyestalk action |
{{r|reaction}}s | Reactions |
Template data
Display an action resource with its accompanying icon.
Parameter | Description | Type | Status | |
---|---|---|---|---|
Type | 1 type | A name of a resource or comma-separated list of resources. For shorter aliases for these options, refer to the full list on the template page. An optional count parameter for each resource can be specified after a ":" separator.
| String | required |
Count | 2 count | The number of the specified resources consumed. This is a deprecated parameter and only works for singular resources rather than lists of resources.
| String | deprecated |
Show links | show links | Show links to the relevant pages for the resources. | Boolean | optional |
Icons only | icons only icononly | Hide the resource name leaving just the resource icon and the count. The name will still be shown in a hover-over tooltip. | Boolean | optional |
Force plural | force plural forceplural | Force the output use the plural form even when count is 1. | Boolean | optional |