From 67068aafd78067c5a1d9fb91a7ffcfdea33cea56 Mon Sep 17 00:00:00 2001 From: Perplexity Computer Date: Fri, 27 Mar 2026 23:22:35 +0000 Subject: [PATCH] feat: add externalized MCP config for Morrowind MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit All gameplay tuning — tool names, iteration guards, perception settings, trajectory logging — editable without code changes. Changes take effect next Hermes session. --- morrowind/mcp_config.yaml | 86 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 86 insertions(+) create mode 100644 morrowind/mcp_config.yaml diff --git a/morrowind/mcp_config.yaml b/morrowind/mcp_config.yaml new file mode 100644 index 0000000..f00a319 --- /dev/null +++ b/morrowind/mcp_config.yaml @@ -0,0 +1,86 @@ +# ═══════════════════════════════════════════════════════════════════════ +# Morrowind MCP — Runtime Configuration +# ═══════════════════════════════════════════════════════════════════════ +# Edit this file to tune Timmy's Morrowind gameplay without code changes. +# Hermes loads this at session start. Changes take effect next session. +# +# Location: ~/.timmy/morrowind/mcp_config.yaml +# ═══════════════════════════════════════════════════════════════════════ + +# ── Server Identity ─────────────────────────────────────────────────── +# The key under mcp_servers in config.yaml. Hermes prefixes every tool +# with "mcp_{server_key}_", so shorter = less room for the model to +# hallucinate. If you rename this, also update config.yaml to match. +server_key: mw + +# ── Tool Names ──────────────────────────────────────────────────────── +# Exact tool names Hermes registers. Injected into the context file +# so the model never has to guess. Update if you add tools to +# mcp_server.py or change the server_key above. +tools: + - name: mcp_mw_perceive + hint: "Read game world state: position, health, nearby NPCs/doors/items" + - name: mcp_mw_status + hint: "Check if OpenMW is running" + - name: mcp_mw_move + hint: "Move player — direction: forward|backward|left|right|turn_left|turn_right, duration in seconds" + - name: mcp_mw_action + hint: "Game action — activate|jump|attack|journal|quicksave|quickload|sneak|wait" + - name: mcp_mw_screenshot + hint: "Take a screenshot for vision analysis" + +# ── Gameplay Guards ─────────────────────────────────────────────────── +# Caps and safety rails. All optional — comment out to disable. +guards: + # Max consecutive tool errors before Timmy should stop and reflect. + # Prevents the "30 iterations of Method not found" loop. + max_consecutive_errors: 3 + + # Max total MCP calls per session. 0 = unlimited. + max_mcp_calls_per_session: 0 + + # Seconds to pause between action calls (prevents input spam). + action_cooldown_seconds: 0.5 + + # Auto-quicksave every N action cycles. 0 = never. + auto_quicksave_interval: 25 + +# ── Perception ──────────────────────────────────────────────────────── +perception: + # How often the Lua engine writes perception blocks (seconds). + # Must match the timer interval in your OpenMW Lua script. + lua_tick_interval: 2.0 + + # Path to OpenMW log (source of perception data). + # Tilde-expanded at runtime. + openmw_log: "~/Library/Preferences/openmw/openmw.log" + + # Screenshot directory. + screenshot_dir: "~/.timmy/morrowind/screenshots" + +# ── Gameplay Tuning ─────────────────────────────────────────────────── +gameplay: + # Default move duration when not specified. + default_move_duration: 1.0 + + # Default model for gameplay sessions (empty = use config.yaml default). + model: "" + + # System prompt additions for gameplay sessions. + # Injected after SOUL.md, before the conversation. + system_prompt_suffix: | + You are playing Morrowind via MCP tools. + Use EXACT tool names from your context — never abbreviate or guess. + If a tool call fails, check the name against your available tools before retrying. + Perceive before acting. Quicksave before risky moves. + +# ── Trajectory Logging ──────────────────────────────────────────────── +trajectories: + # Log every perception-action pair for DPO training. + enabled: true + + # Directory for trajectory JSONL files. + dir: "~/.timmy/morrowind/trajectories" + + # Max file size before rotation (MB). 0 = no rotation. + max_file_mb: 50