Skip to main content

Dungeon Sheets

A tool to create character sheets and session notes for Dungeons and Dragons 5th edition (D&D 5e).

Build status Test coverage status Documentation Status https://img.shields.io/badge/code%20style-black-000000.svg

Documentation

Documentation can be found on readthedocs.

Installation

$ pip install dungeonsheets

Optional External dependencies

  • You may use pdftk to generate the sheets in PDF format.

  • You will need pdflatex, and a few latex packages, installed to generate the PDF spell pages (optional).

If pdftk is available, it will be used for pdf generation. If not, a fallback python library (pdfrw) will be used. This has some limitations:

  • Produces v1.3 PDF files

  • Not able to flatten PDF forms

  • Will produce separate character-sheets, spell-lists and spell-books.

Different linux distributions have different names for packages. While pdftk is available in Debian and derivatives as pdftk, the package is not available in some RPM distributions, such as Fedora and CentOS. One alternative would be to build your PC sheets using docker.

If the pdflatex command is available on your system, spellcasters will include a spellbook with descriptions of each spell known. If not, then this feature will be skipped.

In order to properly format descriptions for spells/features/etc., some additional latex packages are needed. On Ubuntu these can be install with:

$ sudo apt-get -y install pdftk texlive-latex-base texlive-latex-extra texlive-fonts-recommended

Usage

Each character or set of GM notes is described by a python (or a VTTES JSON) file, which gives many attributes associated with the character. See examples for more information about the character descriptions.

The PDF’s can then be generated using the makesheets command. If no filename is given, the current directory will be parsed and any valid files found will be processed. If the --recursive option is used, sub-folders will also be parsed.

$ cd examples
$ makesheets

dungeon-sheets contains definitions for standard weapons and spells, so attack bonuses and damage can be calculated automatically.

Consider using the -F option to include the excellent D&D 5e template for rendering spellbooks, druid wild forms and features pages (https://github.com/rpgtex/DND-5e-LaTeX-Template).

If you’d like a step-by-step walkthrough for creating a new character, just run create-character from a command line and a helpful menu system will take care of the basics for you.

Content Descriptions

The descriptions of content elements (e.g. classes, spells, etc.) are included in docstrings. The descriptions should ideally conform to reStructured text. This allows certain formatting elements to be properly parsed and rendered into LaTeX or HTML:

class Scrying(Spell):
  """You can see and hear a particular creature you choose that is on
  the same plane of existence as you. The target must make a W isdom
  saving throw, which is modified by how well you know the target
  and the sort of physical connection you have to it. If a target
  knows you're casting this spell, it can fail the saving throw
  voluntarily if it wants to be observed.

  Knowledge - Save Modifier
  -------------------------
  - Secondhand (you have heard of the target) - +5
  - Firsthand (you have met the target) - +0
  - Familiar (you know the target well) - -5

  Connection - Save Modifier
  --------------------------
  - Likeness or picture - -2
  - Possession or garment - -4
  - Body part, lock of hair, bit of nail, or the like - -10

  """
  name = "Scrying"
  level = 5
  ...

For content that is not part of the SRD, consider using other sources. As an example, parse5e can be used to retrieve spells.

Release files for dungeonsheets 0.19.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dungeonsheets 0.19.0
File Size Uploaded
dungeonsheets-0.19.0.tar.gz 2.8 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for dungeonsheets 0.19.0
File Interpreter ABI Platform
dungeonsheets-0.19.0-py3-none-any.whl Python 3 none any Details

Total release size: 5.6 MB

Release files / dungeonsheets-0.19.0.tar.gz

Download URL dungeonsheets-0.19.0.tar.gz
Size 2.8 MB
Tags Source
SHA-256 checksum
How to use checksums
76adafaa2b2957a4931115545dff96f2b24821ec359adb04c48201132248382b
BLAKE2b-256 checksum
How to use checksums
d8a05abac38747eed3962de0e736de086335ebbf7b05efd6325d01bc60483abb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.6

Release files / dungeonsheets-0.19.0-py3-none-any.whl

Download URL dungeonsheets-0.19.0-py3-none-any.whl
Size 2.9 MB
Tags Python 3
SHA-256 checksum
How to use checksums
79c78fd8b4c9d9234d47da58726254ff377043b3ed0a280d440fb5c528379b90
BLAKE2b-256 checksum
How to use checksums
e371a9bedbcc908c1e2166385ff67164d32addece481048a14ee6488294b3c49
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.6
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page