How maximiliansabino/gm-llm works
This repository is a text-based, LLM-mediated tabletop RPG. A player starts at the main menu, chooses a character and adventure mode, then submits narrated actions or combat commands; the game produces narration and resolves outcomes while recording canonical journey state. Major branches include biome-based combat, open-world exploration, NPC dialogue and memory, and an LLM-judge evaluation tool. Edges are based on README statements and source-index references or excerpts; unsampled implementation details are represented conservatively.
Main entry points: combate.py Combat Engine · main.py Game Loop · llm_backend.py LLM Backend · mundo_aberto.py Open World
Components 22
Game Runtime
- Game Loop
main.py - Setup Prompts
perguntas_iniciais.py - Characters
personagens.py - Items
itens.py - Abilities
habilidades.py
World and Encounters
- Combat Engine
combate.py - Enemy Catalog
inimigos.py - Biome Encounters
biomas.py - Open World
mundo_aberto.py - Biome Map
mapa_biomas.py
Narrative and Memory
- Story and NPCs
historias.py - NPC Memory
memoria_npc.py - Lore Retrieval
memoria_rag.py - Journey State
jornada.py - Session Log
session_log.py
LLM Services
- LLM Backend
llm_backend.py - Backend Config
llm_config.py
Evaluation
- LLM Judge
rpg_judge.py
Other components
- Player
- Ollama
- Groq
- LM Studio
Connections 37
- Player → Game Loop: starts game
README.md - Game Loop → Setup Prompts: sets up
main.py - Game Loop → Characters: selects
main.py - Game Loop → Biome Encounters: starts mode
main.py - Game Loop → Open World: starts mode
main.py - Game Loop → Combat Engine: dispatches combat
main.py - Game Loop → Journey State: loads state
main.py - Game Loop → Session Log: starts logging
main.py - Game Loop → LLM Backend: uses
main.py - Characters → Items: uses items
personagens.py - Characters → Abilities: uses abilities
personagens.py - Biome Encounters → Combat Engine: runs battles
biomas.py - Biome Encounters → Journey State: updates location
biomas.py - Biome Encounters → Story and NPCs: narrates encounters
biomas.py - Biome Encounters → Enemy Catalog: uses enemies
biomas.py - Combat Engine → Characters: updates combatants
combate.py - Combat Engine → Enemy Catalog: resolves attacks
combate.py - Combat Engine → Items: uses equipment
combate.py - Combat Engine → Abilities: uses abilities
combate.py - Combat Engine → Journey State: records outcomes
combate.py - Combat Engine → Session Log: logs calls
combate.py - Combat Engine → LLM Backend: requests evaluation
combate.py - Open World → Biome Map: uses map
mundo_aberto.py - Open World → Combat Engine: dispatches combat
mundo_aberto.py - Open World → Story and NPCs: uses narrative
mundo_aberto.py - Open World → NPC Memory: uses memory
mundo_aberto.py - Open World → Journey State: reads and updates
mundo_aberto.py - Story and NPCs → LLM Backend: requests narration
historias.py - Story and NPCs → Journey State: reads context
historias.py - Story and NPCs → Lore Retrieval: retrieves lore
historias.py - Lore Retrieval → Journey State: reads state
memoria_rag.py - LLM Backend → Backend Config: loads settings
llm_backend.py - LLM Backend → Session Log: records calls
llm_backend.py - LLM Backend → Ollama: sends requests
- LLM Backend → Groq: sends requests
- LLM Backend → LM Studio: sends requests
- LLM Judge → LLM Backend: uses backend
rpg_judge.py