Skip to content

A tool to help with encounter managment for tabeltop dm'ing.

Notifications You must be signed in to change notification settings

spacemoose/dungeon_master_daemon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dungeon Master’s Daemon

This is currently just a development playground, but if you are a developer, reviews and MR’s are welcome.

Hopefully eventually a tool to help tabletop dungeon masters with managing combat. Right now it’s more a playground for me to learn some python. Not useful for anyone, except those that might want to give me some feedback or pitch in.

Goal functionality

I’m looking for something lightweight and unobtrusive that helps me with encounter bookkeeping while DM’ing tabletop D&D sessions. I want to be able to do the following easily:

  • Create encounters, populate them with creatures..
  • Manually enter the player’s initiative roles, and let the daemon roll initiative for creatures and npcs.
  • “Run the encounter” – iterate over participants, and alter HP and status of creatures. Party members should manage their own, so for party members I just track name & initiative.

Basically, it’s what I wish D&D Beyond would deliver with it’s encounter builder.

Current state

  • I think I have the DB, tables and crud where they need to, or at least trivial to extend. So far it’s all just in memory, no lasting persistance.
  • db structure and crud seems to work fine, but it’s just in-memory at the moment. See tests.
  • I have a text parser so I can copy-paste text from d&d beyond to add a creature.
  • I have some initial playground stuff on the UI. I can see a list of existing encounters, and see the contents of a specific encounter.

The section “Tasks” below shows what I plan to work on next, roughly in the order I plan to work on it. If you want to help out, pick something interesting and let me know you’re working on it.

Running and Testing

Setup the virtual env

This should be as simple as creating a virtual environment, activating it, and the running the app or the tests.

Make a virtual environment (venv)

# in project root
python -m .venv

Activate your venv

You’ll want to do this whenever you’re running or working on this project:

# in project root
source .venv/bin/activate

Leaving your venv

#works wherever
deactivate

Installing dependancies

You can check out all the requirements in requirements.txt. I’ll try to keep it up to date.

I’m running python 3.11, and had to do a little more than pip install kivy to get things running. Specifically I do the following:

# this works from anywhere, but makes sure your virtual env is active!
# get a kivy from source:
pip install kivy[base] kivy_examples --pre --extra-index-url https://kivy.org/downloads/simple/
pip install -r requirements.txt

Kivy has some dependancies, so if you run into any trouble, let me know and I’ll update the docs.

At that point you should be ready to run tests:

# from project root
cd tests
pytest

Or see the app in development:

cd src/app
python main.py

Tasks

First iteration is to be able to run my family’s encounters. So just one group of party members, including a couple of npc’s, and minimal sorting and filtering of things. Multi-campagin can come later.

I can to run programmatically created encounters.

I can view a list of encounters

I can click on an encounter, and view its details

I can click on a creature instance, and get its details

I can add party members to an encounter.

-

I can “run” the encounter

  • Make a button “run encounter”.
  • It prompts for the initiative of player characters, and adds them into the encounter.
  • It sorts participants by initiative order.
  • It highlights or expands the active participant (maybe a card maybe with roll-attack btn)
  • Each non (n)pc character has an HP button, that lets me damage or heal the participant.
  • Intuitive progression to next participant. Should be able to fix a screw up.

I can “reset” the encounter.

Encounter displays the XP and challenge rating.

Important for random encounters that might be repeated.

Persist across sessions

So far I’m just using in-memory db for testing. Add support for real persisence.

Fantasies

Assuming I can keep finding time and motivation to work on this, I’d like to add the following functionality :

  • sharing data amongst devices
  • Include a picture of their creature, be able to fullscreen it to show to players.
  • statuses with explanations and expirations.

Notes

This looks helpful https://towardsdatascience.com/fastapi-cloud-database-loading-with-python-1f531f1d438a

About

A tool to help with encounter managment for tabeltop dm'ing.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published