Template:Resource: Difference between revisions

From bg3.wiki
Jump to navigation Jump to search
mNo edit summary
(Use new arcane resource image file)
 
(22 intermediate revisions by 2 users not shown)
Line 33: Line 33:
{{#lvardef: icon | Action Icon.png }}
{{#lvardef: icon | Action Icon.png }}


| bonus =
| bonus | ba | bonus action =
{{#lvardef: type | {{#if: {{{nameonly|}}}|Bonus action|[[Bonus action]]}}{{#ifexpr: {{#lvar: isplural}} > 0 |s}} }}
{{#lvardef: type | {{#if: {{{nameonly|}}}|Bonus action|[[Bonus action]]}}{{#ifexpr: {{#lvar: isplural}} > 0 |s}} }}
{{#lvardef: icon | Bonus Action Icon.png }}
{{#lvardef: icon | Bonus Action Icon.png }}
Line 74: Line 74:
{{#lvardef: icon | Superiority Die d8 Icon.png }}
{{#lvardef: icon | Superiority Die d8 Icon.png }}


| fi | fnginf =
| fi | fnginf | fungal infestation =
{{#lvardef: type |Fungal Infestation Charge{{#ifexpr: {{#lvar: isplural}} > 0 |s}} }}
{{#lvardef: type |Fungal Infestation Charge{{#ifexpr: {{#lvar: isplural}} > 0 |s}} }}
{{#lvardef: icon | Fungal Infestation Charge Icon.png }}
{{#lvardef: icon | Fungal Infestation Charge Icon.png }}
Line 82: Line 82:
{{#lvardef: icon | Monk Ki Icon.png }}
{{#lvardef: icon | Monk Ki Icon.png }}


| ws | wldshp | wild shape =
| ws | wldshp | wild shape | wildshape =
{{#lvardef: type | Wild Shape Charge{{#ifexpr: {{#lvar: isplural}} > 0 |s}} }}
{{#lvardef: type | Wild Shape Charge{{#ifexpr: {{#lvar: isplural}} > 0 |s}} }}
{{#lvardef: icon | Wild Shape Charges Icon.png
{{#lvardef: icon | Wild Shape Charges Icon.png
Line 151: Line 151:
{{#lvardef: icon | Tides of Chaos Resource Icon.png }}
{{#lvardef: icon | Tides of Chaos Resource Icon.png }}


| lp | lukpnt | luck point =
| lp | luck | lukpnt | luck point =
{{#lvardef: type | Luck Point{{#ifexpr: {{#lvar: isplural}} > 0 |s}} }}
{{#lvardef: type | Luck Point{{#ifexpr: {{#lvar: isplural}} > 0 |s}} }}
{{#lvardef: icon | Luck Point Resource Icon.png }}
{{#lvardef: icon | Luck Point Resource Icon.png }}
Line 162: Line 162:
{{#lvardef: type | Level 3 Shadow Spell Slot{{#ifexpr: {{#lvar: isplural}} > 0 |s}} }}
{{#lvardef: type | Level 3 Shadow Spell Slot{{#ifexpr: {{#lvar: isplural}} > 0 |s}} }}
{{#lvardef: icon | Shadow Spell Slot Icon.png }}
{{#lvardef: icon | Shadow Spell Slot Icon.png }}
| arcane arrow | arcarr | aa =
{{#lvardef: type | Arcane Arrow{{#ifexpr: {{#lvar: isplural}} > 0 |s}} }}
{{#lvardef: icon | Arcane Arrow Resource Icon.png }} <!-- TODO: Update this icon when patch releases -->
| bladesong power | bladesong | bsp =
{{#lvardef: type | Bladesong Power}}
{{#lvardef: icon | Bladesong Resource Icon.png }} <!-- TODO: Update this icon when patch releases -->
| cosmic omen | cosmic | cos =
{{#lvardef: type | Cosmic Omen{{#ifexpr: {{#lvar: isplural}} > 0 |s}} }}
{{#lvardef: icon | Cosmic Omen Resource Icon.png }}
| star map | starmap | sm =
{{#lvardef: type | Star Map{{#ifexpr: {{#lvar: isplural}} > 0 |s}} }}
{{#lvardef: icon | Star Map Resource Icon.png }}
| writhing current | writhing | wc =
{{#lvardef: type | Writhing Current{{#ifexpr: {{#lvar: isplural}} > 0 |s}} }}
{{#lvardef: icon | Writhing Current Resource Icon.png }}


| #default =
| #default =
[[Category:Pages with unknown resources]]
{{Main namespace only|[[Category:Pages with unknown resources]]}}


<!-- end switch -->
<!-- end switch -->
Line 170: Line 190:


<!-- end trim (variable definitions) -->
<!-- end trim (variable definitions) -->
}}<span class="bg3wiki-resource-template">{{#ifexpr: {{#lvar: isplural}} > 0
}}{{#ifexpr: {{#lvar: isplural}} > 0
| {{#if: {{{forceplural|}}} | | {{#lvar: count}} }}
| {{#if: {{{forceplural|}}} | | {{#lvar: count}} }}
}}{{#if: {{{nameonly|}}}
}}{{#if: {{{nameonly|}}}
Line 177: Line 197:
}}{{#if: {{{icononly|}}}
}}{{#if: {{{icononly|}}}
| <!-- blank -->
| <!-- blank -->
| {{#lvar: type}}
| {{nbts}}{{#lvar: type}}
}}</span></includeonly><noinclude>
}}</includeonly><noinclude>{{Documentation}}
==What is this?==
[[Category:Templates]]
This is a template for a quicker and more standardized manner of typing out the class-specific resource. This template is intended to be ''inline''.
[[Category:Icon templates]]
 
[[Category:Link templates]]
If there are any missing resources, don't hesitate to contribute!
==Usage==
<pre>{{Resource | <type> | [count] | [icononly] | [nameonly] | [forceplural]}}</pre>
----
<br/><code><></code> Denotes mandatory parameters.
* <code>type</code>
** See below for a table of what you can input here.
** <code>type =</code> is optional; you may just type the type name as long as its the first parameter.
*** <code>type = supdie</code> is the same as <code>supdie</code>, AS LONG AS THEY ARE IN THE FIRST PARAMETER.
<br/>
----
<br/><code>[]</code> Denotes optional parameters.
* <code>count</code>
** The number of resources.
** Any number above 2 will be shown to the left of the icon, otherwise it will be hidden. (See [[#Examples|Examples]])
* <code>icononly</code>
** Show the icon only, leaving the count there as well.
** Can be used to just quickly get the icon without the text.
* <code>nameonly</code>
** Show the name only, leaving the count there as well.
** Can be used to just quickly get the icon without the text.
* <code>forceplural</code>
** Forces the text to be plural, changing some of the words to their plural form
** The most obvious use of this is for Superiority Die (or Dices in plural).
==Quick reference==
{| class="wikitable mw-collapsible"
|+ name parameter
! Resource
! Input
|-
| {{Resource|action|forceplural=yes}}
| {{C|action}}
|-
| {{Resource|bonus|forceplural=yes}}
| {{C|bonus}}
|-
| {{Resource|reaction|forceplural=yes}}
| {{C|reaction}}
|-
| {{Resource|movement|forceplural=yes}}
| {{C|movement}} (no value)
|-
| {{Resource|movement m|forceplural=yes}}
| {{C|movement m}} (value in meters)
|-
| {{Resource|movement ft|forceplural=yes}}
| {{C|movement ft}} (value in feet)
|-
| {{Resource|half movement|forceplural=yes}}
| {{C|half movement}}
|-
|-
| {{Resource|ar|forceplural=yes}}
| {{C|ar, arcrec, arcane recovery}}
|-
| {{Resource|bi|forceplural=yes}}
| {{C|bi, bardin, bardic inspiration}}
|-
| {{Resource|cd|forceplural=yes}}
| {{C|cd, chadiv, channel divinity}}
|-
| {{Resource|co|forceplural=yes}}
| {{C|co, chaoat, channel oath}}
|-
| {{Resource|fi|forceplural=yes}}
| {{C|fi, fnginf}}
|-
| {{Resource|ki|forceplural=yes}}
| {{C|ki}}
|-
| {{Resource|l1|forceplural=yes}}
| {{C|l1, s1, spell1, level1}}
|-
| {{Resource|l2|forceplural=yes}}
| {{C|l2, s2, spell2, level2}}
|-
| {{Resource|l3|forceplural=yes}}
| {{C|l3, s3, spell3, level3}}
|-
| {{Resource|l4|forceplural=yes}}
| {{C|l4, s4, spell4, level4}}
|-
| {{Resource|l5|forceplural=yes}}
| {{C|l5, s5, spell5, level5}}
|-
| {{Resource|l6|forceplural=yes}}
| {{C|l6, s6, spell6, level6}}
|-
| {{Resource|shadowlevel3|forceplural=yes}}
| {{C|shadowspell3, ss3, shadowlevel3, sl3}}
|-
| {{Resource|lh|forceplural=yes}}
| {{C|lh, layonh, lay on hands}}
|-
| {{Resource|nr|forceplural=yes}}
| {{C|nr, natrec, natural recovery}}
|-
| {{Resource|rg|forceplural=yes}}
| {{C|rg, rage}}
|-
| {{Resource|sp|forceplural=yes}}
| {{C|sp, srcpnt, sorcery}}
|-
| {{Resource|sd|forceplural=yes}}
| {{C|sd, supdie, superiority die}}
|-
| {{Resource|wp|forceplural=yes}}
| {{C|wp, warpri, war priest }}
|-
| {{Resource|ws|forceplural=yes}}
| {{C|ws, wldshp, wild shape}}
|-
| {{Resource|toc|forceplural=yes}}
| {{C|toc, tides of chaos}}
|-
| {{Resource|lp|forceplural=yes}}
| {{C|lp, lukpnt, luck point}}
|}
 
=Examples=
{| class="wikitable mw-collapsible"
! Output
! Input
|-
| {{Resource | invalid}}
| <pre>{{Resource | invalid}}</pre>
|-
| {{Resource}}
| <pre>{{Resource}}</pre>
|-
| {{Resource | supdie}}
| <pre>{{Resource | supdie}}</pre>
|-
| {{Resource | SuPdIe | 2}}
| <pre>{{Resource | SuPdIe | 2}}</pre>
|-
| {{Resource | supdie| forceplural=yes}}
| <pre>{{Resource | supdie| forceplural=yes}}</pre>
|-
| {{Resource | ki | count = 200}}
| <pre>{{Resource | ki | count = 200}}</pre>
|-
| {{Resource | lh | icononly = yes}}
| <pre>{{Resource | lh | icononly = yes}}</pre>
|-
| {{Resource | movement m | count = 1.5}}
| <pre>{{Resource | movement m | count = 1.5}}</pre>
|-
| Costs: {{Resource | ki | count = 2 | icononly = yes}}
| <pre>Costs: {{Resource | ki | count = 2 | icononly = yes}}</pre>
|-
| Restores: {{Resource | l2 | count = 2 | nameonly = yes}}
| <pre>Costs: {{Resource | l2 | count = 2 | nameonly = yes}}</pre>
|-
| Recover half of your max {{Resource | ki | forceplural = yes}}, once per short rest.
| <pre>Recover half of your max {{Resource | ki | forceplural = yes}}, once per short rest.</pre>
|-
| {{Resource | type = ar | 1 | forceplural = yes}}
| <pre>{{Resource | type = ar | 1 | forceplural = yes}}</pre>
|-
| {{Resource | type = shadowspell3 | 1 }}
| <pre>{{Resource | type = shadowspell3 | 1 }}</pre>
|-
| 1 {{Resource | type = eyestalk | 1 }}
| <pre>{{Resource | type = eyestalk | 1 }}</pre>
|}
</noinclude>
</noinclude>

Latest revision as of 18:54, 4 February 2025

Template documentation
Shortcut
  • {{r}}

Display action resources, including specific class resources, in a standardized and consistent format. This template is intended to be inline.

Usage
{{Resource | <type> | [count] | [icononly] | [nameonly] | [forceplural]}}
< ... > denotes mandatory parameters and [ ... ] denotes optional parameters.

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 the resources in the game.

name parameter
Resource Input
Actions action
Bonus actions bonus, bonus action, ba
Reactions reaction
Movement movement (no value)
Movement movement m (value in meters)
Movement movement ft (value in feet)
Movement (Half cost) half movement
 Arcane Arrows aa, arcarr, arcane arrow
 Arcane Recovery Charges ar, arcrec, arcane recovery
 Bardic Inspiration Charges bi, bardin, bardic inspiration
 Bladesong Power bsp, bladesong, bladesong power
 Channel Divinity Charges cd, chadiv, channel divinity
 Channel Oath Charges co, chaoat, channel oath
 Cosmic Omens cos, cosmic, cosmic omen
 Fungal Infestation Charges fi, fnginf, fungal infestation
 Ki Points ki
 Level 1 Spell Slots l1, s1, spell1, level1
 Level 2 Spell Slots l2, s2, spell2, level2
 Level 3 Spell Slots l3, s3, spell3, level3
 Level 4 Spell Slots l4, s4, spell4, level4
 Level 5 Spell Slots l5, s5, spell5, level5
 Level 6 Spell Slots l6, s6, spell6, level6
 Level 3 Shadow Spell Slots shadowspell3, ss3, shadowlevel3, sl3
 Lay on Hands Charges lh, layonh, lay on hands
 Natural Recovery Charges nr, natrec, natural recovery
 Rage Charges rg, rage
 Sorcery Points sp, srcpnt, sorcery
 Star Maps sm, star map, star maps
 Superiority Dice sd, supdie, superiority die
 War Priest Charges wp, warpri, war priest
 Wild Shape Charges ws, wldshp, wild shape, wildshape
 Tides of Chaos Charges toc, tides of chaos
 Luck Points lp, lukpnt, luck, luck point
 Writhing Currents wc, writhing, writhing current

Examples

Markup Renders as
{{Resource | invalid}}
 invalid
{{Resource}}
 UNDEFINED
{{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}}
{{Resource | movement m | count = 1.5}}
1.5 m / 5 ftMovement
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  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

The name of the resource. For shorter aliases for these options, refer to the full list on the template page.

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
Stringrequired
Count2 count

The number of the specified resources consumed.

Default
1
Stringoptional
Name onlynameonly

Hide the resource icon leaving just the name of resource and the count.

Booleanoptional
Icon onlyicononly

Hide the resource name leaving just the resource icon and the count.

Booleanoptional
Force pluralforceplural

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

Booleanoptional