GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - phmuni/rpgen: Terminal tactical encounter manager for 5e-compatible tabletop RPGs: encounter generation, initiative and HP tracking (Textual + Open5e)

BranchesTags
Open more actions menu

Latest commit

 

History

7 Commits
7 Commits

Folders and files

NameName
Last commit message
Last commit date
docs
docs
 
 
resources
resources
 
 
scripts
scripts
 
 
src
src
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
main.py
main.py
 
 
requirements.txt
requirements.txt
 
 

Repository files navigation

RPGen — Tactical Encounter Manager

A terminal app for running 5th-edition-compatible tabletop combat. Pick a party level and a risk level and RPGen builds a balanced encounter: a random environment, monsters that live there, and (optionally) a party of generated characters. Initiative is rolled and sorted, and you can track hit points and turns right in the terminal.

RPGen screenshot

Features

  • Encounter generation that uses XP budgets and group-size multipliers to pick monsters for the chosen environment.
  • Character generation for the party: species, class, 4d6-drop-lowest ability scores, level-appropriate weapons and armor, AC, HP, spell slots (including Pact Magic) and known spells.
  • Manual mode for real players: type the initiative each player rolled, or leave it blank to roll a d20.
  • Combat tracker with the turn order, the current turn, the round counter, damage and healing, and downed combatants skipped automatically.
  • Full stat blocks, including traits, actions, reactions, legendary actions, equipment and spells.
  • Responsive layout. Three columns on wide terminals; on small ones you switch between Setup, Combat and Details tabs.
  • Works offline. Data comes from the Open5e API and is cached on disk. Without a connection, RPGen falls back to a bundled SRD 5.1 snapshot.

Installation

Requires Python 3.10 or newer.

git clone https://github.com/phmuni/rpgen.git
cd rpgen
python3 -m venv .venv
source .venv/bin/activate        # Windows: .venv\Scripts\activate
pip install -r requirements.txt
python main.py

The first run downloads data from Open5e, which takes about 30 seconds. Later runs load it from the cache.

Usage

Key Action
r Generate a new encounter
n Next turn
d Damage/heal the selected row (7 or -7 = damage, +7 = heal)
↑ ↓ Select a combatant
Enter Show details (switches tab on small terminals)
1 2 3 Setup / Combat / Details tabs (small terminals)
Esc Back to the combat view
q Quit

Risk goes from 1 to 20 and scales the XP budget from about 0.6× to 2× the party's baseline. The setup panel previews the difficulty (Easy, Medium, Hard or Deadly) as you type.

Project layout

main.py                    Textual UI (CombatManager)
src/api_loader.py          Open5e fetching, normalization and disk cache
src/utils.py               Data loading, XP/CR tables, spell picking
src/monster_picker.py      Encounter building
src/player_generator.py    Character generation
src/environment_picker.py  Random environment selection
resources/                 Hand-written environments and class progression tables
resources/srd/             Offline SRD 5.1 snapshot (see scripts/build_srd_data.py)

The cache lives in your OS user cache directory (for example ~/Library/Caches/rpgen on macOS or ~/.cache/rpgen on Linux). Set RPGEN_CACHE_DIR to put it somewhere else.

To regenerate the offline snapshot:

python scripts/build_srd_data.py

Contributing

Issues and pull requests are welcome. Please keep any bundled game content limited to the SRD or other openly licensed sources.

License

The source code is released under the MIT License.

Game content attribution

This work includes material taken from the System Reference Document 5.1 ("SRD 5.1") by Wizards of the Coast LLC and available at https://dnd.wizards.com/resources/systems-reference-document. The SRD 5.1 is licensed under the Creative Commons Attribution 4.0 International License, available at https://creativecommons.org/licenses/by/4.0/legalcode.

At runtime, RPGen also downloads content from the Open5e API, which includes third-party material published under the Open Game License 1.0a. That content is not distributed with this repository; see https://open5e.com/legal for its licenses.

RPGen is an unofficial fan project. It is not affiliated with, endorsed, sponsored or approved by Wizards of the Coast.

About

Terminal tactical encounter manager for 5e-compatible tabletop RPGs: encounter generation, initiative and HP tracking (Textual + Open5e)

Topics

dnd5eencounter-generatoropen5epythontextualttrpgtui

Resources

Readme
MIT license
Activity

Stars

1 star

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.