Skip to content

mojomast/rpg-dm-bot

Repository files navigation

RPG Dungeon Master Bot

It is designed for two modes of play: players can join and play through Discord or browser chat, while dungeon masters and operators can manage campaigns, game data, and world state from the web UI.

Highlights

  • Persistent characters, sessions, combat, quests, spells, skills, and inventory
  • Real gold balance handling, including player-to-player gold transfer
  • AI DM narration, NPC dialogue, and tool-driven gameplay flow
  • Browser chat with shared session state and live dashboard panels
  • Web admin tools for campaigns, locations, NPCs, items, spells, and game data
  • Discord responses are routed through the session-bound game channel and current session context
  • Content-pack aware runtime data for themed campaigns

Quick Start

For setup, hosting, and environment configuration, see the Operator Guide.

Documentation

Project Structure

rpg-dm-bot/
├── run.py              # Entry point
├── requirements.txt    # Dependencies
├── .env               # Environment variables (not in repo)
├── .gitignore         # Git ignore file
├── data/
│   ├── rpg.db         # SQLite database (created at runtime)
│   └── game_data/     # Static game data (classes, races, items)
├── logs/              # Log files
├── src/
│   ├── bot.py         # Main bot class
│   ├── database.py    # Database operations
│   ├── llm.py         # LLM integration
│   ├── prompts.py     # System prompts
│   ├── tools.py       # Tool executor
│   ├── tool_schemas.py # Tool definitions
│   └── cogs/
│       ├── characters.py  # Character management
│       ├── combat.py      # Combat system
│       ├── inventory.py   # Inventory management
│       ├── quests.py      # Quest system
│       ├── npcs.py        # NPC interactions
│       ├── dice.py        # Dice rolling
│       ├── spells.py      # Spells, spell slot management, and casting UI
│       ├── sessions.py    # Session management
│       ├── dm_chat.py     # AI chat/narration
│       └── game_master.py # Game flow management
└── tests/             # Unit tests

Contributing

Contributions are welcome. Please open an issue or pull request if you find a bug or want to improve the project.

License

MIT License. See the repository license for details.

About

AI-powered Discord bot that serves as a Dungeon Master for tabletop RPG games. This entire project was created by giving Claude Opus 4.5 a single prompt asking it to transform ussybot into an RPG DM bot.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors