Converts donjon random dungeons into nice homebrewery v3 formatted text to copy and paste. It will add page markers to break up room locations, but some minor edits may still be required to the final document.
- Uses AI to enhance the dungeon flavour text, suggest a boss and lair details, and adds two adventure hooks.
- Adds any monster stat blocks that exist in the SRD to the document and lists the ones it had to skip (5e only)
- Creates a dungeon boss treasure horde and adds rollable table for extra flavour text (if AI used)
- Collects all the monsters and magical items into easy to use reference tables with sourcebook page number (5e, 4e limited)
- Provides total XP and a breakdown of combat encounter difficulty types (5e only, 4e limited)
- Adds page breaks throughout the document regardless of ruleset to reduce amount of manual editing required
- Captures all the settings used to generate this dungeon on donjon.bin.sh for prosperity
- Ability to customise certain parts of room locations so important details aren't missed
This tool has been tested with:
- AD&D
- D&D 4e
- D&D 5e
NOTE: don't forget to grab both maps (gm and player) from donjon as well as the json! :)
Using the GitHub action enables AI enhancements, enjoy.
NOTE: filename, gm map and player map are all required fields when using the github action.
- Via the Actions tab click on
Generate Homebrewery Text
- Click
Run Workflow
- Enter hosted link for donjon json file i.e. google drive (required)**
- Provide GM and Player map hosted URLs i.e. imgur (required)*
- Click
Run Workflow
- After it completes click on your job (it gets a green tick)
- Scroll to the bottom to find the Hombrewery.txt file under
Aftifacts
*if using imgur.com, you will probably need to put .png
on the end of the url!
**IMPORTANT: Creating download link for google drive
- Make the json file shareable with anyone with the link with viewer rights (make sure viewers can download files via settings)
- Copy link which will look like: https://drive.google.com/file/d/111111AAAAAAAABBBBBBBBBBB/view?usp=sharing
- 111111AAAAAAAABBBBBBBBBBB is the file ID (your file ID will be different)
- Create this link: https://docs.google.com/uc?export=download&id=111111AAAAAAAABBBBBBBBBBB
- Enter this URL in the github action workflow filename field
NOTE: You will need to provide your own ChatGPT API token for the AI enhancement to work, if you don't want to then use the --testmode
CLI flag to disable it. Add a .env
file in your local copy of this repo and add your API token like this OPENAI_API_KEY="your-token-here"
, use the env.sample file as a guide.
To install:
- Clone repo
- cd into repo
- Create a virtual environment with
python -m venv .
- Activate your vritual environment with
source bin/activate
pip install -r requirements.txt
- NOTE: you may need to install pyenv to install python 3.10
To run:
- Copy json from donjon into repo folder
- Supplied help text explains arguments needed to run the command
positional arguments:
filename
optional arguments:
-h, --help show this help message and exit
-gm GM_MAP, --gm_map GM_MAP
URL for the GM map image
-p PLAYER_MAP, --player_map PLAYER_MAP
URL for the Player map image
-t, --testmode Disable AI enhancements
- If you have the GM and Player maps, host them on an image hosting site and add the urls as arguments
python convert_donjon_to_homebrewery.py your_filename.json -gm https://imgur.something.png -p https://imgur.something.png
You can now copy and paste the contents of homebrewery.txt into your homebrewery document.
- You can see an example based on the included example.json here, this document hasn't been changed in any way since being generated by
DtH
to give you an idea of edits you will need to make to the final homebrewery document. - An example of what it could look like after some editing and tidying up can be seen here.
You can change the formatting of traps, hidden treasure and treasure in room locations so that important information is highlighted and not missed.
In the repo you will find a folder called templates, pick one of the css files and copy the contents into the style tab on homebrewery.
Feel free to create your own, if you don't mind sharing you can add them via a pull request!
- Make sure all the URLs are as stated above; google drive links have been changed into the download version, and any imgur urls have the
.png
added to the end - Make sure the file has viewer rights for anyone with the link on google drive
- Raise an issue via Issues tab with as much detail as possible, also please provide the json / json file that is causing problems.