# Stat blocks

Write a creature's stat block for D&D 5e, Draw Steel or Pathfinder 2E, copy one from a Sourcebook, and roll its dice on the page.

## D&D 5e

A stat block is a callout that holds lists and a table. A comment line above each list or table sets how Dunjii draws it. A stat block can go on any page.

```markdown
---
type: npc
---
# Mire Hound
*Medium Monstrosity, Unaligned*

> [!callout]
> <!-- block: layout=vitals -->
>
> - **AC** 13
> - **HP** 33
> - **Speed** 40 ft.
>
> <!-- block: layout=dnd-2024-ability-grid scale=0.9 -->
>
> | Ability | Score | Mod    | Save   |
> | :------ | :---: | :----: | :----: |
> | STR     | 15    | **+2** | +2     |
> | DEX     | 14    | **+2** | +2     |
> | CON     | 14    | **+2** | +2     |
> | INT     | 3     | **-4** | -4     |
> | WIS     | 13    | **+1** | **+3** |
> | CHA     | 6     | **-2** | -2     |
>
> <!-- block: layout=inline scale=0.9 -->
>
> - **Init** +2
> - **Perception** +5 · **Stealth** +4
> - **Passive Perception** 15
> - **CR** 2 · XP 450
>
> ### Actions
>
> <!-- block: layout=plain-lines -->
>
> - **Bite:** ==+4==, ==9== (2d6 + 2) piercing, reach 5 ft.
```

- `type: npc`: Any page can hold a stat block. An NPC page offers to add one.
- `> [!callout]`: The box around the stat block.
- `> <!-- block: layout=vitals -->`: AC, HP and Speed, drawn as three boxes.
- `> <!-- block: layout=dnd-2024-ability-grid scale=0.9 -->`: One row per ability, drawn in three groups as the 2024 Monster Manual prints them.
- `> | WIS     | 13    | **+1** | **+3** |`: A save that differs from the modifier is bold.
- `> <!-- block: layout=inline scale=0.9 -->`: The details, side by side and a size smaller.
- `> <!-- block: layout=plain-lines -->`: One entry per line, without bullets.
- `> - **Bite:** ==+4==, ==9== (2d6 + 2) piercing, reach 5 ft.`: The attack bonus and the average damage are highlighted.

[Markdown in Dunjii](https://dunjii.com/docs/reference/markdown.md#block-layouts) lists the layouts. The **Ruleset** in a folder's **Info** decides which of the three layouts on this page `/statblock` writes there, and which Sourcebook it copies from. Dunjii saves it as `ruleset:` in the folder's `metadata.md`: see [Folder settings](https://dunjii.com/docs/organizing/folder-settings.md).

## Draw Steel

A Draw Steel stat block has two rows of boxes: Size, Speed, Stamina, Stability and Free Strike, then the five characteristics. Each ability is a `###` heading with its keywords, action, distance and target, then the power roll and its three tiers.

```markdown
# Bog Wight
*Level 2 Horde Brute · EV 4 · Undead*

> [!callout]
> <!-- block: layout=vitals -->
>
> - **Size** 1M
> - **Speed** 5
> - **Stamina** 20
> - **Stability** 1
> - **Free Strike** 2
>
> <!-- block: layout=vitals -->
>
> - **Might** +2
> - **Agility** 0
> - **Reason** −2
> - **Intuition** 0
> - **Presence** −1
>
> ### Drowning Grip (Signature Ability)
>
> <!-- block: layout=plain-lines -->
>
> - **Keywords** Melee, Strike, Weapon
> - **Action** Main action
> - **Distance** Melee 1
> - **Target** One creature
>
> **Power Roll + 2**
>
> <!-- block: layout=plain-lines -->
>
> - **≤11** 3 damage
> - **12–16** 5 damage
> - **17+** 6 damage; grabbed
```

- `> <!-- block: layout=vitals -->`: A row of four or more boxes draws its numbers smaller.
- `> - **17+** 6 damage; grabbed`: The tiers are text. Dunjii does not roll a power roll.

The Draw Steel Sourcebook holds the monsters from *Draw Steel: Monsters*. It is off until you switch it on: see [Sourcebooks](https://dunjii.com/docs/organizing/sourcebooks.md).

## Pathfinder 2E

A Pathfinder 2E stat block follows the book's order: senses and skills, the six attribute modifiers, then AC, saves and HP, then speed and Strikes. Action costs are written as characters: ◆, ◆◆ and ◆◆◆ for one to three actions, ⟲ for a reaction and ◇ for a free action.

```markdown
# Marsh Goblin
*Creature −1 · Small · Goblin, Humanoid*

> [!callout]
> <!-- block: layout=plain-lines -->
>
> - **Perception** +2; darkvision
> - **Languages** Common, Goblin
> - **Skills** Acrobatics +5, Stealth +5
>
> <!-- block: layout=vitals -->
>
> - **Str** +0
> - **Dex** +3
> - **Con** +1
> - **Int** +0
> - **Wis** −1
> - **Cha** +1
>
> <!-- block: layout=vitals -->
>
> - **AC** 16
> - **Fort** +5
> - **Ref** +7
> - **Will** +3
> - **HP** 6
>
> <!-- block: layout=plain-lines -->
>
> - **Speed** 25 feet
> - **Melee** ◆ dogslicer ==+7== (agile, finesse), **Damage** 1d6 slashing
```

- `> - **Melee** ◆ dogslicer ==+7== (agile, finesse), **Damage** 1d6 slashing`: A highlighted bonus rolls 1d20 + 7.

The Pathfinder 2E Sourcebook does not include creatures, so a Pathfinder stat block starts from one of your own creatures or from an empty one.

## Adding a stat block

1. In Edit, put the cursor on an empty line and type `/statblock`, or click the **+** and choose **Stat block…** from the menu. On an NPC page that has no stat block, you can also click the gray **Stat block** row.
2. In **Where should it start?**, type a creature's name. The list holds your own creatures and the Sourcebook's, for the folder's game only. On a wide window, a preview shows the stat block that will be copied.
3. Click a creature or press Enter. Dunjii copies its stat block onto your page, where you can change it. **Start empty** adds a blank stat block instead.

![The stat block dialog after typing "wolf".](https://dunjii.com/docs-assets/writing/stat-block-seed-dialog.webp)

To copy a whole creature page, copy it from the Sourcebook in the sidebar and paste it into one of your folders. See [Sourcebooks](https://dunjii.com/docs/organizing/sourcebooks.md).

When you [import pages](https://dunjii.com/docs/writing/new-documents.md), Dunjii rewrites a stat block written as bold lines (`**Armor Class** 15`) or in an Obsidian `ad-statblock` block into the D&D 5e layout above.

## Rolling

In View, dice in a stat block are buttons. Click `2d6 + 2` to roll it, or click a highlighted attack bonus such as `==+4==` to roll 1d20 + 4. A box opens beside it with each die, the total and **Roll again**. In Edit, rest the pointer on the dice and click **Roll** instead.

![The roll for a Bite attack's +4.](https://dunjii.com/docs-assets/writing/stat-block-roll.webp)

A highlighted number without a sign, such as the average damage `==9==` or a saving throw's `==DC 14==`, is only highlighted and does not roll. The rules for which text rolls are in [Markdown in Dunjii](https://dunjii.com/docs/reference/markdown.md#highlights-and-rolls).
