Template:Feature box: Difference between revisions

From bg3.wiki
Jump to navigation Jump to search
(Query extra description as well)
(Added cost override field)
 
(8 intermediate revisions by 2 users not shown)
Line 4: Line 4:
   image,
   image,
   controller_icon,
   controller_icon,
   action_type,
   hit_cost,
   damage,
   damage,
   damage_type,
   damage_type,
Line 24: Line 24:
   aoe_size = area,
   aoe_size = area,
   recharge,
   recharge,
   CONCAT("{{{item|}}}")=item
   CONCAT("{{{item|{{{weapon|}}}}}}")=weapon,
  {{#if: {{{cost|}}} | CONCAT("{{{cost|}}}")=cost | cost }},
  <!-- The character-str, etc. variables are set by {{Template:Infobox character}} and allow feature
  boxes included on character pages to use specific ability score values by default -->
  CONCAT("{{{str| {{#var: character-str}} }}}")=str,
  CONCAT("{{{dex| {{#var: character-dex}} }}}")=dex,
  CONCAT("{{{con| {{#var: character-con}} }}}")=con,
  CONCAT("{{{wis| {{#var: character-wis}} }}}")=wis,
  CONCAT("{{{int| {{#var: character-int}} }}}")=int,
  CONCAT("{{{cha| {{#var: character-cha}} }}}")=cha,
  CONCAT("{{{level| {{#var: character-level}} }}}")=level,
  CONCAT("{{{casting ability| {{#var: character-casting-ability}} }}}")=casting_ability,
| where = _pageName = "{{#replace: {{{link|{{{name|{{{1}}}}}}}}} | " | \" }}"
| where = _pageName = "{{#replace: {{{link|{{{name|{{{1}}}}}}}}} | " | \" }}"
| format = template
| format = template
| template = Feature box/format
| template = Feature box/format
| named args = yes
| named args = yes
| limit = 1
| order by = _ID
| more results text=
| default = [[{{{1}}}]][[Category:Pages with unknown abilities]]
| default = [[{{{1}}}]][[Category:Pages with unknown abilities]]
}}</includeonly><noinclude>
}}</includeonly><noinclude>{{Documentation|content=
Creates a box to display a creature's special abilities, attacks, and spells. It is intended for use on creature pages, rather than being pages of their own.  
Creates a box to display a creature's special abilities, attacks, and spells. It is intended for use on creature pages, rather than being pages of their own.  


You can use it with any weapon action, spell, or class action.
You can use it with any weapon action, spell, or class action.
For a more compact, less detailed template, see {{t link|Spell action}}.


== Examples ==
== Examples ==
Line 46: Line 62:
| <nowiki>{{Feature box|Hellflame Cleave|item=Hellfire Greataxe}}</nowiki>
| <nowiki>{{Feature box|Hellflame Cleave|item=Hellfire Greataxe}}</nowiki>
| caption 4 = Example with many damage parameters
| caption 4 = Example with many damage parameters
| <nowiki>{{Feature box|Multiattack (Water Elemental)}}</nowiki>
| <nowiki>{{Feature box|Multiattack (Water Elemental)|str=18}}</nowiki>
}}
}}


==Template data==
==Template data==
[[Category:Templates]]
<templatedata>
<templatedata>
{
{
    "description": "Display a box containing information about a feature such as a spell or weapon action",
"params": {
"params": {
"1": {
"1": {
"description": "The content of the feature box.",
            "label": "Ability name",
"type": "content",
            "aliases": ["link", "name"],
"description": "The name of the ability to display in the feature box.",
"type": "wiki-page-name",
"required": true
"required": true
},
        "cost": {
            "label": "Cost override",
"description": "Override the cost of an action. This is a comma separated list of resources. See Template:ResourceList for details.",
"type": "string",
"required": false
},
        "weapon": {
            "label": "Weapon name",
            "aliases": ["item"],
"description": "The weapon this ability is performed with. Specifying this replaces generic 'Normal weapon damage' text with specific values for that weapon.",
"type": "string",
"required": false
},
        "str": {
            "label": "Strength score",
"description": "The strength score used for this ability. Specifying this replaces any 'Strength modifier' text with the specific value.",
"type": "number",
"required": false
},
        "dex": {
            "label": "Dexterity score",
"description": "The dexterity score used for this ability. Specifying this replaces any 'Dexterity modifier' text with the specific value.",
"type": "number",
"required": false
},
        "con": {
            "label": "Constitution score",
"description": "The constitution score used for this ability. Specifying this replaces any 'Constitution modifier' text with the specific value.",
"type": "number",
"required": false
},
        "wis": {
            "label": "Wisdom score",
"description": "The wisdom score used for this ability. Specifying this replaces any 'Wisdom modifier' text with the specific value.",
"type": "number",
"required": false
},
        "int": {
            "label": "Intelligence score",
"description": "The intelligence score used for this ability. Specifying this replaces any 'Intelligence modifier' text with the specific value.",
"type": "number",
"required": false
},
        "cha": {
            "label": "Charisma score",
"description": "The charisma score used for this ability. Specifying this replaces any 'Charisma modifier' text with the specific value.",
"type": "number",
"required": false
},
        "casting ability": {
            "label": "Casting ability",
"description": "The casting ability used. Specifying this replaces any 'Spellcasting modifier' text with the specific value. The corresponding ability score should also be specified.",
"type": "string",
"required": false
},
        "level": {
            "label": "Character level",
"description": "The level of the character using this ability. Specifying this replaces any 'Proficiency bonus' text with the specific value.",
"type": "number",
"required": false
}
}
},
}
"paramOrder": [
"1"
]
}
}
</templatedata></noinclude>
</templatedata>
}}
[[Category:Templates]]
</noinclude>

Latest revision as of 01:37, 12 February 2025

Template documentation

Creates a box to display a creature's special abilities, attacks, and spells. It is intended for use on creature pages, rather than being pages of their own.

You can use it with any weapon action, spell, or class action.

For a more compact, less detailed template, see {{Spell action}}.

Examples

Spell example.

Markup
{{Feature box|Hypnotic Pattern}}
Renders as
Hypnotic Pattern.webp
Hypnotic Pattern Hypnotic Pattern (+ )

Hypnotise Hypnotise creatures that can see the pattern. They cannot attack you. They cannot move nor act.

This spell can be cast while you are Silenced Silenced.

WIS Save
 Range: 18 m / 60 ft
AoE: 9 m / 30 ft (Radius)

Class action example.

Markup
{{Feature box|Multiattack (Spaw)}}
Renders as
Multiattack Earth Elemental.webp
Multiattack Multiattack ()
Damage: 8~64 + modifiers

Aim multiple attacks at a target.

 Melee: 1.5 m / 5  ft

Weapon action example.

Markup
{{Feature box|Hellflame Cleave|item=Hellfire Greataxe}}
Renders as
Hellflame Cleave.webp
Hellflame Cleave Hellflame Cleave ()   –  Hellfire Greataxe
Damage: 6~32 + modifiers
D12 Slashing.pngD6 Fire.pngD6 Fire.png
+ 1d6Damage TypesFire
+ 2d6Damage TypesFire

Spew hellish flames and strike your foes.

DEX Save
AoE: 3 m / 10 ft (Cone)
Recharge: Short rest

Example with many damage parameters

Markup
{{Feature box|Multiattack (Water Elemental)|str=18}}
Renders as
Multiattack Water Elemental.webp
Multiattack Multiattack ()
Damage: 16~40
D4 Bludgeoning.pngD4 Cold.pngD4 Bludgeoning.pngD4 Cold.png
+ 2d4Damage TypesCold
+ 2d4 + 4Damage TypesBludgeoning
+ 2d4Damage TypesCold

Descend on a creature to buffet it with your hardy aqueous fists.

Chilled Chilled targets take double damage.

 Melee: 1.5 m / 5  ft
Recharge: Per turn

Template data

Display a box containing information about a feature such as a spell or weapon action

Template parameters

ParameterDescriptionTypeStatus
Ability name1 link name

The name of the ability to display in the feature box.

Page namerequired
Cost overridecost

Override the cost of an action. This is a comma separated list of resources. See Template:ResourceList for details.

Stringoptional
Weapon nameweapon item

The weapon this ability is performed with. Specifying this replaces generic 'Normal weapon damage' text with specific values for that weapon.

Stringoptional
Strength scorestr

The strength score used for this ability. Specifying this replaces any 'Strength modifier' text with the specific value.

Numberoptional
Dexterity scoredex

The dexterity score used for this ability. Specifying this replaces any 'Dexterity modifier' text with the specific value.

Numberoptional
Constitution scorecon

The constitution score used for this ability. Specifying this replaces any 'Constitution modifier' text with the specific value.

Numberoptional
Wisdom scorewis

The wisdom score used for this ability. Specifying this replaces any 'Wisdom modifier' text with the specific value.

Numberoptional
Intelligence scoreint

The intelligence score used for this ability. Specifying this replaces any 'Intelligence modifier' text with the specific value.

Numberoptional
Charisma scorecha

The charisma score used for this ability. Specifying this replaces any 'Charisma modifier' text with the specific value.

Numberoptional
Casting abilitycasting ability

The casting ability used. Specifying this replaces any 'Spellcasting modifier' text with the specific value. The corresponding ability score should also be specified.

Stringoptional
Character levellevel

The level of the character using this ability. Specifying this replaces any 'Proficiency bonus' text with the specific value.

Numberoptional