Template:ResourceList: Difference between revisions
Jump to navigation
Jump to search
(Template to nicely handle resource cost for actions with multiple costs) |
m (Use {{Template demo}}) |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
<includeonly> | <includeonly>{{#invoke: ParseList | ||
| main | | main | ||
| {{{1}}} | | {{{1}}} | ||
| useTemplate = | | useTemplate = ResourceHelper | ||
| | | textDelim = <nowiki> + </nowiki> | ||
}}</includeonly><noinclude> | }}</includeonly><noinclude> | ||
=What is this?= | =What is this?= | ||
Line 14: | Line 10: | ||
This is intended for use in [[Template:Action_Page]] and similar. | This is intended for use in [[Template:Action_Page]] and similar. | ||
=Usage= | =Usage= | ||
<pre>{{ResourceList | [count] <type> | <pre>{{ResourceList | <type>:[count] [, <type>:[count]]}}</pre> | ||
---- | ---- | ||
<br/><code><></code> Denotes mandatory parameters, <code>[]</code> denotes optional parameters. | <br/><code><></code> Denotes mandatory parameters, <code>[]</code> denotes optional parameters. | ||
Line 21: | Line 17: | ||
=Examples= | =Examples= | ||
{| | {{Template demo | ||
| style=table | |||
|<nowiki>{{ResourceList|bonus, movement m:9}}</nowiki> | |||
|<nowiki>{{ResourceList|action, ki:3}}</nowiki> | |||
|<nowiki>{{ResourceList|action, bonus, level1}}</nowiki> | |||
}} | |||
</noinclude> | </noinclude> |
Latest revision as of 17:27, 2 October 2024
What is this?
This is a wrapper around Template:Resource that produces a formatted total resource cost from a list costs.
This is intended for use in Template:Action_Page and similar.
Usage
{{ResourceList | <type>:[count] [, <type>:[count]]}}
<>
Denotes mandatory parameters, []
denotes optional parameters.
Refer to Template:Resource for a list of the handled resource types.
Examples
Markup | Renders as |
---|---|
{{ResourceList|bonus, movement m:9}} | Bonus action + 9 m / 30 ftMovement |
{{ResourceList|action, ki:3}} | Action + 3Ki Points |
{{ResourceList|action, bonus, level1}} | Action + Bonus action + Level 1 Spell Slot |