Advanced Features

Warning

Character and GM files are python modules that are imported when parsed. NEVER parse a character file without inspecting it to verify that there are no unexpected consequences, especially a file from someone you do not trust.

Homebrew

Dungeonsheets provides mechanisms for including items and abilities outside of the standard rules (“homebrew”). This can be done in one of two ways.

  1. As subclasses (recommended)
  2. As strings

Magic Weapons and Armor

A common situation is the creation of homebrew weapons, armor and shields. With multiple inheritance, it is possible to include such a magic weapon as both a weapon and magic item:

from dungeonsheets import mechanics

class DullSword(mechanics.Weapon, mechanics.MagicItem):
    """This magical sword does remarkably little damage."""
    name = "dull sword"
    # Weapon attributes, e.g.
    damage_bonus = -1
    attack_bonus = -1
    # Magical item attributes, e.g.
    item_type = "weapon"
    st_bonus_all = -1

weapons = [DullSword]
magic_items = [DullSword]

The same can be done by subclassing either mechanics.Armor or mechanics.Shield together with mechanics.MagicItem.

Strings

If a mechanic is listed in a character file, but not built into dungeonsheets, it will still be listed on the character sheet with generic attributes. This should be viewed as a fallback to the recommended subclass method above, so that attributes and descriptions can be given.

Roll20 (VTTES) and Foundry JSON Files

Dungeonsheets has partial support for reading JSON files exported either from roll20.net using the VTTES browser extension, or directly from Foundry VTT by choosing export data from the actor’s right-click menu. This allows character sheets to be exported from roll20.net and foundry, and then rendered into full character sheets.

Cascading Sheets

Character and GM sheet files can inherit from other character and GM files. This has two primary use cases:

  1. A parent GM sheet can be made for a campaign, and then child sheets can provide only the specific details needed for each session.
  2. When importing JSON files from roll20 or Foundry VTT, missing features (e.g. Druid wild shapes) can be added manually.

Sheet cascading is activated by using the parent_sheets attribute in a python sheet file, which should be a list of paths to other sheets (either .py or .json):

gm_session1_notes.py
 dungeonsheets_version = "0.15.0"
 monsters = ['giant eagle', 'wolf', 'goblin']
 parent_sheets = ['gm_generic_notes.py']
gm_generic_notes.py
 dungeonsheets_version = "0.15.0"
 party = ["rogue1.py", "paladin2.py", ...]