Template:DamageModifier: Difference between revisions

From bg3.wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 3: Line 3:
| ranged = + [[Damage Roll#Modifiers|Dexterity Modifier]]
| ranged = + [[Damage Roll#Modifiers|Dexterity Modifier]]
| finesse = + [[Damage Roll#Modifiers|Strength or Dexterity Modifier]]
| finesse = + [[Damage Roll#Modifiers|Strength or Dexterity Modifier]]
| {{#if:{{{1|}}}|+ {{{1}}}|}}
| {{#if:{{{1|}}}|+ [[{{{1}}} Modifier]]|}}
}}</includeonly><noinclude>
}}</includeonly><noinclude>
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: {{code|<nowiki>{{DamageModifier|melee}}</nowiki>}}
Usage: {{code|<nowiki>{{DamageModifier|melee}}</nowiki>}}


Line 17: Line 19:
Result: {{DamageModifier|finesse}}
Result: {{DamageModifier|finesse}}


Anything that's not one of the specially recognized keywords will be used verbatim:
Anything that's not one of the specially recognized keywords will create a link of the form {{code|<nowiki>[[<___> Modifier]]</nowiki>}}:


Usage: {{code|<nowiki>{{DamageModifier|[[Wisdom Modifier]]}}</nowiki>}}
Usage: {{code|<nowiki>{{DamageModifier|Wisdom}}</nowiki>}}


Result: {{DamageModifier|[[Wisdom Modifier]]}}
Result: {{DamageModifier|Wisdom}}


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

Revision as of 23:21, 1 February 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

Anything that's not one of the specially recognized keywords will create a link of the form [[<___> Modifier]]:

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.)