# OUT OF DATE - Obsidian TTRPG CLI Templates ![[images/OUT-OF-DATE-Obsidian-TTRPG-CLI-Templates.webp]] [Watch on YouTube](https://www.youtube.com/watch?v=kisqHk2TQGQ) · 42:43 · Josh Plunkett · 2023-11-26 > **Process is out of date.** The video description points to updated instructions at [github.com/ebullient/ttrpg-convert-cli](https://github.com/ebullient/ttrpg-convert-cli); newer tutorials were planned to follow. Keep this note as historical context for the 2023 template workflow. Earlier parts of the series: [CLI Intro](https://www.youtube.com/watch?v=JV-v-NFON8s), [Sources](https://www.youtube.com/watch?v=BjOajQqpmJA), [Config Files](https://www.youtube.com/watch?v=JX6_uV66Nsw). ## Outline ### 00:00 Intro — what templates are for - Fourth video in the TTRPG CLI series. Recap: the CLI creates thousands of pre-formatted notes (rules, spells, monsters) almost instantly for content you own; at the time it supported **D&D 5e** and **Pathfinder 2e**. Watch videos 1–3 first or this one won't make sense. - Already covered: creating the notes, configuring sources, and writing a config file. Today: **template files**, which let you change what the generated notes look like if you don't like the default output. - Supporting documentation lives on obsidianttrpgtutorials.com under **Plugin Tutorials → CLI** (5e page; a new page for this tutorial was planned). ### 01:50 Get a copy of the templates - Search "obsidian ttrpg cli" to reach ebullient's **ttrpg-convert-cli** GitHub. Before every run, update everything: the **5eTools mirror** repo, the CLI executable (from Releases), and a fresh copy of the repo itself (**Code → Download ZIP**). - Drag the unzipped `ttrpg-convert-cli-main` folder into `C:\CLI\5etools\bin` (his location; yours may differ). Templates are under `examples/templates/tools/5e`. - **Never edit the originals.** Copy a template (Ctrl+C / Ctrl+V) and add your name — he appends `-josh` — because updating the repo would overwrite edits to files with the original names. ![[images/OUT-OF-DATE-Obsidian-TTRPG-CLI-Templates-t0400.webp]] *The `examples/templates/tools/5e` folder: the stock templates alongside Josh's own `-josh` copies.* ### 05:05 Default CLI output - He ran a quick 5e export into a separate folder and dropped it into a test vault. Default monster notes are an **admonition** (needs the **Admonitions** plugin) with a huge image — not a statblock. - Templates are designed to pair with specific **CSS snippets** in `ttrpg-convert-cli-main/examples/css-snippets` (admonition snippets for admonition templates, statblock snippets for statblock templates). Copy them into the vault via **Settings → Appearance → CSS snippets → open folder**, then enable. With the right snippet the image shrinks and sits on the right. ![[images/OUT-OF-DATE-Obsidian-TTRPG-CLI-Templates-t0720.webp]] *Default admonition-style monster note (Chuul) after enabling the matching CSS snippet: compact image on the right, linked stats.* - **Publishing tip:** admonitions and callouts work with **Obsidian Publish**; Fantasy Statblocks doesn't. If you plan to publish monsters online, stick with the admonition/callout output. - Josh prefers **Fantasy Statblocks** for its built-in button that adds a monster to combat and triggers the encounter. ### 08:30 Wire templates into the config file - Open the config from the Config Files video (`dm-sources-basic.json`); it already defines two templates (background and monster). - The syntax comes from the CLI docs: **Using with 5eTools → Using a configuration file → templates** section. Paste it in and follow JSON rules (commas between entries, none after the last). - **Path gotcha:** paths are resolved from the **`bin` folder** (where the CLI runs), so a pasted path starting with `examples/...` fails. Prefix it with the repo folder name, e.g. `ttrpg-convert-cli-main/examples/templates/tools/5e/...`; a missing file makes the run error out. - Run from `bin` (type `CMD` in Explorer's address bar) with the command from his website: `-c dm-sources-basic.json`, output to `test1`. It reports unknown sources (raise those on the CLI GitHub) and writes files in seconds. ### 15:00 Comparing outputs — default vs statblock template - Notes dropped in the wrong vault location break images and links — notes must sit where the config's paths expect them. - Switching templates: the `examples/templates/tools/5e` folder offers several monster templates — scores, image, and **Fantasy Statblock** versions with the statblock either in the **YAML properties (header)** or in the **body**. He picks the body version, edits the template name at the end of the config line, re-runs (press Up for the previous command) to `test2`. - Result: monsters now render as Fantasy Statblocks (links still broken only because of the test folder location). ![[images/OUT-OF-DATE-Obsidian-TTRPG-CLI-Templates-t1955.webp]] *The Aboleth rendered with the Fantasy Statblock body template.* ### 20:00 Inside a template file - He prefers statblocks in the note body rather than in properties. Walking the stock template side by side with its output: the `---` lines draw the properties block, then template logic loops over `resource.tags` to emit each tag. (Josh couldn't recall the templating language's name — "it's not Handlebars"; the CLI documentation covers it.) - Key lines: `statblock: inline` (tells Fantasy Statblocks the note contains a statblock — keep it), `aliases` from `resource.name`, a header with the name, vault path, source, then the statblock YAML pulled from the resource. ### 23:40 Make custom changes — Josh's template - His `-josh` copy adds a **note icon "monster"** property for **Supercharged Links** (icons on monster links), plus Dataview-friendly properties: **monster type**, **source type = Bestiary** (lets a query list every monster), **book source** (e.g. all Monster Manual monsters), **AC** and **HP** (quick tables of, say, every goblin with AC/HP to judge difficulty when picking combat). - String values go in quotes inside square brackets to avoid problems with special characters (a fix after a user reported issues). - He also added an **encounter table** block at the bottom, now unnecessary: **javalent** built add-to-combat buttons directly into Fantasy Statblocks, so the clunky left-aligned encounter block below a centred statblock is no longer needed. ![[images/OUT-OF-DATE-Obsidian-TTRPG-CLI-Templates-t2400.webp]] *The stock template (left) beside Josh's modified copy with the extra icon, type, source, AC/HP properties and encounter block.* ### 26:48 JSON sources — finding field names - Field names come from the 5eTools JSON: `5etools-mirror/data/bestiary/` → the Monster Manual file. Each monster is one `{ ... }` object starting with `name`. - He spotted a pattern rather than learning the internals: anything the CLI pulls uses `resource.<field>` — so `{resource.ac}` worked for AC. Some fields (like the description) come from other files, so not every value appears in the bestiary JSON. - Encounter block: only the monster name is needed; the rest is the plugin's normal text syntax. - Re-running with the `-josh` template: the output now shows the note icon, type, source type, book source, AC and HP properties plus the encounter block. Normally he'd replace the vault's CLI folder rather than stacking test folders. ![[images/OUT-OF-DATE-Obsidian-TTRPG-CLI-Templates-t3315.webp]] *Aboleth note generated by the modified template: Properties now include the icon, type, source type, book source, AC and HP.* ### 33:48 Types of templates - Template types in `examples/templates/tools/5e`: backgrounds, items, monsters, objects, races, spells, vehicles — anything there can be customised. - Nested data uses dotted paths: a `save` object with `con`, `int`, `wis` entries becomes `resource.save.con` (returns e.g. +6). - Switch to the statblock CSS snippet when using statblock templates. Output expects the configured root (his `/2-Mechanics/CLI`, plus a rules folder); recreate that path at the vault root for images and links to work. Don't move or modify CLI notes afterwards. ### 37:27 My template config - Recap: install, run, change and modify templates — and back them up before experimenting. - His real `dm-sources` config (for the content he owns) has a large template block defining a custom template for every supported note type, since he modified them all. ### 38:30 Notes on PF2e - A PF2e series is possible, but the PF2e side is less mature. After the **Pathfinder 2e Remaster**, the PF2e CLI's data source (the **pf2etools** website) is no longer maintained or updated, so Josh is moving away from the CLI for Pathfinder and hopes for a new data source. ### 39:16 Closing thoughts - Reflects on years of manual copy-paste data entry into **Realm Works** from error-riddled PDFs, versus the CLI producing all his owned content in about 5 seconds — less prep, more dice rolling. - One more video planned: **custom content** — use a local copy of 5eTools to enter monsters from books you own that aren't on 5eTools, then convert them through the CLI into Obsidian. ### 40:39 Outro - Like/subscribe; obsidianttrpgtutorials.com hosts all his content. - **Community and Support:** TTRPG questions → the Obsidian TTRPG Discord (around 2,000 users then); general Obsidian or non-TTRPG plugin issues → the official Obsidian Discord. - **Patreon** (about the cost of a coffee a month; a free tier exists) gives access to the **Foundation Vault**: recommended plugins, folder structure, templates and Dataview queries pre-set. ## Things mentioned ### Obsidian / CLI tooling - **TTRPG Convert CLI** (`ttrpg-convert-cli` by ebullient) — converts 5eTools JSON into linked Markdown notes; ships example templates and CSS snippets (**free**, open source; this process is outdated — use current GitHub docs) - **5eTools mirror** (`5etools-mirror`) data, e.g. `data/bestiary/` Monster Manual JSON (**free**) - Config `dm-sources-basic.json` — `template` block with paths relative to `bin` - Example templates in `examples/templates/tools/5e`: monster (scores, image, Fantasy Statblock header/YAML and body versions), background, item, object, race, spell, vehicle - CSS snippets in `examples/css-snippets` (admonition and statblock variants) - Template fields: `resource.name`, `resource.tags`, `resource.ac`, `resource.hp`, nested `resource.save.con`; `statblock: inline` - Windows Command Prompt / File Explorer (**free**) ### Obsidian plugins and features - **Fantasy Statblocks** — renders monster statblocks; built-in add-to-combat button (**free**) - **Initiative Tracker** — encounter/combat blocks triggered from statblocks (**free**) - **Admonitions** — needed for the default admonition-style monster notes (**free**) - **Supercharged Links** — icons on links via a note-icon property (**free**) - **Dataview** — queries by source type, book, AC, HP (**free**) - Obsidian **CSS snippets** (Settings → Appearance) (**free**) - **Obsidian Publish** — works with admonitions/callouts but not Fantasy Statblocks (**paid** add-on) ### Websites and communities - [Obsidian](https://obsidian.md/) (**free** core app) - [ttrpg-convert-cli GitHub](https://github.com/ebullient/ttrpg-convert-cli) — releases, docs, templates; raise issues for unknown sources (**free**) - [Obsidian TTRPG Tutorials](https://obsidianttrpgtutorials.com) — Plugin Tutorials → CLI pages (**free**) - [Community and Support](https://obsidianttrpgtutorials.com/Obsidian+TTRPG+Tutorials/Community+and+Support) → Obsidian TTRPG Discord; official Obsidian Discord (**free**) - [Josh Plunkett Patreon](https://www.patreon.com/JPlunkett) — Foundation Vault (**paid** tiers, plus a free tier) - **pf2etools** — PF2e data site the CLI relied on, no longer maintained after the Remaster ### TTRPG systems and products - **D&D 5e** — focus of this video; Monster Manual and DMG sources; examples Chuul and Aboleth (**paid** books; convert only content you own) - **Pathfinder 2e** and the **PF2e Remaster** — CLI support less mature; data source stalled - **Realm Works** — campaign manager Josh used to fill by manual copy-paste (**paid**) ### Free vs paid (quick) - Free: Obsidian core, ttrpg-convert-cli and its templates/snippets, 5eTools data, all the community plugins shown, tutorial site, Discords - Paid: the rulebooks themselves, Obsidian Publish, Realm Works, optional Patreon tiers ## Bios - **Josh Plunkett**: Australian GM and educator behind Obsidian TTRPG Tutorials (YouTube + obsidianttrpgtutorials.com). He documents campaign management in Obsidian, runs the Obsidian TTRPG Discord community, and offers a Patreon Foundation Vault. This November 2023 episode is part four of his TTRPG CLI series and is explicitly marked out of date in favour of current ebullient CLI docs. - **ebullient**: Maintainer of the open-source **ttrpg-convert-cli** project on GitHub, the source of the CLI, its documentation, and the example templates used here. - **javalent**: Developer of Obsidian TTRPG plugins including Fantasy Statblocks, Initiative Tracker and Admonitions; Josh thanks them for adding add-to-combat buttons directly to statblocks (called "Javelin" in the auto-captions).