Coder Social home page Coder Social logo

dm-tools's Introduction

DM Tools

Welcome to the source repository for dm-tools, the command-line toolset for lazy DMs!

These tools are targeted for use with the D&D 5e rule set, for use in any terminal environment that can run Python or Snap packages.

dm-tools

Install the Snap

Get it from the Snap Store

snap install dm-tools
⚡ Invoke with dm-tools.live-game, dm-tools.plebs, or dm-tools.pockets not with dm-tools

Development

Virtualenv and Pip/Setuptools

Requires python >= 3.6 to support f-strings and type hints

  • Clone this repository
  • Create and activate a virtualenv that uses python >= 3.6
    • I like to use virtualenvwrapper
    • mkvirtualenv -p $(which python3) venv
    • setvirtualenvproject
  • Install in virtual environment: pip install -e .

Invoke with live-game, plebs, or pockets

⚠️ Known Issues

If your terminal window is not big enough, when you try to start live-game, you will get a crash with an error that says 'curses returned NULL'. Just increase the size of your terminal window, or decrease the size of the text, to alleviate this.

live-game

A curses-like terminal GUI tool for tracking a combat encounter

Live-Game Features

  • Initiative and turn order tracking
  • Tracking of combatant initiative bonus
  • Auto-roll and sort initiative scores for all combatants, taking initiative bonuses into account
  • Initiative deferral
  • Add/remove characters to/from list on the fly
  • Automatically populates HP, Immunities, Resistances, and Vulnerabilities for D&D 5e SRD monsters
  • Display and edit current and max HP for all combatants
  • Display and edit combatant conditions
    • D&D 5e conditions, plus Inspiration, are supported

Also features a log of past commands.

Development To-Dos

  • Edit Immunities, Resistances, and Vulnerabilities
  • Undo last action
  • Long-term save and load custom combatants
  • Display names and creature type together
  • Add arbitrary emojis for conditions
  • Adjust HP for all combatants with a given name regex
  • roll dice

Plebs (and Pockets)

Plebs is command-line tool for generating plebeian NPCs

Currently produces the following stats for a given NPC:

  • age
  • name
  • race
  • stats (D&D 5e standard stats)
  • hp
  • gender
  • occupation
  • trinkets carried

Plebs also generates some random cues to assist with role-playing the NPC:

  • three adjectives describing personality
  • a personal problem that the NPC is dealing with

Development To-Dos

  • Attack & defense capabilities
  • More content for trinkets / personalities / problems

The random values used by Plebs can be configured by passing it an alternate config.yaml file. Use default-config.yaml as an example.

Pockets

Pockets generates N random trinkets, most made up, but some inspired by trinkets from the PHB and Curse of Strahd lists.

dm-tools's People

Contributors

codyshepherd avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

dm-tools's Issues

Setting max HP should also set temp HP to that amount

Currently, setting max HP with a float value, e.g. 55.0 sets the maximum HP, but the temp HP value remains at whatever it was at prior to the new setting. Temp hp should be set to max hp whenever max HP is set.

Some performance issues in adding new combatant types

when adding the 8th or 9th unique combatant type, the performance of live-game during the "Add Character" action begins to suffer.

I've seen this on just my local machine; I need to verify it on another system.

dm-tools.plebs has file path issues when used as a snap

Sample errors:

$ dm-tools.plebs -g pet                                                                                                                                                                               
Usage: plebs [OPTIONS]        
Try "plebs --help" for help.
                                                                                                                                                                                                                   
Error: Invalid value for "-c" / "--config-yaml": Path "plebs/default-config.yaml" does not exist.

and:

$ dm-tools.plebs -g pet -c <path/to/config.yaml>
Traceback (most recent call last):
  File "/snap/dm-tools/3/bin/plebs", line 11, in <module>                                                                                                                                                          
    load_entry_point('dm-tools==0.1.0', 'console_scripts', 'plebs')()
  File "/snap/dm-tools/3/lib/python3.6/site-packages/click/core.py", line 764, in __call__                                                                                                                         
    return self.main(*args, **kwargs)
  File "/snap/dm-tools/3/lib/python3.6/site-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/snap/dm-tools/3/lib/python3.6/site-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/snap/dm-tools/3/lib/python3.6/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/snap/dm-tools/3/lib/python3.6/site-packages/plebs/plebs.py", line 206, in plebs
    p = pleb(race, **config)
  File "/snap/dm-tools/3/lib/python3.6/site-packages/plebs/plebs.py", line 135, in pleb
    val = func(**kwargs)
  File "/snap/dm-tools/3/lib/python3.6/site-packages/plebs/plebs.py", line 99, in gen_name
    with open(os.path.join(OUT_DIR,  'names_generated.txt'), 'a+') as fh:
OSError: [Errno 30] Read-only file system: '/snap/dm-tools/3/lib/python3.6/site-packages/plebs/names_generated.txt'

pockets should select without replacement

Currently two items of the same type can be selected by pockets. In most cases this is not really an issue, but there are a few magic items in the pockets content list (such as Bag of Tricks) that should really only be selected once.

It seems like intended behavior (short of dividing up items.txt into multiple files) should be to sample without replacement.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.