Template:AOE: Difference between revisions
Jump to navigation
Jump to search
(Template no longer requires both m and ft parameters. If provided with just one, it will make the conversion itself.) |
(Improved behaviour when only ft or m is specified) |
||
Line 1: | Line 1: | ||
<includeonly>{{SmallIcon|Aoe Icon.png}} AoE: {{{m|{{#expr: ({{{ft|0}}} * 3 / 10) round 0 | <includeonly>{{SmallIcon|Aoe Icon.png}} AoE: {{#if:{{{m|}}}|{{{m|}}}|{{#expr: ({{{ft|0}}} * 3 / 10) round 0 }}}}{{nbts}}m / {{#if:{{{ft|}}}|{{{ft|}}}|{{#expr: ({{{m|0}}} * 10 / 3) round 0 }}}}{{nbts}}ft ({{#switch: {{lc: {{{1}}} }} | ||
| radius | Radius | sphere | Sphere | circle | Circle = Radius | | radius | Radius | sphere | Sphere | circle | Circle = Radius | ||
| cone | Cone = Cone | | cone | Cone = Cone | ||
Line 13: | Line 13: | ||
| <nowiki>{{AOE | radius | m = 9 | ft = 30 }}</nowiki> | | <nowiki>{{AOE | radius | m = 9 | ft = 30 }}</nowiki> | ||
| <nowiki>{{AOE | cone | ft = 20 }}</nowiki> | | <nowiki>{{AOE | cone | ft = 20 }}</nowiki> | ||
| <nowiki>{{AOE | cube | m = 5 | ft = | | <nowiki>{{AOE | cube | m = 5 | ft = }}</nowiki> | ||
| <nowiki>{{AOE | line | m = 5}}</nowiki>} | | <nowiki>{{AOE | line | m = 5}}</nowiki>} | ||
}} | }} | ||
== Template data == | == Template data == | ||
<templatedata> | <templatedata> | ||
{ | { | ||
"description": "Display formatted information for an area of effect shape.", | |||
"format": "inline", | |||
"params": { | "params": { | ||
"1": { | "1": { | ||
"label": "Shape", | "label": "Shape", | ||
"description": "Shape of the area of effect.", | |||
"suggestedvalues": [ | "suggestedvalues": [ | ||
"radius", | "radius", | ||
Line 35: | Line 37: | ||
"m": { | "m": { | ||
"label": "Metres", | "label": "Metres", | ||
"description": "Size of the area of effect in metres. Specifying the length in metres is preferred.", | |||
"required": false, | "required": false, | ||
"suggested": true, | |||
"type": "number" | "type": "number" | ||
}, | }, | ||
"ft": { | "ft": { | ||
"label": "Feet", | "label": "Feet", | ||
"description": "Size of the area of effect in feet.", | |||
"required": false, | "required": false, | ||
"type": "number" | "type": "number" | ||
Line 45: | Line 50: | ||
} | } | ||
} | } | ||
</templatedata> | </templatedata>}} | ||
}}</noinclude> | [[Category:Templates]] | ||
</noinclude> |
Latest revision as of 20:01, 21 July 2024
Template documentation
Show a descriptor for an area-of-effect. The size can be specified in either feet or metres.
Examples
Markup | Renders as |
---|---|
{{AOE | radius | m = 9 | ft = 30 }} | ![]() |
{{AOE | cone | ft = 20 }} | ![]() |
{{AOE | cube | m = 5 | ft = }} | ![]() |
{{AOE | line | m = 5}}} | ![]() |
Template data
Display formatted information for an area of effect shape.
Parameter | Description | Type | Status | |
---|---|---|---|---|
Shape | 1 | Shape of the area of effect.
| String | required |
Metres | m | Size of the area of effect in metres. Specifying the length in metres is preferred. | Number | suggested |
Feet | ft | Size of the area of effect in feet. | Number | optional |