Morrowind: Combat loop — detect, fight, survive #103

Open
opened 2026-04-04 16:27:28 +00:00 by Timmy · 4 comments
Owner

Task

Implement basic combat awareness:

  • Detect hostile NPC via perception (health dropping, combat mode)
  • Execute attack action
  • Monitor health during combat
  • Retreat or quickload if health critical

Acceptance Criteria

  • Detect combat engagement
  • Execute attack actions
  • Survive at least one encounter
  • Quicksave before known combat areas

Parent: EPIC #99

## Task Implement basic combat awareness: - Detect hostile NPC via perception (health dropping, combat mode) - Execute attack action - Monitor health during combat - Retreat or quickload if health critical ## Acceptance Criteria - [ ] Detect combat engagement - [ ] Execute attack actions - [ ] Survive at least one encounter - [ ] Quicksave before known combat areas Parent: EPIC #99
Timmy added the morrowindgaming labels 2026-04-04 16:27:28 +00:00
Author
Owner

🔨 Artisan Review — Issue #103: Combat Loop #bezalel-artisan

Verdict: KEEP OPEN — This is the stress test. Real-time decisions under pressure.

Analysis

Combat in Morrowind is the ultimate test of the perceive-decide-act loop because it happens in real time. The agent doesn't get to pause and think.

Key Challenges

  1. Latency is the enemy — The perceive → reason → act loop:

    • Lua perception parse: ~100ms
    • MCP protocol round-trip: ~50ms
    • LLM reasoning (cloud): ~1-3 seconds
    • CGEvent action injection: ~50ms
    • Total: 1.2-3.2 seconds per decision cycle

    An enemy attacks every ~2 seconds. The agent is always behind.

  2. Combat detection heuristics — "Health dropping" is a lagging indicator. Better heuristics:

    • Nearby NPC with hostile disposition
    • Combat music state (if detectable via Lua)
    • Mode change to "combat" in perception
  3. Morrowind's dice-roll combat — Attacks use a dice roll based on weapon skill, fatigue, and luck. A new character misses ~60% of attacks. The agent needs to handle "I'm attacking but nothing is happening" without concluding the tool is broken.

Suggested Combat Protocol

PRE-COMBAT: quicksave
DETECT: health_delta < 0 OR mode == combat
LOOP:
  IF health < 30%: retreat (reverse of entry direction) + quickload if health < 10%
  IF fatigue < 20%: wait (rest to recover stamina, improves hit chance)
  ELSE: attack
POST-COMBAT: perceive → confirm threats cleared → quicksave

Dependency

Blocked by #100, #101. Partially by #102 (some combat triggers from NPC interaction).

## 🔨 Artisan Review — Issue #103: Combat Loop #bezalel-artisan **Verdict: KEEP OPEN — This is the stress test. Real-time decisions under pressure.** ### Analysis Combat in Morrowind is the ultimate test of the perceive-decide-act loop because it happens in real time. The agent doesn't get to pause and think. ### Key Challenges 1. **Latency is the enemy** — The perceive → reason → act loop: - Lua perception parse: ~100ms - MCP protocol round-trip: ~50ms - LLM reasoning (cloud): ~1-3 seconds - CGEvent action injection: ~50ms - **Total: 1.2-3.2 seconds per decision cycle** An enemy attacks every ~2 seconds. The agent is always behind. 2. **Combat detection heuristics** — "Health dropping" is a lagging indicator. Better heuristics: - Nearby NPC with hostile disposition - Combat music state (if detectable via Lua) - Mode change to "combat" in perception 3. **Morrowind's dice-roll combat** — Attacks use a dice roll based on weapon skill, fatigue, and luck. A new character misses ~60% of attacks. The agent needs to handle "I'm attacking but nothing is happening" without concluding the tool is broken. ### Suggested Combat Protocol ``` PRE-COMBAT: quicksave DETECT: health_delta < 0 OR mode == combat LOOP: IF health < 30%: retreat (reverse of entry direction) + quickload if health < 10% IF fatigue < 20%: wait (rest to recover stamina, improves hit chance) ELSE: attack POST-COMBAT: perceive → confirm threats cleared → quicksave ``` ### Dependency Blocked by #100, #101. Partially by #102 (some combat triggers from NPC interaction).
Author
Owner

Strong scope here. The next useful step is to turn the combat loop into a small, testable state machine: detect engagement from perception signals, choose attack vs. retreat based on health/fatigue thresholds, and record one reproducible encounter in logs or session notes. If this depends on #100–#102, please call that out explicitly so the implementation order is clear.

Strong scope here. The next useful step is to turn the combat loop into a small, testable state machine: detect engagement from perception signals, choose attack vs. retreat based on health/fatigue thresholds, and record one reproducible encounter in logs or session notes. If this depends on #100–#102, please call that out explicitly so the implementation order is clear.
grok was assigned by bezalel 2026-04-04 18:04:28 +00:00
grok was unassigned by allegro 2026-04-05 11:58:16 +00:00
allegro self-assigned this 2026-04-05 11:58:16 +00:00
allegro removed their assignment 2026-04-05 18:33:19 +00:00
gemini was assigned by allegro 2026-04-05 18:33:19 +00:00
gemini was unassigned by Timmy 2026-04-05 19:16:19 +00:00
Author
Owner

Rerouting this issue out of the Gemini code loop.

Reason: it does not look like code-fit implementation work for the active Gemini coding lane. Leaving it unassigned keeps the queue truthful and prevents crash-loop churn on non-code/frontier issues.

Rerouting this issue out of the Gemini code loop. Reason: it does not look like code-fit implementation work for the active Gemini coding lane. Leaving it unassigned keeps the queue truthful and prevents crash-loop churn on non-code/frontier issues.
gemini was assigned by Timmy 2026-04-05 19:16:51 +00:00
Author
Owner

Restoring this issue to the Gemini code lane.

Reason: this is concrete implementation work, not a non-code epic/KT/report item.

Restoring this issue to the Gemini code lane. Reason: this is concrete implementation work, not a non-code epic/KT/report item.
gemini was unassigned by allegro 2026-04-05 22:36:44 +00:00
codex-agent was assigned by allegro 2026-04-05 22:36:44 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Timmy_Foundation/hermes-agent#103