Template:Spell list table row: Difference between revisions

From bg3.wiki
Jump to navigation Jump to search
(Changed the way that range and aoe values are handled)
mNo edit summary
 
(50 intermediate revisions by 6 users not shown)
Line 1: Line 1:
<includeonly>
<includeonly>
<tr>
<tr>
  <td>{{#if: {{{image|}}}
<td>{{IconLink|{{{controller icon}}}|{{{spell}}}|{{{name}}}}}{{#if:{{{conc|}}}|{{Nbts}}{{Icon|Concentration Icon.png|20px|link=Concentration|caption=}}|}}{{#if:{{{ritual|}}}|{{Nbts}}{{Icon|Ritual_Spell_Icon.png|16px|link=Ritual Spells|caption=}}|}}</td>
  | [[File:{{{image}}}|frameless|upright=0.1|link=Acid Splash]]
<td style="text-align:right;">{{#switch:{{{level|}}}
  | [[File:{{{spell}}} Icon.png|frameless|upright=0.1|link={{{spell}}}]]
   | 0 = <span class="bg3wiki-help-tooltip" aria-label="Cantrip">C</span>
   }} [[{{{ spell }}}]] {{#ifeq: {{{const|}}} | required | {{SmallIcon|Concentration Icons.png|link=Concentration}} | }}</td>
  | #default = {{{level|}}}
  }}</td>
<td style="text-align:center;">{{#if:{{{upcastable|}}}|{{upcastable}} }}</td>
<td style="text-align: center; vertical-align: middle;">{{action icon|{{{ casttime|}}}}}</td>


  <td>{{{ casttime | {{Action}} }}}</td>
<td style="text-align: center; vertical-align: middle;">{{#if: {{{duration|}}} | {{SmallIcon|Duration Icons.png}}{{nbts}}{{#switch: {{{duration}}}
 
  <td>{{#if: {{{duration|}}} | {{SmallIcon|Duration Icons.png}}{{nbts}}{{#switch: {{{duration}}}
     | 1 = 1 turn
     | 1 = 1 turn
     | longrest = Until Long Rest
    | Until Long Rest
    | Long Rest
     | longrest = Long Rest
     | #default = {{{duration}}} turns
     | #default = {{{duration}}} turns
   }} | - }}</td>
   }} | <div style="text-align:center">-</div> }}</td>


  <td>{{SmallIcon|Range Icon.png}}{{nbts}}{{#switch: {{{range|{{!}}}}}
<td>{{SmallIcon|Range Icon.png}}{{nbts}}{{#switch: {{{range|{{!}}}}}
    | {{!}} = 1.5m / 5ft
     | self
     | self
     | Self = Self
     | Self = Self
    | melee
    | Melee
    | touch
    | Touch = 1.5 m / 5 ft
    | weapon
    | Weapon = Weapon Range
    | short ranged = 15 m / 50 ft
    | ranged = 18 m / 60 ft
     | #default = {{#explode: {{{range}}} |/|0 }}m / {{#explode: {{{range}}} |/|1 }}ft
     | #default = {{#explode: {{{range}}} |/|0 }}m / {{#explode: {{{range}}} |/|1 }}ft
   }} {{#if: {{{area|}}}
   }} {{#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) }}
     | <br>{{SmallIcon|Aoe Icon.png}}{{nbts}}{{#explode: {{{area}}} |/|0 }}m / {{#explode: {{{area}}} |/|1 }}ft {{#switch: {{lc:{{{aoe|{{!}}}}}}} | {{!}} | radius = (Radius) | cone = (Cone) | cube = (Cube) }}
     |  
     |  
   }}</td>
   }}</td>


  <td>{{#ifeq: {{{attack|yes}}} | no | | {{Attack Roll}} }}{{#if: {{{save|}}}
<td style="text-align: center; vertical-align: middle;">{{#ifeq: {{{attack|}}} | 1 | {{Attack Roll}} | {{#if:{{{save|}}}||<div style="text-align:center">-</div>}} }}
    | {{#ifeq: {{{attack|yes}}} | no | | <br> }} {{SavingThrow | {{{save}}} }}
{{#if: {{{save|}}}|<div>{{short saving throw | {{{save}}} }}</div> }}
    | {{#ifeq: {{{attack|yes}}} | no | - }} }}</td>
</td>
 
<td style="text-align: center; vertical-align: middle;">{{#if: {{{damage|}}}{{{damage type|}}} | {{DamageText|{{{damage}}}|{{{damage type}}} }}{{#if: {{{extra damage|}}}{{{extra damage type|}}} | <br>{{DamageText|{{{extra damage}}}|{{{extra damage type}}} }}}} | <div style="text-align:center">-</div> }}</td>


  <td>{{#if: {{{damage|}}} | {{DamageType|{{{damage}}} }} | - }}</td>
</tr>
</tr>
</includeonly>
</includeonly><noinclude>
 
<noinclude>
 
<pre>
{{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
}}
</pre>
Template to fill the rows of the Spell list table. It is intended to use inside wikitable with appropriate columns.
 
Example:
Example:
<pre>
<pre>
{| class=wikitable style="width: 100%;"
{{Spell list table row
! | Name
| controller icon=Flame Blade Icon.webp
! | Casting Time
| level=0
! | Duration
| spell=Flame Blade (Spell)
! | Range / Area
| name=Flame Blade
! | Attack / Save
! | Damage / Effect
|-
{{SpellListTableRow
| image=Acid Splash Icon 2.png
| spell=Acid Splash
| area=2/7
| area=2/7
| save=DEX
| save=DEX
| damage=Acid
| damage=2d6
| damage type=Acid
}}
}}
{{SpellListTableRow
{{Spell list table row
| spell=Blade Ward
| spell=Blade Ward
| controller icon=Blade Ward Icon.webp
| name=Blade Ward
| level=0
| casttime={{action}}
| casttime={{action}}
| duration=2
| duration=2
| range=self
| range=self
| const=required
| conc=required
| attack=no
| attack=no
}}
{{Spell list table row
| spell=Firebolt?
| controller icon=Fire Bolt Icon.webp
| name=Firebolt?
| level=0
| upcastable=yes
| casttime={{action}}
| duration=2
| range=self
| range=self
| ritual=true
| attack=no
}}
}}
|}
</pre>
</pre>


Result:
Result:


{| class=wikitable style="width: 100%;"
{{Spell list table row/header}}
! | Name
{{Spell list table row
! | Casting Time
| controller icon=Flame Blade Spell Icon.webp
! | Duration
| level=0
! | Range / Area
| spell=Flame Blade (Spell)
! | Attack / Save
| name=Flame Blade
! | Damage / Effect
|-
{{SpellListTableRow
| image=Acid Splash Icon 2.png
| spell=Acid Splash
| area=2/7
| area=2/7
| save=DEX
| save=DEX
| damage=Acid
| damage=2d6
| damage type=Acid
}}
}}
{{SpellListTableRow
{{Spell list table row
| spell=Blade Ward
| spell=Blade Ward
| controller icon=Blade Ward Icon.webp
| name=Blade Ward
| level=0
| casttime={{action}}
| casttime={{action}}
| duration=2
| duration=2
| range=self
| range=self
| const=required
| conc=required
| attack=no
| attack=no
}}
{{Spell list table row
| spell=Firebolt?
| controller icon=Fire Bolt Icon.webp
| name=Firebolt?
| level=0
| upcastable=y
| casttime={{action}}
| duration=2
| range=self
| range=self
| ritual=true
| attack=no
| damage=1d10
| damage type=Piercing
| extra damage=2d8
| extra damage type=Fire
}}
}}
|}
{{Spell list table row
| spell=Ensnaring Strike (Ranged)
| controller icon=Ensnaring Strike Ranged Icon.webp
| name=Ensnaring Strike
| level=1
| casttime={{action}}
| duration=10
| range=weapon
| save=Dexterity
| attack=yes
}}
{{Spell list table row/footer}}
 
== template data ==
<templatedata>
{
"params": {
"controller icon": {
"description": "File name of the spell's icon.",
"type": "string"
},
"spell": {
"description": "Name of the spell",
"required": true,
"type": "string"
},
"conc": {
"description": "If specified, marks spell as requiring concentration.",
"type": "boolean",
"suggestedvalues": [
"required"
]
},
"casttime": {
"description": "Casting time of the Spell",
"default": "{{Action}}",
"suggestedvalues": [
"{{Action|bonus}}",
"{{Action|reaction}}",
"{{Action}} +{{Action|bonus}}"
]
},
"duration": {
"description": " Duration of the spell.",
"suggestedvalues": [
"1",
"2",
"3",
"10",
"100",
"longrest"
]
},
"range": {
"description": "Range of the spell separated by \"/\".",
"example": "9/30 to get 9m/30ft.",
"default": "18/60",
"type": "string",
"suggestedvalues": [
"self",
"melee",
"touch",
"weapon",
"9/30"
]
},
"area": {
"description": "AoE range of the spell separated by \"/\".",
"type": "string"
},
"aoe": {
"description": "AoE type of the spell.",
"type": "string",
"suggestedvalues": [
"radius",
"cone",
"cube"
],
"default": "radius"
},
"attack": {
"description": "Does spell require an attack roll.",
"type": "string",
"suggestedvalues": [
"yes",
"no"
]
},
"save": {
"description": "Does spell require a saving throw against its DC.",
"suggestedvalues": [
"STR",
"DEX",
"CON",
"INT",
"WIS",
"CHA"
],
"type": "string"
},
"damage": {
"description": "Type of the damage dealt by the Spell.",
"suggestedvalues": [
"Slashing",
"Piercing",
"Bludgeoning",
"Cold",
"Fire",
"Acid",
"Lightning",
"Force",
"Poison",
"Thunder",
"Radiant",
"Necrotic",
"Psychic"
],
"type": "string"
},
"ritual": {
"description": "If specified, marks spell as ritual.",
"type": "boolean"
},
"level": {
"description": "The level of the spell.",
"suggestedvalues": [
"1",
"2",
"3",
"4",
"5",
"6",
"Cantrip"
]
},
"upcastable": {
"description": "If specified, adds the upcastable marker next to the level.",
"type": "boolean"
}
},
"description": "Template to fill the rows of the Spell list table. It is intended to use inside wikitable with appropriate columns.",
"paramOrder": [
"spell",
"level",
"upcastable",
"controller icon",
"conc",
"ritual",
"casttime",
"duration",
"range",
"area",
"aoe",
"attack",
"save",
"damage"
]
}
</templatedata>
</noinclude>
</noinclude>

Latest revision as of 15:59, 4 September 2024

Example:

{{Spell list table row
| controller icon=Flame Blade Icon.webp
| level=0
| spell=Flame Blade (Spell)
| name=Flame Blade
| area=2/7
| save=DEX
| damage=2d6
| damage type=Acid
}}
{{Spell list table row
| spell=Blade Ward
| controller icon=Blade Ward Icon.webp
| name=Blade Ward
| level=0
| casttime={{action}}
| duration=2
| range=self
| conc=required
| attack=no
}}
{{Spell list table row
| spell=Firebolt?
| controller icon=Fire Bolt Icon.webp
| name=Firebolt?
| level=0
| upcastable=yes
| casttime={{action}}
| duration=2
| range=self
| ritual=true
| attack=no
}}

Result:

Name Level Cast time Duration Range/Area Attack/Save Damage/Effect
Flame Blade Flame Blade C Action
-
 {{{range}}}m / ft
 2m / 7ft (Radius)
2d6Damage TypesAcid
Blade Ward Blade Ward C Action  2 turns  Self
-
-
Firebolt? Firebolt? C Action  2 turns  Self
-
1d10Damage TypesPiercing
2d8Damage TypesFire
Ensnaring Strike Ensnaring Strike 1 Action  10 turns  Weapon Range
-

template data

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

Template parameters

ParameterDescriptionTypeStatus
spellspell

Name of the spell

Stringrequired
levellevel

The level of the spell.

Suggested values
1 2 3 4 5 6 Cantrip
Unknownoptional
upcastableupcastable

If specified, adds the upcastable marker next to the level.

Booleanoptional
controller iconcontroller icon

File name of the spell's icon.

Stringoptional
concconc

If specified, marks spell as requiring concentration.

Suggested values
required
Booleanoptional
ritualritual

If specified, marks spell as ritual.

Booleanoptional
casttimecasttime

Casting time of the Spell

Suggested values
{{Action|bonus}} {{Action|reaction}} {{Action}} +{{Action|bonus}}
Default
{{Action}}
Unknownoptional
durationduration

Duration of the spell.

Suggested values
1 2 3 10 100 longrest
Unknownoptional
rangerange

Range of the spell separated by "/".

Suggested values
self melee touch weapon 9/30
Default
18/60
Example
9/30 to get 9m/30ft.
Stringoptional
areaarea

AoE range of the spell separated by "/".

Stringoptional
aoeaoe

AoE type of the spell.

Suggested values
radius cone cube
Default
radius
Stringoptional
attackattack

Does spell require an attack roll.

Suggested values
yes no
Stringoptional
savesave

Does spell require a saving throw against its DC.

Suggested values
STR DEX CON INT WIS CHA
Stringoptional
damagedamage

Type of the damage dealt by the Spell.

Suggested values
Slashing Piercing Bludgeoning Cold Fire Acid Lightning Force Poison Thunder Radiant Necrotic Psychic
Stringoptional