Template:AOE: Difference between revisions

From bg3.wiki
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 }}}}}{{nbts}}m / {{{ft|{{#expr: ({{{m|0}}} * 10 / 3) round 0 }}}}}{{nbts}}ft ({{#switch: {{lc: {{{1}}} }}
<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 = 17 }}</nowiki>
| <nowiki>{{AOE | cube | m = 5 | ft = }}</nowiki>
| <nowiki>{{AOE | line | m = 5}}</nowiki>}
| <nowiki>{{AOE | line | m = 5}}</nowiki>}
}}
}}


[[Category:Templates]]
== 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: 9 m / 30 ft (Radius)
{{AOE | cone | ft = 20 }}
AoE: 6 m / 20 ft (Cone)
{{AOE | cube | m = 5 | ft = }}
AoE: 5 m / 17 ft (Cube)
{{AOE | line | m = 5}}}
AoE: 5 m / 17 ft (Line)}

Template data

Display formatted information for an area of effect shape.

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Shape1

Shape of the area of effect.

Suggested values
radius cone cube line
Stringrequired
Metresm

Size of the area of effect in metres. Specifying the length in metres is preferred.

Numbersuggested
Feetft

Size of the area of effect in feet.

Numberoptional