Module:Resource/doc
Jump to navigation
Jump to search
This is the documentation page for Module:Resource
This module handles displaying resource costs. It can:
- Handle multiple resources at once. The input is a comma separated list of resource names.
- 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. - Display in multiple formats suitable for inline usage or for compact table columns.
End users should invoke this module through the wrapper template: {{Resource}}.
File tree
- Module:Resource
- Module:Resource/data: Defines all the resources and their associated icons, links, categories, etc.
- Module:Resource/doc: Documentation page
- Template:Resource: Wrapper template for end users
Parameters
Parameter | Meaning |
---|---|
Unnamed parameter | A comma separated list of resources with an optional count parameter separated by : List → Term | Term, Term |
force plural
|
Boolean flag to force icon names to always use their plural forms. Default is no. |
icons only
|
Boolean flag to show only the icon names. Full resource names are visible in hover-over tooltips. Default is no. |
show links
|
Boolean flag to make resource names into links to the appropriate pages. Default is no. |
icon size
|
Adjust the size of the resource icons. Default is 20 and for inline text, larger icons should not be used. |
Resource types
The available resource types are as follows:
Resource | Name and aliases |
---|---|
![]() | action |
![]() | bonus , ba , bonus action |
![]() | reaction |
![]() | movement , movement m , m |
![]() | half movement , 1/2 movement |
![]() | spell1 , s1 , level1 , l1 |
![]() | spell2 , s2 , level2 , l2 |
![]() | spell3 , s3 , level3 , l3 |
![]() | spell4 , s4 , level4 , l4 |
![]() | spell5 , s5 , level5 , l5 |
![]() | spell6 , s6 , level6 , l6 |
![]() | shadowspell3 , shadow spell , ss3 , shadowlevel3 , sl3 |
![]() | wspell , wsp |
![]() | arcarr , aa , arcane arrow |
![]() | arcrec , ar , arcane recovery |
![]() | bi , bardin , bardic inspiration |
![]() | bladesong , bs , bsp , bladesong power |
![]() | cd , chadiv , channel divinity |
![]() | co , oath , chao , chaoat , channel oath |
![]() | cos , cosmic , omen , cosmic omen |
![]() | es , eyestalk , eyestalk action |
![]() | fi , fnginf , fungal infestation |
![]() | ki |
![]() | loh , lh , layonh , lay on hands |
![]() | luck , lp , lukpnt , luck point |
![]() | natrec , nr , natural recovery |
![]() | rage , rg |
![]() | sp , srcpnt , sorcery , sorcery point |
![]() | starmap , sm , star map |
![]() | supdie , sd , superiority die |
![]() | toc , tides , tides of chaos |
![]() | wc , writhing , writhing current |
![]() | ws , wldshp , wildshape , wild shape |
![]() | wp , warpri , war priest |
Examples
Example | Markup | Renders as |
---|---|---|
Basic usage | {{#invoke: Resource | main | action}} | ![]() |
Optional count specified | {{#invoke: Resource | main | ki:3 }} | ![]() |
Multiple resources | {{#invoke: Resource | main | action, bonus, spell1}} | ![]() ![]() ![]() |
Movement speed | {{#invoke: Resource | main | bonus, m:3 }} | ![]() ![]() |
Icons only | {{#invoke: Resource | main | action, bonus, spell1 | icons only = yes }} | ![]() ![]() ![]() |