Skip to content

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

License

Notifications You must be signed in to change notification settings

PJBrs/dungeon-sheets

 
 

Repository files navigation

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

Documentation

Documentation can be found on readthedocs.

Docker

You can run this repository directly from a container.

Run the following in a directory with valid character files (such as the examples directory):

$ docker run -it -v $(pwd):/build ghcr.io/canismarko/dungeon-sheets:latest

Installation

$ pip install dungeonsheets

Note

dungeon-sheets requires at least python 3.6. This is mostly due to the liberal use of f-strings. If you want to use it with previous versions of python 3, you'll probably have to replace all the f-strings with the older .format() method or string interpolation.

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 (pypdf) will be used. This has the limitation that it is not able to flatten PDF forms.

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, dungeon-sheets will include a description of a character's features. For spellcasters, it 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). dungeon- sheets includes its own version of the template, but will use a local one if it is installed.

Consider using the -T option to use the beautiful latex character sheet (https://github.com/matsavage/DND-5e-LaTeX-Character-Sheet-Template). This does require lualatex as well as a fairly recent version of texlive. dungeon-sheets includes its own version of the latex character template, but will use a local one if it is installed.

By default, your character's spells are ordered alphabetically. If you would like your spellbook to be ordered by level, you can use the -S option to do so.

Furthermore, your character's features are ordered alphabetically by default as well. Pass the -N option to order feats by type (character feats, class feats, racial feats and background feat) and, if applicable, by sub-type (e.g., for Sorcerers, metamagic feature choices are collected under the Metamagic feature; for the Battle Master subclass, Maneuver feature choices are collected under the Combat Superiority feature.)

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 Wisdom
  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.

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages

  • Python 97.4%
  • TeX 1.7%
  • Other 0.9%