DungeonBuddy
unlistedby Volt
Plugin to help TTRPG Entusiasts give markdown content folder structure.
README.md
DungeonBuddy Abstract
DungeonBuddy is a Plugin used inside of Obsidian. The high level idea of the tool is to import markdown documents and then split them into their own respective files. This allows key subjects to be branched apart. In almost all literature, including Player Handbooks or Campaign books, the table of contents is indicator for where these sections end and begin. They will naturally follow the cadence of the book. In digital text, we see these as headers.
Features
- Automatically splits markdown files into separate notes by headers (
#). - Preserves markdown formatting (e.g.,
>,**, lists, code blocks). - Automatically creates folders in the vault as needed.
- Handles large markdown files (tested up to 1 MB).
- Supports multiple sources like campaigns, homebrew, references, and misc.
- Optional deduplication and filename conflict resolution.
- Works entirely in the Obsidian vault, no external processing required.
Install
-
Download the plugin
- Clone or download the repo.
- Find the
main.jsand themanifest.jsonfiles.
-
Copy to your vault
-
Place the contents into:
<Vault>/.obsidian/plugins/dungeonbuddy/It should contain:
main.js manifest.json
-
-
Dependencies
-
Ensure you have the following (mostly for development/building, not for users):
- Node.js 20+
- TypeScript 5+
- Obsidian API types (
@types/obsidian) if building locally
-
Users installing the plugin into the vault do not need to install any dependencies.
-
-
Enable the plugin
- Open Obsidian → Settings → Community Plugins → Enable DungeonBuddy. (you may need to enable community plugins)
Usage
-
After enabling, DungeonBuddy adds commands for each supported source type:
Import Campaign MarkdownImport Reference MarkdownImport Homebrew MarkdownImport Misc Markdown
-
Commands can be accessed with the default shortcut (Ctrl+P)
-
To import a markdown file:
- Select the appropriate command.
- Pick your markdown file.
- DungeonBuddy will parse headers and create structured notes in the vault.
Notes:
- The first-level headers (
#) become new notes. - Subheaders are demoted by one level (
##→#) and included as content. - Files already existing in the vault will get
_1,_2, etc. appended automatically. - Large files are processed efficiently using an internal buffer.
File Size & Performance
- Tested on files ≥1 MB.
- Uses an internal line buffer for each note to avoid running into Obsidian’s cache limits.
- Small delays are used when writing to the vault to avoid overwhelming Obsidian.
Development
If you want to modify or rebuild:
-
Clone the repository.
-
Install dependencies:
npm install -
Build the plugin:
npm run buildThis generates the
main.js. -
Copy the
main.jsandmanifest.jsonto your vault’s plugin folder (see Install). Do not includenode_modules.
Future Features / Ideas
- Auto-detect keywords and generate hyperlinks.
- Background processing for massive vaults.
- Support for multiple markdown formats and source types.
- Generalized for any large markdown files, not just D&D
License
MIT
Future
I will probably add a couple more features, like recursive header value extraction and maybe even generalize the tool for general imports.
Please leave a star, or consider buying me a coffee if this helps. (link in profile) Feel free to DM me on Reddit or Discord.
Support
For plugin developers
Search results and similarity scores are powered by semantic analysis of your plugin's README. If your plugin isn't appearing for searches you'd expect, try updating your README to clearly describe your plugin's purpose, features, and use cases.