5eTools Templates for Obsidian
This guide explains how to use 5eTools data with Obsidian plugins like Fantasy Statblocks and Initiative Tracker.
References
PermalinkFantasy Statblocks Integration
PermalinkThethe 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
PermalinkUse this approach to make creatures available to the Initiative Tracker for encounters.
-
Add to your note's frontmatter:
statblock: true statblock-link: "#^statblock" {resource.5eInitiativeYaml}statblock: inlinetells Fantasy Statblocks that the note defines a creature.statblock-linkspecifies 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
-
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
PermalinkThis approach will use Fantasy Statblocks rendering.
-
Add
statblock: inlineto the note's frontmatter to tell Fantasy Statblocks that the note defines a creature.statblock: true -
In your note body, use:
```statblock {resource.5eStatblockYaml} ``` Or, to hide the source suffix: ````markdown ```statblock {resource.5eStatblockYamlNoSource} ```
Examples:
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
PermalinkDefault Templates
PermalinkAvailable template types include:
- monster
- spell
- item
- background
- class
- object
- vehicle
- race
- and more
Full list: 5eTools default templates
5eTools templates with images
PermalinkSome 5eTools data types have fluff images. These templates include those images in the markdown.
- images-background2md.txt
- images-item2md.txt
- images-monster2md.txt
- images-object2md.txt
- images-race2md.txt
- images-spell2md.txt
- images-vehicle2md.txt
Full list: any template beginning with "images" 5eTools example templates
Display Variations
PermalinkAlternate Ability Score Display
Permalink```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:
- monster2md-scores.txt (similar will work for objects)
2024 Score Display (Table Format)
PermalinkThis pulls things apart a little differently.
resource.scores.*Statwill show the raw scoreresource.scores.*Modwill show the modifierresource.savesSkills.saveOrDefault.*will render the saving throw (in bold) or the default modifier
| | 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
PermalinkSplitting Strings in Frontmatter
Permalink{#if resource.conditionImmune}
conditionImmunities:
{#for condition in resource.conditionImmune.split(", ?")}
- "{condition}"
{/for}
{/if}
Display as JSON
PermalinkTo help debug what attributes are available, you can have it rendered as a JSON string.
Two examples:
{resource.conditionImmune.jsonString}
{resource.savesSkills.jsonString}