DRIFTLANDS co-op survival on drifting tides — studio progress

Quick Design Spec: Enemy AI

Type: New Small System Scope: Enemy behaviors, the AI architecture (state machines + separation steering), spawning/aggro/leash rules, per-docking guard variation, and density caps. Does NOT own: the combat interface (combat Rule 11 — telegraphs, damage, stagger, interrupt flags, archetype HP/damage bands, all locked there), spawn positions (LDU's layout), or node/carcass semantics (Harvesting). Date: 2026-08-27 Estimated Implementation: ~5–6 days (3 archetypes on one shared architecture)

Overview

Enemies are the risk half of every docked land's offer. This system gives combat's three locked interface exemplars their actual behavior: simple host-simulated state machines with separation steering — not behavior trees, not utility AI; three archetypes at MVP scale don't justify the machinery (PR tripwire honored: the behaviors are *named below*, and anything beyond them is scope creep by definition). Enemies exist only on docked lands (home is hostile-free by definition), are placed by LDU's deterministic layout, vary per docking through the same variationSeed, and are ephemeral — nothing about them persists, ever.

Core Rules

Tuning Knobs

Knob Default Range Category Rationale
aggroRadius6 u4–10feelBig enough that greed gets punished, small enough that shore harvesting isn't ambushed
leashRadius14 u10–20gateFights stay near the guarded thing; kiting a Bulwark across the land is a choice, not an exploit
deAggroSecs6 s3–12feelUnreachable-target give-up timer
separationRadius1.2 u0.8–2.0feelAnti-blob force radius (prototype fix); too high scatters packs unnaturally
maxUninterruptibleTelegraphsPerTarget1fixed at MVPgateThe lockout cap — combat's CD advisory; raising it is a combat-GDD conversation, not a tune
guardDensityByBandshore 0–1 / mid 1–2 / deep 2–3±1 per band, monotonic across bandscurveThe risk gradient AND the party-scaling lever (Rule 11); monotonicity load-checked

Values live in assets/data/enemy-ai.json; per-archetype movement/attack parameters in per-archetype data validated against combat's load rules (telegraph ≥ 400 ms etc. — combat AC-20 already rejects violations).

Acceptance Criteria

Systems Index

Already tracked as MVP system #12 (Gameplay, quick-spec, "Separation flagged by prototype"). On approval: status → Designed (quick-spec) — the PR "name the behaviors" tripwire is closed, combat's mandated density AC exists, and harvesting OQ8's Enemy AI half has its delivery mechanism (verify at playtest).

Forward refs owned elsewhere: AI tick replication/relevancy → decided by ADR-0012 (2026-09-11): one NetworkObject per enemy, EnemyTransform Server-authority at tick rate, EnemyNet{Phase, AnimFrame, Archetype, ActorId}, no relevancy (ADR-0008); host-only EnemyAI.Tick as step 3; straight-line steering, no pathfinding — originally: netcode ADR; archetype art/silhouettes → art bible §5 + /asset-spec; prosperity scaling values → Tier 1 (via LDU's reserved scalingContext); base-defense behaviors → Tier 1 first-to-slip (explicitly not designed).