Template:Resource

From bg3.wiki
Jump to navigation Jump to search
Template documentation
Shortcut
  • {{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.

List of resources
Resource Name and aliases
Actionsaction
Bonus Actionsbonus, ba, bonus action
Reactionsreaction
Movement Speedmovement, movement m, m
Movement Speed (Half cost)half movement, 1/2 movement
Level 1 Spell Slotsspell1, s1, level1, l1
Level 2 Spell Slotsspell2, s2, level2, l2
Level 3 Spell Slotsspell3, s3, level3, l3
Level 4 Spell Slotsspell4, s4, level4, l4
Level 5 Spell Slotsspell5, s5, level5, l5
Level 6 Spell Slotsspell6, s6, level6, l6
Level 3 Shadow Spell Slotsshadowspell3, shadow spell, ss3, shadowlevel3, sl3
Warlock Spell Slotswspell, wsp
Arcane Arrowsarcarr, aa, arcane arrow
Arcane Recovery Chargesarcrec, ar, arcane recovery
Bardic Inspirationsbi, bardin, bardic inspiration
Bladesong Powerbladesong, bs, bsp, bladesong power
Channel Divinity Chargescd, chadiv, channel divinity
Channel Oath Chargesco, oath, chao, chaoat, channel oath
Cosmic Omenscos, cosmic, omen, cosmic omen
Eyestalk actionses, eyestalk, eyestalk action
Fungal Infestation Chargesfi, fnginf, fungal infestation
Ki Pointski
Lay on Hands Chargesloh, lh, layonh, lay on hands
Luck Pointsluck, lp, lukpnt, luck point
Natural Recovery Chargesnatrec, nr, natural recovery
Rage Chargesrage, rg
Sorcery Pointssp, srcpnt, sorcery, sorcery point
Star Mapsstarmap, sm, star map
Superiority Dicesupdie, sd, superiority die
Tides of Chaos Chargestoc, tides, tides of chaos
Writhing Currentswc, writhing, writhing current
Wild Shape Chargesws, wldshp, wildshape, wild shape
War Priest Chargeswp, 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 }}
 3 Ki Points
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}}
Action + Bonus Action + Level 1 Spell Slot
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}}
 2 Superiority Dice
{{Resource | supdie| forceplural=yes}}
Superiority Dice
{{Resource | ki | count = 200}}
 200 Ki Points
{{Resource | lh | icononly = yes}}
Lay on Hands Charge
{{Resource | movement m | count = 1.5}}
 1.5 m / 5 ft Movement Speed
Costs: {{Resource | ki | count = 2 | icononly = yes}}
Costs: 2 Ki Point
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 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.

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Type1 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.

Suggested values
action bonus reaction movement movement m spell1 spell2 spell3 spell4 spell5 spell6 arcane arrow arcane recovery bardic inspiration bladesong power channel divinity channel oath cosmic omen fungal infestation ki lay on hands luck point natural recovery rage shadowspell3 sorcery star map superiority die tides of chaos war priest wild shape
Example
action, ki:2
Stringrequired
Count2 count

The number of the specified resources consumed. This is a deprecated parameter and only works for singular resources rather than lists of resources.

Default
1
Stringdeprecated
Show linksshow links

Show links to the relevant pages for the resources.

Booleanoptional
Icons onlyicons 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.

Booleanoptional
Force pluralforce plural forceplural

Force the output use the plural form even when count is 1.

Booleanoptional