echo6-docs/vault/projects/mmud-project.md
echo6-autocommit ef8b1e0bd9 auto: docs sync 2026-07-13T12:00:23+00:00
Files changed: engine/.embcache.json engine/changelog.md engine/lint-report.md vault/.trash/2026-06-19.md vault/docs/hardware/environment.md vault/docs/hardware/ip-allocation.md vault/docs/matrix/archivist.md vault/docs/matrix/matrix_host.md vault/docs/matrix/mautrix_signal.md vault/docs/matrix/synapse.md vault/docs/matrix/synapse_retention_discovery.md vault/docs/navi/cc-rules.md vault/docs/navi/deployment.md vault/docs/navi/themes.md vault/docs/services/ots-setup.md vault/docs/services/services.md vault/docs/services/usenet.md vault/docs/software/authentik.md vault/docs/software/caddy.md vault/docs/software/central.md vault/docs/software/dns.md vault/docs/software/geo-tools.md vault/docs/software/navi.md vault/docs/software/recon.md vault/docs/software/searxng.md vault/glossary.md vault/notes/echo6-landing-page-data-export.md vault/notes/ia-download-queue.md vault/projects/advbbs-project.md vault/projects/argus.md vault/projects/deploy-livesync.md vault/projects/fleet-patch-audit.md vault/projects/fleet-platform-baseline.md vault/projects/matrix-synapse-deployment.md vault/projects/meshai-config-hot-apply.md vault/projects/meshai-region-routing-plan.md vault/projects/meshai.md vault/projects/meshcore-transport.md vault/projects/meshtastic-headscale-runbook.md vault/projects/mmud-project.md vault/projects/nominatim-v5-reimport.md vault/runbooks/add-peertube-channel.md vault/runbooks/authentik-access-groups.md vault/runbooks/authentik-create-invitation.md vault/runbooks/authentik-oidc-application.md vault/runbooks/authentik-upgrade.md vault/runbooks/central-deploy-cutover.md vault/runbooks/ct-runbook.md vault/runbooks/edge2-access-reference.md vault/runbooks/expose-service-contabo.md vault/runbooks/expose-service-edge2.md vault/runbooks/expose-service-home.md vault/runbooks/fleet-magicdns-resolved-migration.md vault/runbooks/headless-browser-page-verification.md vault/runbooks/headscale-oidc-boot-order.md vault/runbooks/headscale-onboard-node.md vault/runbooks/ia-cli-reference.md vault/runbooks/ia-download-mirror.md vault/runbooks/idahomesh-bridge-setup.md vault/runbooks/idahomesh-vpn-device-setup.md vault/runbooks/lxc-service-migration.md vault/runbooks/mailcow-create-mailbox.md vault/runbooks/meshai-prod-compose-override.md vault/runbooks/meshmonitor-password-reset.md vault/runbooks/meshtastic-sidecar-node.md vault/runbooks/meshtasticd-sim-nodes-runbook.md vault/runbooks/nordvpn-lxc.md vault/runbooks/peertube-remote-runner.md vault/runbooks/pg-backup.md vault/runbooks/pi-nas-omv-runbook.md vault/runbooks/pipeline-patterns.md vault/runbooks/proxmox-create-ubuntu-vm.md vault/runbooks/proxmox-onboard-node.md vault/runbooks/pymc-repeater-kiss-tnc-reenumeration.md vault/runbooks/recon-operations.md vault/runbooks/recon-service-integration.md vault/runbooks/syncthing-add-node.md vault/runbooks/toc-cortex-pve9.2-update.md vault/session-resume/SESSION-HANDOFF-meshai-test.md
2026-07-13 12:00:23 +00:00

5 KiB

title type tags aliases related updated
MMUD — Mesh Multi-User Dungeon project
mesh
advbbs-project
meshtasticd-sim-nodes-runbook
meshai
ip-allocation
meshtastic-headscale-runbook
2026-07-13

MMUD — Mesh Multi-User Dungeon

Text-based multiplayer dungeon crawler for Meshtastic LoRa mesh networks. BBS door games (LORD, TradeWars) adapted for 150-char mesh radio constraints, async play, 30-day wipe cycles.

Status

Phase: Deployed and running — all 6 phases implemented, NPC conversation system live with gemini-3.1-flash-lite.

Deployment

  • Game Daemon: CT 109 (192.168.1.109) on utility node, Docker container, Flask dashboard on port 5000
  • Dashboard: https://mmud.echo6.co (Last Ember — dark tavern aesthetic)
  • SIM Nodes: 6 meshtasticd LXC containers (CT 111-116) on utility
    • EMBR (CT 111) — game server
    • DCRG (CT 112) — broadcast
    • GRST (CT 113) — Grist barkeep NPC
    • MRN (CT 114) — Maren healer NPC
    • TRVL (CT 115) — Torval merchant NPC
    • WSPR (CT 116) — Whisper sage NPC
  • LLM Backend: gemini-3.1-flash-lite via Google genai SDK (configured in DB llm_config table)
  • Compose: /opt/mmud/docker-compose.yml on CT 109
  • Admin: https://mmud.echo6.co/admin (session auth, password in docker env)

Repo

/home/zvx/projects/mmud (GitHub: zvx-echo6/mmud)

The repo contains a CLAUDE.md with full architecture, directory structure, and implementation guidance. Read it first before any work.

Key Files

  • CLAUDE.md — Architecture, patterns, gotchas
  • docs/planned.md — Complete game design document (~950 lines). Source of truth for all mechanics.
  • docs/npc-lore.md — NPC deep lore bible (5-layer Hearth-Sworn backstories, 514 lines)
  • docs/worldbuilding.md — Surface-level worldbuilding (Legend of Oryn, floor identities)
  • config.py — All game constants with rationale
  • src/db/schema.sql — Full database schema (migrations in src/db/migrations/)

Architecture

  • Python 3.11+, SQLite, Meshtastic Python API, Flask 3.x, Jinja2
  • Docker: python:3.11-slim, /data volume for SQLite DB
  • 6-node mesh topology: EMBR (game), DCRG (broadcast), 4 NPC nodes
  • 150 characters per message — hard ceiling from Meshtastic LoRa
  • 12 dungeon actions/day, 30-day epochs, async-first
  • 828+ testspython3 -m pytest tests/ -x -v

NPC Conversation System

NPCs use runtime LLM calls (the one exception to the "no runtime LLM" rule). Key features:

  • TX Tag System: LLM prefixes responses with [TX:action:detail] for game mechanics (heal, buy, sell, browse, gamble, hint, recap)
  • Session Memory: Per-player per-NPC conversation history with persistent memory summaries
  • Deep Lore: Five-layer backstory system (Surface → Observations → History → Truth → Unspeakable)
    • Trigger word detection pushes toward deeper layers
    • Interaction count tracks conversation depth per player per NPC
    • "Soren" is a Layer 5 nuclear trigger for all 4 NPCs
  • Easter Eggs: Death memory (Maren), daily gamble (Torval), countdown (Whisper), late-epoch vulnerability (Maren), inter-NPC secret (Torval/Whisper)
  • DummyBackend: Keyword-based offline mode for testing without LLM

LLM Configuration

  • Model configured via llm_config table in SQLite DB (not env vars)
  • Currently: gemini-3.1-flash-lite
  • API key stored in DB, manageable via admin panel at /admin/llm
  • No max_output_tokens restrictions — gemini-3.1-flash-lite thinking tokens consume the budget, causing truncation. All backends have token limits removed.
  • Supports: Google (Gemini), Anthropic (Claude), OpenAI-compatible backends

Development Phases (All Complete)

  1. Core Loop — Message handling, parser, player creation, navigation, combat, death, action budget
  2. Economy & Progression — XP, leveling, gold, shops, gear, bank, healer
  3. Social Systems — Broadcasts, barkeep, bounty board, player messages, mail
  4. Epoch Generation — World gen, LLM narrative pipeline, secrets, bounty pools
  5. Endgame Modes — Hold the Line, Raid Boss, Retrieve & Escape, epoch vote
  6. The Breach — Breach zone gen, 4 mini-events (Heist, Emergence, Incursion, Resonance)

Gotchas

  • gemini-3.1-flash-lite thinking tokens count against max_output_tokens — never set token limits
  • NPC greeting path uses complete(), conversation path uses chat() — different code paths
  • npc_memory table stores turn_count for interaction depth tracking
  • Death log table (death_log) tracks monster kills for Maren's memory feature
  • Town actions are always free — never charge dungeon actions in town
  • The design doc (docs/planned.md) is the source of truth — if code contradicts it, code is wrong

Notes

  • All regen/HP/damage numbers are targets — will need playtesting
  • SQLite single file DB, no ORM, raw parameterized SQL
  • Every outbound message must fit 150 chars — the formatter is the final gate
  • Container on CT 109 connects to 6 SIM nodes via TCP (ports 4403)