Template:Feature box: Difference between revisions
(Create) |
(Added cost override field) |
||
(24 intermediate revisions by 5 users not shown) | |||
Line 1: | Line 1: | ||
<includeonly>{{ | <includeonly>{{#cargo_query: tables = spells | ||
{{{ | | fields = _pageName = link, | ||
}}</includeonly><noinclude> | name, | ||
Creates a box to display | 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. | |||
You can use it with any weapon action, spell, or class action. | |||
For a more compact, less detailed template, see {{t link|Spell action}}. | |||
{{Feature box | |||
| | == Examples == | ||
| | |||
| | {{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== | ||
<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": | "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": { | |||
"description": "The | "label": "Casting ability", | ||
"type": " | "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": | "type": "string", | ||
"required": false | |||
}, | }, | ||
"level": { | |||
"description": " | "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 | |||
} | } | ||
} | } | ||
} | } | ||
</templatedata></noinclude> | </templatedata> | ||
}} | |||
[[Category:Templates]] | |||
</noinclude> |
Latest revision as of 01:37, 12 February 2025
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
Class action example.
Markup{{Feature box|Multiattack (Spaw)}}Renders as
Weapon action example.
Markup{{Feature box|Hellflame Cleave|item=Hellfire Greataxe}}Renders as
Example with many damage parameters
Markup{{Feature box|Multiattack (Water Elemental)|str=18}}Renders as
Template data
Display a box containing information about a feature such as a spell or weapon action
Parameter | Description | Type | Status | |
---|---|---|---|---|
Ability name | 1 link name | The name of the ability to display in the feature box. | Page name | required |
Cost override | cost | Override the cost of an action. This is a comma separated list of resources. See Template:ResourceList for details. | String | optional |
Weapon name | weapon item | The weapon this ability is performed with. Specifying this replaces generic 'Normal weapon damage' text with specific values for that weapon. | String | optional |
Strength score | str | The strength score used for this ability. Specifying this replaces any 'Strength modifier' text with the specific value. | Number | optional |
Dexterity score | dex | The dexterity score used for this ability. Specifying this replaces any 'Dexterity modifier' text with the specific value. | Number | optional |
Constitution score | con | The constitution score used for this ability. Specifying this replaces any 'Constitution modifier' text with the specific value. | Number | optional |
Wisdom score | wis | The wisdom score used for this ability. Specifying this replaces any 'Wisdom modifier' text with the specific value. | Number | optional |
Intelligence score | int | The intelligence score used for this ability. Specifying this replaces any 'Intelligence modifier' text with the specific value. | Number | optional |
Charisma score | cha | The charisma score used for this ability. Specifying this replaces any 'Charisma modifier' text with the specific value. | Number | optional |
Casting ability | casting ability | The casting ability used. Specifying this replaces any 'Spellcasting modifier' text with the specific value. The corresponding ability score should also be specified. | String | optional |
Character level | level | The level of the character using this ability. Specifying this replaces any 'Proficiency bonus' text with the specific value. | Number | optional |