This project builds a local docker image that can be used to run several D&D-related scripts and utilities.
- Install Docker.
- Clone this repository.
- Build:
cd dndscripts && docker build . -t dndscripts:latest
- Put
dndscripts.sh
in your PATH.
mkdir DDAL && cd DDAL
- Download your AL PDF, many can be found on DMsGuild. Save it in the DDAL dir. Let's say it is
DDAL-FOO-7.pdf
- export OPENAI_API_KEY=<sk-your-api-key...>
dndscripts.sh alcreatures /opt/DDAL-FOO-7.pdf
(dndscripts.sh
must be in your PATH)
This will:
- extract the creatures listed from the statblocks section
- generate appropriate and thematic images in the DDAL dir for each creature
- gather an approximate count of creature tokens you would need to run the adventure
- name the image files appropriately
Intended to be run after the alcreatures
script, but can be run anytime your current directory contains image files that follow the same naming convention, e.g. mimic_medium_1in_1ct.webp
.
cd DDAL
dndscripts.sh crop
This will create a cropped
dir, containing circle-cropped token images of all the images found in the DDAL dir, sized according to their creature size: 1 inch for small/medium, 2 inches for large, etc. You can use these in VTTs as-is, or proceed to the next script if printing for tabletop use.
cd DDAL
dndscripts.sh pdf
This will pack the appropriate number of tokens (based on the filenames found in the cropped
dir) into a PDF appropriate for printing, cutting or stamping out, and using at the table!