5eTools Templates for Obsidian

This guide explains how to use 5eTools data with Obsidian plugins like Fantasy Statblocks and Initiative Tracker.

References

Fantasy Statblocks Integration

Thethe Fantasy Statblocks plugin provides a bestiary that can be used with Initiative Tracker to create encounters.

Monsters, Objects, and Vehicles provide attributes that can be used with the Fantasy Statblocks bestiary.

Minimal YAML for Bestiary and Initive Tracker

Use this approach to make creatures available to the Initiative Tracker for encounters.

  1. Add to your note's frontmatter:

    statblock: true
    statblock-link: "#^statblock"
    {resource.5eInitiativeYaml}
    
    • statblock: inline tells Fantasy Statblocks that the note defines a creature.
    • statblock-link specifies content that should be linked to / embeded in the Initiative Tracker and Combatant/Creature views
    • {resource.5eInitiativeYaml} or {resource.5eInitiativeYamlNoSource} will add only the attributes Initiative Tracker needs
  2. In your note body, create a block reference (`^statblock) after the content you want displayed in the creature view:

    ```ad-statblock
    
    ...statblock content...
    
    ```
    ^statblock
    

Examples:

Full statblock rendering

This approach will use Fantasy Statblocks rendering.

  1. Add statblock: inline to the note's frontmatter to tell Fantasy Statblocks that the note defines a creature.

    statblock: true
    
  2. In your note body, use:

    ```statblock
    {resource.5eStatblockYaml}
    ```
    
    Or, to hide the source suffix:
    
    ````markdown
    ```statblock
    {resource.5eStatblockYamlNoSource}
    ```
    

Examples:

Tip

If you're using the Fantasy Statblocks plugin to render statblocks and you use the Dice Roller plugin, you'll want to set the following CLI config values:

"useDiceRoller" : true,
"yamlStatblocks" : true,

Template Types

Default Templates

Available template types include:

Full list: 5eTools default templates

5eTools templates with images

Some 5eTools data types have fluff images. These templates include those images in the markdown.

Full list: any template beginning with "images" 5eTools example templates

Display Variations

Alternate Ability Score Display

```ad-statblock
...
- STR: {resource.scores.str} `dice: 1d20 {resource.scores.strMod}`
- DEX: {resource.scores.dex} `dice: 1d20 {resource.scores.dexMod}`
- CON: {resource.scores.con} `dice: 1d20 {resource.scores.conMod}`
- INT: {resource.scores.int} `dice: 1d20 {resource.scores.intMod}`
- WIS: {resource.scores.wis} `dice: 1d20 {resource.scores.wisMod}`
- CHA: {resource.scores.cha} `dice: 1d20 {resource.scores.chaMod}`
...
```
^statblock

Example:

2024 Score Display (Table Format)

This pulls things apart a little differently.

|   | STAT  |  MOD | SAVE |
|:--|:-:|:----:|:----:|
|Str| {resource.scores.strStat} | {resource.scores.strMod} | {resource.savesSkills.saveOrDefault.strength} |
|Dex| {resource.scores.dexStat} | {resource.scores.dexMod} | {resource.savesSkills.saveOrDefault.dexterity} |
|Con| {resource.scores.conStat} | {resource.scores.conMod} | {resource.savesSkills.saveOrDefault.constitution} |
|Int| {resource.scores.intStat} | {resource.scores.intMod} | {resource.savesSkills.saveOrDefault.intelligence} |
|Wis| {resource.scores.wisStat} | {resource.scores.wisMod} | {resource.savesSkills.saveOrDefault.wisdom} |
|Cha| {resource.scores.chaStat} | {resource.scores.chaMod} | {resource.savesSkills.saveOrDefault.charisma} |

Raw types are here

Advanced Techniques

Splitting Strings in Frontmatter

{#if resource.conditionImmune}
conditionImmunities:
{#for condition in resource.conditionImmune.split(", ?")}
- "{condition}"
{/for}
{/if}

Display as JSON

To help debug what attributes are available, you can have it rendered as a JSON string.

Two examples:

{resource.conditionImmune.jsonString}

{resource.savesSkills.jsonString}