Table of Contents

Namespace GrindFest.GameMaster

Classes

DMBridge

File-based bridge for LLM communication.

The game writes request files with world context. An external LLM (Claude in VS Code, or any tool) reads the request, writes a response file with tool calls. The game reads the response and executes the tool calls.

Exchange directory: {persistentDataPath}/DMBridge/ request.json — written by game, read by LLM response.json — written by LLM, read by game narrative.md — persistent DM story notes history.json — conversation history (tool calls + results) system.md — system prompt (regenerated each startup)

DMIntrospector

Discovers configurable properties on GameObjects via reflection and applies property changes from the DM. Separated from DMToolExecutor to keep concerns clean.

DMIntrospector.ConfigProperty

Configurable property descriptor.

DMToolExecutor

Executes DM tool calls from the file bridge. Each tool maps to a game action (spawn, speak, place, etc). Returns a string result describing what happened.

Tools: spawn — spawn creature/NPC place — place structure/object speak — make character say something describe-tile — set biome, name, level on a WorldTile equip — give item to character set-weather — change weather observe — get full world state list-prefabs — list available prefabs by category announce — big center-screen notification configure — set properties on a placed/spawned object inspect — discover configurable properties on an object or prefab

GameMasterAILoopFinal

GameMaster AI Loop - FINAL CORRECT VERSION

This is a SIMPLE chat loop that keeps the external LLM (Claude, etc.) engaged. The LLM has access to MCP tools through the MCP server protocol (not this C# code). This script just maintains conversation and provides periodic prompts.

GameMasterAILoopMCP

Partial class for GameMasterAILoopMCP - manages the AI's todo list. Allows the AI to track multi-step plans, ongoing storylines, and maintain state across iterations.

GameMasterAILoopMCP.TodoItem

Enums

DMProvider
GameMasterAILoopMCP.TodoStatus