Template:ResourceHelper: Difference between revisions
Jump to navigation
Jump to search
HiddenDragon (talk | contribs) No edit summary |
(Added guards to try to prevent auto-categorization from applying when it shouldn't) |
||
(3 intermediate revisions by 2 users not shown) | |||
Line 10: | Line 10: | ||
| yes = | | yes = | ||
| #default = {{#switch: {{#lvar: type}} | | #default = {{#switch: {{#lvar: type}} | ||
| bonus = [[Category:Bonus actions]] | | bonus = {{Main namespace only|[[Category:Bonus actions]]}} | ||
| movement = [[Category:Movement-expending actions]] | | half movement | movement | movement m = {{Main namespace only|[[Category:Movement-expending actions]]}} | ||
| reaction = [[Category:Reactions]] | | reaction = {{Main namespace only|[[Category:Reactions]]}} | ||
| action = [[Category:Actions]] | | action = {{Main namespace only|[[Category:Actions]]}} | ||
| #default = | | #default = | ||
}}}}</includeonly><noinclude> | }}}}</includeonly><noinclude> | ||
Line 36: | Line 36: | ||
|{{ResourceHelper|ki:5|this is an example=yes}}||<pre>{{ResourceHelper|ki:5}}</pre> | |{{ResourceHelper|ki:5|this is an example=yes}}||<pre>{{ResourceHelper|ki:5}}</pre> | ||
|- | |- | ||
|{{ResourceHelper|movement:30|this is an example=yes}}||<pre>{{ResourceHelper|movement:30}}</pre> | |{{ResourceHelper|movement m:30|this is an example=yes}}||<pre>{{ResourceHelper|movement m:30}}</pre> | ||
|- | |- | ||
|} | |} | ||
</noinclude> | </noinclude> |
Latest revision as of 17:07, 2 October 2024
What is this?
This is a wrapper around Template:Resource to work better in conjunction with Module:ParseList specifically by Template:ResourceList.
Optional parameters like cost=3
do not work when applying a template to a list with ParseList, so this template enables an alternative syntax that can be used with ParseList.
Usage
{{ResourceHelper | <type>:[count]}}
<>
Denotes mandatory parameters, []
denotes optional parameters.
Refer to Template:Resource for a list of the handled resource types.
Examples
Output | Input |
---|---|
Ki Point | {{ResourceHelper|ki}} |
5Ki Points | {{ResourceHelper|ki:5}} |
30 m / 100 ftMovement | {{ResourceHelper|movement m:30}} |