Template:Spell list table row: Difference between revisions

From bg3.wiki
Jump to navigation Jump to search
mNo edit summary
(Changed the way that range and aoe values are handled)
Line 8: Line 8:
   <td>{{{ casttime | {{Action}} }}}</td>
   <td>{{{ casttime | {{Action}} }}}</td>


   <td>{{#if: {{{duration|}}} | {{ Duration|{{{duration}}} }} | Instant }}</td>
   <td>{{#if: {{{duration|}}} | {{SmallIcon|Duration Icons.png}}{{nbts}}{{#switch: {{{duration}}}
    | 1 = 1 turn
    | longrest = Until Long Rest
    | #default = {{{duration}}} turns
  }} | - }}</td>


   <td>{{{ range | {{range|melee}} }}} {{#if: {{{area|}}}
   <td>{{SmallIcon|Range Icon.png}}{{nbts}}{{#switch: {{{range|{{!}}}}}
     | <br>{{{ area }}}
    | {{!}} = 1.5m / 5ft
    | self
    | Self = Self
    | #default = {{#explode: {{{range}}} |/|0 }}m / {{#explode: {{{range}}} |/|1 }}ft
  }} {{#if: {{{area|}}}
     | <br>{{SmallIcon|Aoe Icon.png}}{{nbts}}{{#explode: {{{area}}} |/|0 }}m / {{#explode: {{{area}}} |/|1 }}ft {{#switch: {{{aoe}}} | {{{aoe}}} | radius = (Radius) | cone = (Cone) | cube = (Cube) }}
     |  
     |  
   }}</td>
   }}</td>
Line 19: Line 28:
     | {{#ifeq: {{{attack|yes}}} | no | - }} }}</td>
     | {{#ifeq: {{{attack|yes}}} | no | - }} }}</td>


   <td>{{{ effect | - }}}</td>
   <td>{{#if: {{{damage|}}} | {{DamageType|{{{damage}}} }} | - }}</td>
</tr>
</tr>
</includeonly>
</includeonly>
Line 30: Line 39:
| spell= -> Required, name of the spell
| spell= -> Required, name of the spell
| casttime= -> {{template:Action}} Default: {{Action}}
| casttime= -> {{template:Action}} Default: {{Action}}
| duration= -> Values is placed in {{Duration|<value>}} Default: Instant
| duration= -> Duration of the spell. Values: [any number, longrest]
| range= -> {{template:Range}} Default: melee
| range= -> Range of the spell separated by "/". Ex: 9/30 becomes 9m/30ft. Default: 1.5/5
| area= -> {{template:AOE}} Default: -
| area= -> AoE range of the spell separated by "/". Ex: 1.5/5 becomes 1.5m/5ft
| attack= -> yes or no Default: yes
| aoe= -> AoE type of the spell. Values: [radius, cone, cube]. Default: radius
| save= -> Does spell requires a saving throw against its DC, Values: DEX,STR,WIS etc. Default -
| attack= -> Does spell require an attack roll. Values: [yes, no]. Default: yes
| effect= -> {{template:DamageType}} Default: -
| save= -> Does spell require a saving throw against its DC, Values: DEX,STR,WIS etc.
| damage= -> Damage type
}}
}}
</pre>
</pre>
Line 53: Line 63:
| image=Acid Splash Icon 2.png
| image=Acid Splash Icon 2.png
| spell=Acid Splash
| spell=Acid Splash
| area={{AOE|radius|m=2|ft=7}}
| area=2/7
| save=DEX
| save=DEX
| effect={{DamageType|Acid}}
| damage=Acid
}}
}}
{{SpellListTableRow
{{SpellListTableRow
Line 61: Line 71:
| casttime={{action}}
| casttime={{action}}
| duration=2
| duration=2
| range={{Range|self}}
| range=self
| const=required
| const=required
| attack=no
| attack=no
| range=self
}}
}}
|}
|}
Line 81: Line 92:
| image=Acid Splash Icon 2.png
| image=Acid Splash Icon 2.png
| spell=Acid Splash
| spell=Acid Splash
| area={{AOE|radius|m=2|ft=7}}
| area=2/7
| save=DEX
| save=DEX
| effect={{DamageType|Acid}}
| damage=Acid
}}
}}
{{SpellListTableRow
{{SpellListTableRow
Line 89: Line 100:
| casttime={{action}}
| casttime={{action}}
| duration=2
| duration=2
| range={{Range|self}}
| range=self
| const=required
| const=required
| attack=no
| attack=no
| range=self
}}
}}
|}
|}
</noinclude>
</noinclude>

Revision as of 21:21, 13 July 2023



{{SpellListTableRow
| image= -> File name, auto-generated as "{{spell}} Icon.png" if not provided.
| spell= -> Required, name of the spell
| casttime= -> {{template:Action}} Default: {{Action}}
| duration= -> Duration of the spell. Values: [any number, longrest]
| range= -> Range of the spell separated by "/". Ex: 9/30 becomes 9m/30ft. Default: 1.5/5
| area= -> AoE range of the spell separated by "/". Ex: 1.5/5 becomes 1.5m/5ft
| aoe= -> AoE type of the spell. Values: [radius, cone, cube]. Default: radius
| attack= -> Does spell require an attack roll. Values: [yes, no]. Default: yes
| save= -> Does spell require a saving throw against its DC, Values: DEX,STR,WIS etc.
| damage= -> Damage type
}}

Template to fill the rows of the Spell list table. It is intended to use inside wikitable with appropriate columns.

Example:

{| class=wikitable style="width: 100%;"
! | Name
! | Casting Time
! | Duration
! | Range / Area
! | Attack / Save
! | Damage / Effect
|-
{{SpellListTableRow
| image=Acid Splash Icon 2.png
| spell=Acid Splash
| area=2/7
| save=DEX
| damage=Acid
}}
{{SpellListTableRow
| spell=Blade Ward
| casttime={{action}}
| duration=2
| range=self
| const=required
| attack=no
| range=self
}}
|}

Result:

Name Casting Time Duration Range / Area Attack / Save Damage / Effect
File:Acid Splash Icon 2.png Acid Splash Action -  1.5m / 5ft
 2m / 7ft (Radius)
Attack roll
Dexterity saving throw
Damage TypesAcid
Blade Ward Icon.png Blade Ward Concentration Action  2 turns  Self - -