Template:Spell info: Difference between revisions

From Campaigns
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
 
(45 intermediate revisions by the same user not shown)
Line 1: Line 1:
<templatestyles src="Spell info/style.css" />
<templatestyles src="Spell info/style.css" />
<includeonly>{{#if: {{{tooltip|}}}||[[File:{{{school}}}.png|right|400px]]}}
<includeonly>{{#if: {{{tooltip|}}}||[[File:{{{school}}}.png|right|400px]]}}
<div class="spellcard">
<div class="spellcard tooltip-{{{tooltip|false}}}">
{| class="spell"
{| class="spell"
{{#if: {{{tooltip|}}}||{{!}}+{{{name}}} {{#if: {{{concentration|}}}|[[File:concentration.svg|24px]]}}}}
{{#if: {{{tooltip|}}}||{{!}}+{{{name}}} {{#if: {{{concentration|}}}|[[File:concentration.svg|24px|Requires concentration]]}} {{#if: {{{ritual|}}}|[[File:ritual.svg|21px|May be cast as a ritual]]}}}}
!Level
!Level
!Casting time
!Casting time
Line 24: Line 24:
|BA=1 Bonus Action
|BA=1 Bonus Action
|A=1 Action
|A=1 Action
|{{{cast}}}}}
|R=1 Reaction *
|{{{cast}}}}} {{#if: {{{ritual|}}}|[[File:ritual.svg|12px|May be cast as a ritual]]}}
|{{{range}}}
|{{{range}}}
|{{#if: {{{verbal|}}}|V}}{{#if: {{{somatic|}}}|{{#if: {{{verbal|}}}|,<nowiki> </nowiki>}}S}}{{#if: {{{material|}}}|{{#if: {{{verbal|}}}{{{somatic|}}}|,<nowiki> </nowiki>}}M{{#if: {{{tooltip|}}}||*}}}}
|{{#if: {{{verbal|}}}|V}}{{#if: {{{somatic|}}}|{{#if: {{{verbal|}}}|,<nowiki> </nowiki>}}S}}{{#if: {{{material|}}}|{{#if: {{{verbal|}}}{{{somatic|}}}|,<nowiki> </nowiki>}}M {{#if: {{{trigger|}}}|<nowiki>**</nowiki>|<nowiki>*</nowiki>}}}}
|-
|-
!Duration
!Duration
Line 33: Line 34:
!Damage/Effect
!Damage/Effect
|-
|-
|{{#if: {{{concentration|}}}|[[File:concentration.svg|16px]]<nowiki> </nowiki>}}{{{duration}}}
|{{#if: {{{concentration|}}}|[[File:concentration.svg|16px|Requires concentration]]<nowiki> </nowiki>}}{{{duration}}}
|{{{school}}}
|{{ucfirst:{{{school}}}}}
|{{#switch: {{uc:{{{attack}}}}}
|{{#switch: {{uc:{{{attack}}}}}
|RANGED=[[File:ranged attack.svg|16px]] Ranged
|RANGED=[[File:ranged attack.svg|16px]] Ranged
Line 61: Line 62:
|THUNDER=[[File:thunder.svg|16px]] Thunder
|THUNDER=[[File:thunder.svg|16px]] Thunder
|}}{{#switch: {{uc:{{{effect}}}}}
|}}{{#switch: {{uc:{{{effect}}}}}
|PRONE=[[File:prone.svg|16px]] Prone
|BLIND={{blinded}}
|{{{effect|}}}}} {{#if: {{{additional|}}}|(...)}}
|BLINDED={{blinded}}
|CHARM={{charmed}}
|CHARMED={{charmed}}
|DEAF={{deafened}}
|DEAFENED={{deafened}}
|EXHAUSTED={{exhaustion}}
|EXHAUSTION={{exhaustion}}
|FEAR={{frightened}}
|FRIGHTEN={{frightened}}
|FRIGHTENED={{frightened}}
|GRAPPLE={{grappled}}
|GRAPPLED={{grappled}}
|INCAPACITATE={{incapacitated}}
|INCAP={{incapacitated}}
|INCAPACITATED={{incapacitated}}
|INVISIBILE={{invisible}}
|INVISIBILITY={{invisible}}
|PARALYZE={{paralyzed}}
|PARALYZED={{paralyzed}}
|PETRIFY={{petrified}}
|PETRIFIED={{petrified}}
|POISON={{poisoned}}
|POISONED={{poisoned}}
|PRONE={{prone}}
|RESTRAIN={{restrained}}
|RESTRAINED={{restrained}}
|STUN={{stunned}}
|STUNNED={{stunned}}
|SLEEP={{unconscious}}
|UNCONSCIOUS={{unconscious}}
|{{ucfirst:{{{effect|}}}}}}} {{#if: {{{additional|}}}|(...)}}
|}
|}
<hr>
<hr>
Line 68: Line 99:
{{{description}}}
{{{description}}}
</div>
</div>
{{#if: {{{tooltip|}}}||{{#if: {{{components|}}}|<span class="small">''* ({{{components}}})</span>}}
{{#if: {{{tooltip|}}}||{{#ifeq: {{uc:{{{cast}}}}}|R|<span class="small">''* {{{trigger}}}''</span>{{#if: {{{components|}}}|<br>}}}}{{#if: {{{components|}}}|<span class="small">''{{#if: {{{trigger|}}}|<nowiki>**</nowiki>|<nowiki>*</nowiki>}} ({{{components}}})</span>}}
<div class="spelllists"><span class="small">Available for:</span> <ul>{{{lists}}}</ul></div></div>}}
<div class="spelllists"><span class="small">Available for:</span> <ul>{{#if: {{{artificer|}}}|<li>Artificer</li>}}{{#if: {{{bard|}}}|<li>Bard</li>}}{{#if: {{{cleric|}}}|<li>Cleric</li>}}{{#if: {{{druid|}}}|<li>Druid</li>}}{{#if: {{{paladin|}}}|<li>Paladin</li>}}{{#if: {{{ranger|}}}|<li>Ranger</li>}}{{#if: {{{sorcerer|}}}|<li>Sorcerer</li>}}{{#if: {{{warlock|}}}|<li>Warlock</li>}}{{#if: {{{wizard|}}}|<li>Wizard</li>}}{{{lists|}}}</ul></div></div>}}
<br clear="both"></includeonly>
{{#if: {{{tooltip|}}}||<br clear="both">}}
<noinclude>{{documentation}}</noinclude>
{{#if: {{{nocat|}}}||
[[category:homebrew {{#ifeq: {{{level|}}}|0|cantrip|level {{{level}}}}} spells]]
[[category:homebrew {{lc:{{{school}}}}} spells]]
{{#if: {{{artificer|}}}|[[category:homebrew artificer spells]][[category:homebrew {{#ifeq: {{{level|}}}|0|cantrip|level {{{level}}}}} artificer spells]]}}
{{#if: {{{bard|}}}|[[category:homebrew bard spells]][[category:homebrew {{#ifeq: {{{level|}}}|0|cantrip|level {{{level}}}}} bard spells]]}}
{{#if: {{{cleric|}}}|[[category:homebrew cleric spells]][[category:homebrew {{#ifeq: {{{level|}}}|0|cantrip|level {{{level}}}}} cleric spells]]}}
{{#if: {{{druid|}}}|[[category:homebrew druid spells]][[category:homebrew {{#ifeq: {{{level|}}}|0|cantrip|level {{{level}}}}} druid spells]]}}
{{#if: {{{paladin|}}}|[[category:homebrew paladin spells]][[category:homebrew {{#ifeq: {{{level|}}}|0|cantrip|level {{{level}}}}} paladin spells]]}}
{{#if: {{{ranger|}}}|[[category:homebrew ranger spells]][[category:homebrew {{#ifeq: {{{level|}}}|0|cantrip|level {{{level}}}}} ranger spells]]}}
{{#if: {{{sorcerer|}}}|[[category:homebrew sorcerer spells]][[category:homebrew {{#ifeq: {{{level|}}}|0|cantrip|level {{{level}}}}} sorcerer spells]]}}
{{#if: {{{warlock|}}}|[[category:homebrew warlock spells]][[category:homebrew {{#ifeq: {{{level|}}}|0|cantrip|level {{{level}}}}} warlock spells]]}}
{{#if: {{{wizard|}}}|[[category:homebrew wizard spells]][[category:homebrew {{#ifeq: {{{level|}}}|0|cantrip|level {{{level}}}}} wizard spells]]}}
}}{{#ifeq: {{{name}}}|{{PAGENAME}}|{{#cargo_store:
_table = spells
|spell_name = {{{name}}}
|spell_level = {{{level}}}
|cast_time = {{#switch: {{uc:{{{cast}}}}}
|BA=1 Bonus Action
|A=1 Action
|R=1 Reaction
|{{{cast}}}}}
|reaction_trigger = {{{trigger|}}}
|is_ritual = {{#if: {{{ritual|}}}|yes|no}}
|spell_range = {{{range}}}
|has_verbal = {{#if: {{{verbal|}}}|yes|no}}
|has_somatic = {{#if: {{{somatic|}}}|yes|no}}
|has_material = {{#if: {{{material|}}}|yes|no}}
|material_components = {{{components|}}}
|spell_duration = {{{duration}}}
|requires_concentration = {{#if: {{{concentration|}}}|yes|no}}
|spell_school = {{ucfirst:{{{school}}}}}
|attack_type = {{ucfirst:{{{attack|}}}}}
|save_type = {{ucfirst:{{{save|}}}}}
|damage_type = {{ucfirst:{{{damage|}}}}}
|spell_effect = {{ucfirst:{{{effect|}}}}}
|additional_effects = {{#if: {{{additional|}}}|yes|no}}
|spell_description = {{{description}}}
|additional_spell_lists = {{{lists|}}}
|is_artificer_spell = {{#if: {{{artificer|}}}|yes|no}}
|is_bard_spell = {{#if: {{{bard|}}}|yes|no}}
|is_cleric_spell = {{#if: {{{cleric|}}}|yes|no}}
|is_druid_spell = {{#if: {{{druid|}}}|yes|no}}
|is_paladin_spell = {{#if: {{{paladin|}}}|yes|no}}
|is_ranger_spell = {{#if: {{{ranger|}}}|yes|no}}
|is_sorcerer_spell = {{#if: {{{sorcerer|}}}|yes|no}}
|is_warlock_spell = {{#if: {{{warlock|}}}|yes|no}}
|is_wizard_spell = {{#if: {{{wizard|}}}|yes|no}}
|source = {{{source|Unknown}}}
}}}}
</includeonly><noinclude>{{documentation}}
{{#cargo_declare:
_table = spells
|spell_name = String (mandatory)
|spell_level = Integer (mandatory;allowed values=0,1,2,3,4,5,6,7,8,9)
|cast_time = String (mandatory)
|reaction_trigger = String (dependent on=cast_time)
|is_ritual = Boolean (mandatory)
|spell_range = Wikitext string (mandatory)
|has_verbal = Boolean (mandatory)
|has_somatic = Boolean (mandatory)
|has_material = Boolean (mandatory)
|material_components = String (dependent on=has_material)
|spell_duration = String (mandatory)
|requires_concentration = Boolean (mandatory)
|spell_school = String (mandatory;allowed values=Abjuration,Conjuration,Divination,Enchantment,Evocation,Illusion,Necromancy,Transmutation)
|attack_type = String (allowed values=Melee,Ranged)
|save_type = String (allowed values=Strength,Constitution,Dexterity,Intelligence,Wisdom,Charisma)
|damage_type = String (allowed values=Bludgeoning,Piercing,Slashing,Acid,Cold,Fire,Force,Lightning,Necrotic,Poison,Psychic,Radiant,Thunder)
|spell_effect = String
|additional_effects = Boolean (mandatory)
|spell_description = Wikitext (mandatory)
|additional_spell_lists = String
|is_artificer_spell = Boolean (mandatory)
|is_bard_spell = Boolean (mandatory)
|is_cleric_spell = Boolean (mandatory)
|is_druid_spell = Boolean (mandatory)
|is_paladin_spell = Boolean (mandatory)
|is_ranger_spell = Boolean (mandatory)
|is_sorcerer_spell = Boolean (mandatory)
|is_warlock_spell = Boolean (mandatory)
|is_wizard_spell = Boolean (mandatory)
|source = String (mandatory)
}}
[[category:cargo templates]]
</noinclude>

Latest revision as of 12:39, 8 August 2025

Template documentation

Parameters

Creates a spell info table. if the nocat parameter is omitted, the page will automatically be categorized into categories for the spell level, spell school, and each class spell list.

Template parameters[Edit template data]

This template prefers block formatting of parameters.

ParameterDescriptionTypeStatus
spell namename

The name of the spell.

Example
True Strike
Stringrequired
spell levellevel

The level of the spell. Use 0 for cantrips.

Example
0
Numberrequired
cast timecast

Action or time required to cast the spell. You can use "BA" or "A" for Bonus Action or Action, and "R" for Reaction.

Example
BA
Stringrequired
reaction trigger conditiontrigger

The trigger to use for reaction spells.

Default
(omitted)
Example
Stringoptional
ritual flagritual

Whether the spell can be cast as a ritual (adding 10 minutes to the cast time in order to cast it without using a spell slot).

Default
(omitted)
Example
Stringoptional
spell rangerange

The range and area of the spell effect.

Example
30 ft
Stringrequired
verbal flagverbal

Whether the spell has a verbal component. Leave empty for false.

Default
(omitted)
Example
Stringoptional
somatic flagsomatic

Whether the spell has a somatic component. Leave empty for false.

Default
(omitted)
Example
true
Stringoptional
material flagmaterial

Whether the spell has material components. Leave empty for false.

Default
(omitted)
Example
Stringoptional
material componentscomponents

Material components for the spell. Should be included if material is set

Default
(omitted)
Example
Stringoptional
spell durationduration

How long the spell lasts.

Example
1 Round
Stringrequired
concentration requiredconcentration

Set to true if the spell requires concentration.

Default
(omitted)
Example
Stringoptional
spell schoolschool

The school of magic to which the spell belongs. Must be one of Abjuration, Conjuration, Divination, Enchantment, Evocation, Illusion, Necromancy, or Transmutation.

Example
Divination
Stringrequired
attack typeattack

The type of attack made with the spell. Must be one of Ranged or Melee.

Default
(the value of the save parameter)
Example
Stringoptional
save typesave

The saving throw made against the spell. Must be one of Strength, Constitution, Dexterity, Intelligence, Wisdom, or Charisma.

Default
None
Example
Stringoptional
damage typedamage

The type of damage dealt by the spell when it his or the target fails a save. Must be one of Bludgeoning, Piercing, Slashing, Acid, Cold, Fire, Force, Lightning, Necrotic, Poison, Psychic, Radiant, or Thunder.

Default
(the value of the effect parameter)
Example
Stringoptional
spell effecteffect

A category to place a non-damaging spell effect in. Required if damage parameter is omitted.

Example
Foreknowledge
Stringoptional
has additional spell effectsadditional

Set to true if the spell has additional damage types or effects beyond the first.

Default
(omitted)
Example
Stringoptional
spell descriptiondescription

The full text of the spell.

Example
You point a finger at a target in range. Your magic grants you a brief insight into the target's defenses. The next attack roll you make before the spell ends has advantage.
Stringrequired
spell listslists

The spell lists which contain the spell. Classes on this list will not be automatically categorized, but it can be used to add the spell to subclass lists.

Example
<li>Bard</li><li>Sorcerer</li><li>Warlock</li><li>Wizard</li>
Stringrequired
on artificer spell listartificer

Whether this spell is on the Artificer spell list.

Default
(omitted)
Example
Stringoptional
on bard spell listbard

Whether this spell is on the Bard spell list.

Default
(omitted)
Example
Stringoptional
on cleric spell listcleric

Whether this spell is on the Cleric spell list.

Default
(omitted)
Example
Stringoptional
on druid spell listdruid

Whether this spell is on the Druid spell list.

Default
(omitted)
Example
Stringoptional
on paladin spell listpaladin

Whether this spell is on the Paladin spell list.

Default
(omitted)
Example
Stringoptional
on ranger spell listranger

Whether this spell is on the Ranger spell list.

Default
(omitted)
Example
Stringoptional
on sorcerer spell listsorcerer

Whether this spell is on the Sorcerer spell list.

Default
(omitted)
Example
Stringoptional
on warlock spell listwarlock

Whether this spell is on the Warlock spell list.

Default
(omitted)
Example
Stringoptional
on wizard spell listwizard

Whether this spell is on the Wizard spell list.

Default
(omitted)
Example
Stringoptional
toggle tooltip versiontooltip

Whether the spell info block is being used in a tooltip.

Default
(omitted)
Example
Stringoptional
remove automatic categoriesnocat

Whether the template will automatically add certain categories to the page.

Default
(omitted)
Example
Stringoptional
source booksource

The third party / homebrew source which the spell comes from. Used for Cargo data purposes, and is not displayed.

Default
(omitted)
Example
The Crooked Moon
Stringoptional

Examples

{{spell info
|name=True Strike
|level=0
|cast=BA
|range=30 ft
|somatic=true
|duration=1 Round
|school=Divination
|effect=Foreknowledge
|description=You point a finger at a target in range. Your magic grants you a brief insight into the target's defenses. The next attack roll you make before the spell ends has advantage.
|bard=true
|sorcerer=true
|warlock=true
|wizard=true}}
True Strike
Level Casting time Range/Area Components
Cantrip 1 Bonus Action 30 ft S
Duration School Attack/Save Damage/Effect
1 Round Divination None Foreknowledge

You point a finger at a target in range. Your magic grants you a brief insight into the target's defenses. The next attack roll you make before the spell ends has advantage.

Available for:
  • Bard
  • Sorcerer
  • Warlock
  • Wizard


This template defines the table "spells". View table.