Template:Feature box: Difference between revisions

From bg3.wiki
Jump to navigation Jump to search
(Create)
 
(Added cost override field)
 
(24 intermediate revisions by 5 users not shown)
Line 1: Line 1:
<includeonly>{{TooltipBox|{{SAI|{{{name}}}|w=40}}|image={{{image name|{{{name}}}.webp}}}|w=100|
<includeonly>{{#cargo_query: tables = spells
{{{content}}}
| fields = _pageName = link,
}}</includeonly><noinclude>
  name,
Creates a box to display enemy features such as special abilities and attacks. It is intended for use on creature pages, rather than being pages of their own. For player features, use [[Template:ActionPage]].
  image,
  controller_icon,
  hit_cost,
  damage,
  damage_type,
  damage_modifier,
  extra_damage,
  extra_damage_type,
  extra_damage_modifier,
  extra_damage_2,
  extra_damage_type_2,
  extra_damage_modifier_2,
  extra_damage_3,
  extra_damage_type_3,
  extra_damage_modifier_3,
  description,
  extra_description,
  save,
  spell_range = range,
  aoe,
  aoe_size = area,
  recharge,
  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}}}}}}}}} | " | \" }}"
| format = template
| template = Feature box/format
| named args = yes
| limit = 1
| order by = _ID
| more results text=
| default = [[{{{1}}}]][[Category:Pages with unknown abilities]]
}}</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.  


The icon uses the [[Template:SAI|SAI]] template. If no image name is provided, the template will attempt to use {{c|NAME.webp}} as the righthand-side image.
You can use it with any weapon action, spell, or class action.


Example:
For a more compact, less detailed template, see {{t link|Spell action}}.
{{Feature box
 
|name=Strengthened Shillelagh
== Examples ==
|image name=Strengthened Shillelagh.webp
 
|content=* The Dryad's [[Quarterstaff|staff]] or [[club]] deals {{DamageText|4d8|Bludgeoning}} damage, and uses your [[Ability Score Modifier|Spellcasting Ability]] for {{Attack Roll}}s.
{{Template demo
| style = list
| caption 1 = Spell example.
| <nowiki>{{Feature box|Hypnotic Pattern}}</nowiki>
| caption 2 = Class action example.
| <nowiki>{{Feature box|Multiattack (Spaw)}}</nowiki>
| caption 3 = Weapon action example.
| <nowiki>{{Feature box|Hellflame Cleave|item=Hellfire Greataxe}}</nowiki>
| caption 4 = Example with many damage parameters
| <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": {
"name": {
"1": {
"description": "The name of the ability. ",
            "label": "Ability name",
            "aliases": ["link", "name"],
"description": "The name of the ability to display in the feature box.",
"type": "wiki-page-name",
"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",
"type": "string",
"required": true
"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
},
},
"content": {
        "casting ability": {
"description": "The description.",
            "label": "Casting ability",
"type": "content",
"description": "The casting ability used. Specifying this replaces any 'Spellcasting modifier' text with the specific value. The corresponding ability score should also be specified.",
"required": true
"type": "string",
"required": false
},
},
"image name": {
        "level": {
"description": "An override for the image to use on the right-hand side.",
            "label": "Character level",
"default": "{{{name}}}.webp"
"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": [
"name",
"image name",
"content"
]
}
}
</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