Module:Damage display/doc
This is the documentation page for Module:Damage display
This module renders damage information in a format designed to replicate the in-game view.
End users may invoke this module through the wrapper templates:
- {{Damage display}} - For the full feature set of the module
- {{Damage inline}} - For an inline-only version with simplified syntax and features
Parameters
Parameter | Meaning |
---|---|
format
|
Format of the damage display, either list (default), nosummary to hide the header, or inline for a compact inline display.
|
damage n
|
The damage string in the simple format
Expr → Term + Expr | Term Example: |
damage n type
|
The type of the damage which may be any of the damage types in the game or one of the special values: weapon (for damage type that is inherited from the weapon), Physical (for an unspecified physical damage type), or Healing (for healing which is displayed separately from damage).
|
damage n info
|
Free-form field for adding additional information about a damage instance. For example, "per ray " for Scorching Ray damage, "if the target is a Fiend or Undead " for extra Divine Smite damage, or "delayed " for Melf's Acid Arrow damage.
|
damage n modifier
|
The modifier added to the damage. It may be a specific ability score such as |
str |
Strength ability score used for evaluating modifiers |
dex |
Dexterity ability score used for evaluating modifiers |
con |
Constitution ability score used for evaluating modifiers |
int |
Intelligence ability score used for evaluating modifiers |
wis |
Wisdom ability score used for evaluating modifiers |
cha |
Charisma ability score used for evaluating modifiers |
casting ability |
The ability score used for casting. Determines how to evaluate the spell special modifier value.
|
weapon |
Specify the weapon used in order to evaluate generic "Normal weapon damage" values. |
dice size |
Specify the size of the dice images. Setting it to 0 removes them entirely. |
level |
Specify the level which is needed to evaluate "Proficiency bonus" damage modifiers. |
Examples
Example | Markup | Renders as |
---|---|---|
Unspecified ability scores |
{{#invoke: Damage display | main | damage 1 = 1d6 + 2 + finesse mod | damage 1 type = Piercing | damage 2 = 1d6 | damage 2 type = Fire }} | ![]() ![]() 1d6 + 2 + Strength or Dexterity modifier + 1d6 |
Specified ability scores |
{{#invoke: Damage display | main | damage 1 = 1d6 + 2 + finesse mod | damage 1 type = Piercing | damage 2 = 1d6 | damage 2 type = Fire | damage 3 = 2d8 | damage 3 type = Radiant | str = 9 | dex = 17 }} | ![]() ![]() ![]() 1d6 + 5 + 1d6 + 2d8 |
Specified casting ability |
{{#invoke: Damage display | main | damage 1 = 1d10 + spell + spell | damage 1 type = Force | damage 2 = 1d10 + spell + spell | damage 2 type = Force | damage 3 = 1d10 + spell + spell | damage 3 type = Force | wis = 10 | int = 8 | cha = 17 | casting ability = cha }} | ![]() ![]() ![]() 1d10 + 6 + 1d10 + 6 + 1d10 + 6 |
Unspecified weapon |
{{#invoke: Damage display | main | damage 1 = weapon | damage 2 = 1d6 | damage 2 type = Necrotic }} | ![]() Normal weapon damage + 1d6 |
Specified weapon |
{{#invoke: Damage display | main | damage 1 = weapon | damage 2 = 1d6 | damage 2 type = Necrotic | weapon = Spear +1 }} | ![]() ![]() 1d6 + 1 + Strength modifier + 1d6 |
Specified weapon and abilities |
{{#invoke: Damage display | main | damage 1 = weapon | damage 2 = 1d6 | damage 2 type = Necrotic | weapon = Spear +1 | str = 17 | dex = 12 }} | ![]() ![]() 1d6 + 4 + 1d6 |
Healing |
{{#invoke: Damage display | main | damage 1 = 1d6 + wis | damage 1 type = Healing | wis = 19 }} | ![]() 1d6 + 4 |
Proficiency bonus |
{{#invoke: Damage display | main | damage 1 = 1d12 + 2 | damage 1 type = Slashing | damage 2 = prof | damage 2 type = Radiant }} | ![]() 1d12 + 2 |
Proficiency bonus w/ level |
{{#invoke: Damage display | main | damage 1 = 1d12 + 2 | damage 1 type = Slashing | damage 2 = prof | damage 2 type = Radiant | level = 8 }} | ![]() 1d12 + 2 + 3 |
Info field |
{{#invoke: Damage display | main | damage 1 = 2d4 | damage 1 type = Acid | damage 1 info = Delayed | damage 2 = 2d8 | damage 2 type = Radiant | damage 2 info = If the target is a Fiend or Undead | damage 3 = 2d6 | damage 3 type = Fire | damage 3 info = per ray | damage 4 = 1d6 | damage 4 type = Piercing | damage 4 info = to self }} | ![]() ![]() ![]() ![]() 2d4 (Delayed) + 2d8 (If the target is a Fiend or Undead) + 2d6 (per ray) + 1d6 (to self) |
Freeform damage input |
{{#invoke: Damage display | main | damage 1 = (Sorcerer level)/2 | damage 1 type = Lightning | damage 2 = 5 + 2 x (Cleric level) | damage 2 type = Necrotic }} | (Sorcerer level)/2 + 5 + 2 x (Cleric level) |
Big dice |
{{#invoke: Damage display | main | damage 1 = 1d12 | damage 1 type = Cold | damage 2 = 1d10 | damage 2 type = Lightning | damage 3 = 2d8 | damage 3 type = Psychic | damage 4 = 1d4 | damage 4 type = Force | damage 5 = 2d6 | damage 5 type = Bludgeoning | dice size = 45 }} | ![]() ![]() ![]() ![]() ![]() 1d12 + 1d10 + 2d8 + 1d4 + 2d6 |
No dice |
{{#invoke: Damage display | main | damage 1 = 1d12 + 2 | damage 1 type = Slashing | damage 2 = 1d6 | damage 2 type = Poison | dice size = 0 }} | 1d12 + 2 + 1d6 |
Inline output |
This format can be used inline: {{#invoke: Damage display | main | format = inline | damage 1 = 1d12 + 2 | damage 1 type = Slashing | damage 2 = 1d6 | damage 2 type = Poison }}. It is simple and compact. | This format can be used inline: 1d12 + 2 + 1d6 . It is simple and compact. |
No summary |
{{#invoke: Damage display | main | format = nosummary | damage 1 = 1d12 + 2 | damage 1 type = Slashing | damage 2 = 1d6 | damage 2 type = Poison }} | ![]() ![]() 1d12 + 2 + 1d6 |