Statblocks

A built-in code-block handler renders D&D 5e creature statblocks. The schema matches the Fantasy Statblocks Obsidian plugin.

A worked example

Goblin

Small humanoid (goblinoid) neutral evil

Armor Class 15 (leather armor, shield)

Hit Points 7 (2d6)

Speed 30 ft.

STR
8 (-1)
DEX
14 (+2)
CON
10 (+0)
INT
10 (+0)
WIS
8 (-1)
CHA
8 (-1)

Saving Throws Dex +5

Skills Stealth +6

Senses darkvision 60 ft., passive Perception 9

Languages Common, Goblin

Challenge 1/4

Nimble Escape. The goblin can take the Disengage or Hide action as a bonus action on each of its turns.

Actions

Scimitar. Melee Weapon Attack: +4 to hit, reach 5 ft., one target. Hit: slashing damage.

Shortbow. Ranged Weapon Attack: +4 to hit, range 80/320 ft., one target. Hit: piercing damage.

The damage rolls in the action descriptions are clickable. Handler descriptions chain through the inline-handler dispatcher, so `dice: 1d6+2` inside an action's desc becomes a real roll button at render time.

A larger one

Adult Bronze Dragon

Huge dragon lawful good

Armor Class 19 (natural armor)

Hit Points 212 (17d12 + 102)

Speed 40 ft., fly 80 ft., swim 40 ft.

STR
25 (+7)
DEX
10 (+0)
CON
23 (+6)
INT
16 (+3)
WIS
15 (+2)
CHA
19 (+4)

Saving Throws Dex +5, Con +11, Wis +7, Cha +9

Skills Insight +7, Perception +12, Stealth +5

Damage Immunities lightning

Senses blindsight 60 ft., darkvision 120 ft., passive Perception 22

Languages Common, Draconic

Challenge 15

Amphibious. The dragon can breathe air and water.

Legendary Resistance (3/Day). If the dragon fails a saving throw, it can choose to succeed instead.

Actions

Multiattack. The dragon can use its Frightful Presence. It then makes three attacks, one with its bite and two with its claws.

Bite. Melee Weapon Attack: +12 to hit, reach 10 ft., one target. Hit: piercing damage.

Claw. Melee Weapon Attack: +12 to hit, reach 5 ft., one target. Hit: slashing damage.

Lightning Breath (Recharge 5-6). The dragon exhales lightning in a 90-foot line that is 5 feet wide. Each creature in that line must make a DC 19 Dexterity saving throw, taking lightning damage on a failed save, or half as much on a successful one.

Legendary Actions

The dragon can take 3 legendary actions, choosing from the options below. Only one legendary action option can be used at a time and only at the end of another creature's turn. The dragon regains spent legendary actions at the start of its turn.

Detect. The dragon makes a Wisdom (Perception) check.

Tail Attack. The dragon makes a tail attack. Melee Weapon Attack: +12 to hit, reach 15 ft., one target. Hit: bludgeoning damage.

Wing Attack (Costs 2 Actions). The dragon beats its wings. Each creature within 10 feet must succeed on a DC 20 Dexterity saving throw or take bludgeoning damage and be knocked prone.

Spellcasting

The spells: field takes a list of strings. The first string is the intro prose (it renders as a Spellcasting trait); each following string is one spell-level line "<label>: <comma-separated spells>".

Mage

Medium humanoid any

Armor Class 12 (15 with mage armor)

Hit Points 40 (9d8)

Speed 30 ft.

STR
9 (-1)
DEX
14 (+2)
CON
11 (+0)
INT
17 (+3)
WIS
12 (+1)
CHA
11 (+0)

Saving Throws Int +6, Wis +4

Skills Arcana +6, History +6

Senses passive Perception 11

Languages any four languages

Challenge 6

Spellcasting. The mage is a 9th-level spellcaster. Its spellcasting ability is Intelligence (spell save DC 14, +6 to hit with spell attacks). The mage has the following wizard spells prepared:

Cantrips (at will): fire bolt, light, mage hand, prestidigitation

1st level (4 slots): detect magic, mage armor, magic missile, shield

2nd level (3 slots): misty step, suggestion

3rd level (3 slots): counterspell, fireball, fly

4th level (3 slots): greater invisibility, ice storm

5th level (1 slot): cone of cold

Actions

Dagger. Melee or Ranged Weapon Attack: +5 to hit, reach 5 ft. or range 20/60 ft., one target. Hit: piercing damage.

Supported fields

FieldNotes
nameRequired for a sensible header.
size, type, subtype, alignmentJoined into the subheading line.
ac, ac_classIf ac_class is present it appears parenthesised after ac.
hp, hit_diceSame. hit_dice appears in parens after hp.
speedFree-form string.
statsSix numbers, STR DEX CON INT WIS CHA. Modifiers computed automatically.
savesList of { ability: bonus }; ability name is lower-cased and abbreviated.
skillsavesList of { skill: bonus }.
damage_vulnerabilities, damage_resistances, damage_immunities, condition_immunitiesFree-form strings.
senses, languagesFree-form strings.
crQuote "1/4" etc. so YAML doesn't parse it as a fraction.
traits, actions, reactions, legendary_actionsLists of { name, desc }. desc supports inline **bold**/*italic*/`code` and chains through inline handlers (so works inside descriptions).
spellsBasic 5e spellcasting block. List of strings: first is the intro prose (rendered as a Spellcasting trait), the rest are per-level entries "<label>: <comma-separated spells>". Spell names are auto-italicized.
legendary_descriptionOptional intro paragraph for legendary actions.
imagePortrait shown in the header. Accepts a wikilink (![[portrait.png]]), a bare filename, or an absolute URL.

Every string field tokenizes inline-handler invocations, so you can pull data from elsewhere with {{(empty)}}. For example, derive the statblock's CR from the same foundry: block your Foundry actor uses:

---
foundry:
  system:
    details:
      cr: 1/4
---

```statblock
name: Goblin
ac: 15
hp: 7
cr: "`fm: foundry.system.details.cr`"
```

One source of truth for both the rendered statblock and the synced Foundry actor sheet. See Mossroot for a fully worked instance: a blank Foundry NPC actor (no compendium template), all stat fields pulled via {{(empty)}} from the foundry: data block, Foundry sync and wiki render share the YAML.

What's not (yet) supported

  • Innate spellcasting (innate_spellcasting:) and PF2e/13th-age spell variants. The basic 5e spells: array (intro + per-level lines) is supported (see Spellcasting).
  • Custom layouts (Pathfinder 2e, 13th age, etc.). The current handler always renders the basic 5e layout.
  • Wikilinks inside desc fields. They render as literal [[...]] text. Cross-references to other pages should live in surrounding prose.
  • JS callbacks. Fantasy Statblocks evaluates arbitrary JS in its layout JSON. We currently do not.

Theming

The CSS uses tokens lifted from Fantasy Statblocks so you can override the look from your own .obsidian/snippets/<name>.css (which includes as user.css):

.statblock {
  --statblock-primary-color: #4a3858;
  --statblock-rule-color: #6b4684;
  --statblock-bg: #f4ecf7;
}
Created · Updated