Template:Resource: Difference between revisions
Jump to navigation
Jump to search
HiddenDragon (talk | contribs) No edit summary |
HiddenDragon (talk | contribs) No edit summary |
||
Line 6: | Line 6: | ||
{{#if: {{{forceplural|}}} | {{#ifeq: {{{forceplural|}}} | yes | {{#lvardef:isplural|1}} | {{#lvardef:isplural|0}}}}}} <!--there may be special cases where you want to have plural forms without a count (i.e. explanations)--> | {{#if: {{{forceplural|}}} | {{#ifeq: {{{forceplural|}}} | yes | {{#lvardef:isplural|1}} | {{#lvardef:isplural|0}}}}}} <!--there may be special cases where you want to have plural forms without a count (i.e. explanations)--> | ||
{{#switch: {{lc:{{#lvar: type}}}} <!-- lc is to make the input all lower case, so that case is not my biggest priority --> | {{#switch: {{lc:{{#lvar: type}}}} <!-- lc is to make the input all lower case, so that case is not my biggest priority --> | ||
| action = {{#lvardef: type|[[Action]]{{#ifexpr: {{#lvar: isplural}} > 0 |s}}}} {{#lvardef: icon|Action Icon.png}} | | action = {{#lvardef: type|{{#if: {{{nameonly|}}}|Action|[[Action]]}}{{#ifexpr: {{#lvar: isplural}} > 0 |s}}}} {{#lvardef: icon|Action Icon.png}} | ||
| bonus = {{#lvardef: type|[[Bonus action]]{{#ifexpr: {{#lvar: isplural}} > 0 |s}}}} {{#lvardef: icon|Bonus Action Icon.png}} | | bonus = {{#lvardef: type|{{#if: {{{nameonly|}}}|Bonus action|[[Bonus action]]}}{{#ifexpr: {{#lvar: isplural}} > 0 |s}}}} {{#lvardef: icon|Bonus Action Icon.png}} | ||
| reaction = {{#lvardef: type|[[Reaction]]{{#ifexpr: {{#lvar: isplural}} > 0 |s}}}} {{#lvardef: icon|Reaction Icon.png}} | | reaction = {{#lvardef: type|{{#if: {{{nameonly|}}}|Reaction|[[Reaction]]}}{{#ifexpr: {{#lvar: isplural}} > 0 |s}}}} {{#lvardef: icon|Reaction Icon.png}} | ||
| movement = {{#lvardef: type|[[Movement speed|Movement]]}} {{#lvardef: icon|Movement Speed Icon.png}} {{#if: {{{count|}}}| {{#lvardef: count| {{Distance/Transform|{{{count|}}}}}}}|{{#if: {{{2|}}} | {{#lvardef:count|{{Distance/Transform|{{{2|}}}}}}}}}}} | | movement = {{#lvardef: type|{{#if: {{{nameonly|}}}|Movement|[[Movement speed|Movement]]}}}} {{#lvardef: icon|Movement Speed Icon.png}} {{#if: {{{count|}}}| {{#lvardef: count| {{Distance/Transform|{{{count|}}}}}}}|{{#if: {{{2|}}} | {{#lvardef:count|{{Distance/Transform|{{{2|}}}}}}}}}}} | ||
| half movement = {{#lvardef: type|[[Movement speed|Movement]] (Half cost)}} {{#lvardef: icon|Movement Speed Icon.png}} | | half movement = {{#lvardef: type|{{#if: {{{nameonly|}}}|Movement (Half cost)|[[Movement speed|Movement]] (Half cost)}}}} {{#lvardef: icon|Movement Speed Icon.png}} | ||
| sd | supdie | superiority die = {{#lvardef: type|Superiority {{#ifexpr: {{#lvar: isplural}} > 0 |Dice|Die}}}} {{#lvardef: icon|Superiority Die d8 Icon.png}} | | sd | supdie | superiority die = {{#lvardef: type|Superiority {{#ifexpr: {{#lvar: isplural}} > 0 |Dice|Die}}}} {{#lvardef: icon|Superiority Die d8 Icon.png}} | ||
| fi | fnginf = {{#lvardef: type|Fungal Infestation Charge{{#ifexpr: {{#lvar: isplural}} > 0 |s}}}} {{#lvardef: icon|Fungal Infestation Charge Icon.png}} | | fi | fnginf = {{#lvardef: type|Fungal Infestation Charge{{#ifexpr: {{#lvar: isplural}} > 0 |s}}}} {{#lvardef: icon|Fungal Infestation Charge Icon.png}} |
Revision as of 10:48, 22 November 2023
What is this?
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.
If there are any missing resources, don't hesitate to contribute!
Usage
{{Resource | <type> | [count] | [icononly] | [nameonly] | [forceplural]}}
<>
Denotes mandatory parameters.
type
- See below for a table of what you can input here.
type =
is optional; you may just type the type name as long as its the first parameter.type = supdie
is the same assupdie
, AS LONG AS THEY ARE IN THE FIRST PARAMETER.
[]
Denotes optional parameters.
count
- The number of resources.
- Any number above 2 will be shown to the left of the icon, otherwise it will be hidden. (See Examples)
icononly
- Show the icon only, leaving the count there as well.
- Can be used to just quickly get the icon without the text.
nameonly
- Show the name only, leaving the count there as well.
- Can be used to just quickly get the icon without the text.
forceplural
- 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
Resource | Input |
---|---|
Actions | action
|
Bonus actions | bonus
|
Reactions | reaction
|
Movement | movement
|
Movement (Half cost) | half movement
|
Arcane Recovery Charges | ar, arcrec, arcane recovery
|
Bardic Inspiration Charges | bi, bardin, bardic inspriation
|
Channel Divinity Charges | cd, chadiv, channel divinity
|
Channel Oath Charges | co, chaoat, channel oath
|
Fungal Infestation Charges | fi, fnginf
|
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
|
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
|
Superiority Dice | sd, supdie, superiority die
|
War Priest Charges | wp, warpri, war priest
|
Wild Shape Charges | ws, wldshp, wild shape
|
Tides of Chaos Charges | toc, tides of chaos
|
Luck Points | lp, lukpnt, luck point
|
Examples
Output | Input |
---|---|
invalid | {{Resource | invalid}} |
UNDEFINED | {{Resource}} |
Superiority Die | {{Resource | supdie}} |
2Superiority Dice | {{Resource | SuPdIe | 2}} |
Superiority Dice | {{Resource | supdie| forceplural=yes}} |
200Ki Points | {{Resource | ki | count = 200}} |
{{Resource | lh | icononly = yes}} | |
1.5 m / 5 ftMovement | {{Resource | movement | count = 5}} |
Costs: 2 | Costs: {{Resource | ki | count = 2 | icononly = yes}} |
Restores: 2 Level 2 Spell Slots | Costs: {{Resource | l2 | count = 2 | nameonly = yes}} |
Recover half of your max Ki Points, once per short rest. | Recover half of your max {{Resource | ki | forceplural = yes}}, once per short rest. |
Arcane Recovery Charges | {{Resource | type = ar | 1 | forceplural = yes}} |