docs(runicnpc): stage 1 measured, D231 #300

Merged
whitlocktech merged 1 commits from docs/runicnpc-stage1 into main 2026-09-30 04:26:48 +00:00
Member

What

This PR records runicnpc/PLAN.md §9, stage 1, as measured. The harness is in runicnpc-rust#3. It ran on both rigs, on one world: the Oxide rig was regenerated to Carbon's 6000/981448696 at 12 GB, as the org lead chose. Costs were measured with the other rig stopped.

  1. The swap works, with one missing step. gameObject.AwakeFromInstantiate() must come before Spawn(), or the brain never starts. The swap takes 9–16 ms, and the NPC fights a player with its kit's weapon. Oxide copies 124 fields where Carbon copies 64, because Oxide makes private fields public, so stage 2 needs a stricter copy rule.
  2. Unsaved NPCs never return after a hard kill and restart, on either rig. A saved control returned as a plain "Scientist".
  3. What Rust's brain honours:
    • Sense values hold only if set before the brain starts.
    • It roams only inside a monument's AI zone. A field roamer stood still for 60 s, so stage 2's roamer needs our own roam state.
    • It never attacks an NPC. IsTarget covers players only, and even with it re-implemented, the AI design never fires.
  4. Navmesh:
    • The check is Rust's Gen2 RustNavMeshHelpers.SamplePosition. It fails until the map's navmesh is built, 8–10 minutes on a first boot.
    • 89% of monument probe points are on the mesh; a player-built floor never is.
    • One check takes 8–14 µs.
  5. Cost (full table in the plan). Oxide and Carbon agree within about 1 ms:
    • 100 idle NPCs add about 1 ms to the median frame.
    • 100 shooting players add about 5 ms, and each NPC then thinks only every 2.5 s. That is Rust's 2 ms AI budget.
    • 100 sensing NPCs cost about 7× more per think.
    • Spawning 100 at once is a 0.5 s hitch.
  6. The death screen and the bridge:
    • The death screen shows the prefab name until the NPC overrides AttackerInfo. Whether that costs the killer's portrait needs a real client.
    • The bridge's player.death still names scientistnpc_roam.
    • A kill of our NPC is only a player.tally, with no NPC identity. Both are stage 4's to fix.

D231 (the org lead): each profile or group decides whether its NPCs target NPCs, and which kinds (scientists, animals, …). This needs our own combat state and sensing, so stage 5 opens with its own spike.

modules/rust/PLAN_REDESIGNS.md: its pointer now reads D214–D231.

Open for the org lead

  • Whether stage 1 is closed. The one item it leaves open is the killer's portrait on the death screen, which needs a player in game.

Checklist

  • AI-assisted: written with Claude Code (Claude Opus 5.5); the commit carries the trailer.

🤖 Generated with Claude Code

https://claude.ai/code/session_01E14m6SuuY6i1vASFeGDBeY

## What This PR records `runicnpc/PLAN.md` §9, stage 1, **as measured**. The harness is in runicnpc-rust#3. It ran on both rigs, on one world: the Oxide rig was regenerated to Carbon's 6000/981448696 at 12 GB, as the org lead chose. Costs were measured with the other rig stopped. 1. **The swap works, with one missing step.** `gameObject.AwakeFromInstantiate()` must come before `Spawn()`, or the brain never starts. The swap takes 9–16 ms, and the NPC fights a player with its kit's weapon. Oxide copies 124 fields where Carbon copies 64, because Oxide makes private fields public, so stage 2 needs a stricter copy rule. 2. **Unsaved NPCs never return** after a hard kill and restart, on either rig. A saved control returned as a plain "Scientist". 3. **What Rust's brain honours:** - Sense values hold only if set before the brain starts. - It roams only inside a monument's AI zone. A field roamer stood still for 60 s, so stage 2's roamer needs our own roam state. - **It never attacks an NPC.** `IsTarget` covers players only, and even with it re-implemented, the AI design never fires. 4. **Navmesh:** - The check is Rust's Gen2 `RustNavMeshHelpers.SamplePosition`. It fails until the map's navmesh is built, 8–10 minutes on a first boot. - 89% of monument probe points are on the mesh; a player-built floor never is. - One check takes 8–14 µs. 5. **Cost** (full table in the plan). Oxide and Carbon agree within about 1 ms: - 100 idle NPCs add about 1 ms to the median frame. - 100 shooting players add about 5 ms, and each NPC then thinks only every 2.5 s. That is Rust's 2 ms AI budget. - 100 sensing NPCs cost about 7× more per think. - Spawning 100 at once is a 0.5 s hitch. 6. **The death screen and the bridge:** - The death screen shows the prefab name until the NPC overrides `AttackerInfo`. Whether that costs the killer's portrait needs a real client. - The bridge's `player.death` still names `scientistnpc_roam`. - A kill of our NPC is only a `player.tally`, with no NPC identity. Both are stage 4's to fix. **D231 (the org lead):** each profile or group decides whether its NPCs target NPCs, and which kinds (scientists, animals, …). This needs our own combat state and sensing, so stage 5 opens with its own spike. `modules/rust/PLAN_REDESIGNS.md`: its pointer now reads D214–D231. ## Open for the org lead - Whether stage 1 is closed. The one item it leaves open is the killer's portrait on the death screen, which needs a player in game. ## Checklist - [x] AI-assisted: written with Claude Code (Claude Opus 5.5); the commit carries the trailer. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01E14m6SuuY6i1vASFeGDBeY
wtclaude added 1 commit 2026-09-30 04:24:17 +00:00
The harness answered all six stage 1 questions on both rigs, on one 6000 world:
the swap needs AwakeFromInstantiate; unsaved NPCs never return; Rust's brain
honours sense values only before it starts, roams only in AI zones and never
attacks NPCs; placement checks use Rust's Gen2 navmesh (89% of monument points,
never a player-built floor); the cost table for 1/10/100 idle and fighting on
Oxide and Carbon; the death screen needs an AttackerInfo override, and the
bridge's frames still name the prefab.

D231: each profile or group decides whether its NPCs target NPCs, and which
kinds, which needs our own combat state and sensing (stage 5 spike).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E14m6SuuY6i1vASFeGDBeY
whitlocktech merged commit c2061d5dda into main 2026-09-30 04:26:48 +00:00
whitlocktech deleted branch docs/runicnpc-stage1 2026-09-30 04:26:49 +00:00
Sign in to join this conversation.
No description provided.