Template:DamageModifier: Difference between revisions

From bg3.wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
<includeonly>{{#switch:{{{1|}}}
<includeonly>{{#switch: {{trim | {{{1|}}} }}
| melee = + [[Damage Roll#Modifiers|Strength Modifier]]
| melee = + [[Damage Roll#Modifiers|Strength Modifier]]
| ranged = + [[Damage Roll#Modifiers|Dexterity Modifier]]
| ranged = + [[Damage Roll#Modifiers|Dexterity Modifier]]

Revision as of 03:17, 29 July 2023

The keywords melee, ranged, and finesse can be used to print the corresponding modifier(s) with a link to the Damage Roll page that explains the details:

Usage: {{DamageModifier|melee}}

Result: + Strength Modifier

Usage: {{DamageModifier|ranged}}

Result: + Dexterity Modifier

Usage: {{DamageModifier|finesse}}

Result: + Strength or Dexterity Modifier

Usage: {{DamageModifier|spell}}

Result: + Spellcasting Modifier

Anything that's not one of the specially recognized keywords will just have the word "Modifier" appended:

Usage: {{DamageModifier|Wisdom}}

Result: + Wisdom Modifier

If the parameter is completely empty however, then nothing will be printed:

Usage: {{DamageModifier|}}

Result:

(That makes it easier to use in other templates, where a modifier might be optional.)