chore(tools): the stage 1 harness, RunicNpcHarness.cs #3

Merged
whitlocktech merged 1 commits from feat/stage-1-harness into edge 2026-09-30 04:26:34 +00:00
Member

What

tools/RunicNpcHarness.cs is a developer plugin, never shipped. It measured the six questions stage 2 depends on (docs/runicnpc/PLAN.md §9, stage 1) on both rigs, on the same 6000/981448696 world:

Command Question
rnh.swap Does the subclass swap spawn, walk, fight and die cleanly?
rnh.save plant → hard kill → rnh.save check Does enableSaving = false hold? (Five unsaved, one saved control, matched by net id.)
rnh.tune, rnh.roam What Rust's brain honours, and when.
rnh.nav Navmesh coverage at 144 monuments, and on a player-built floor.
rnh.cost [window] 1/10/100 idle, 100 shooting players, 100 sensing NPCs: frame time, time per think, think interval.
rnh.dummy The name on the death screen, and what the bridge publishes.

It spawns stand-in players as targets, at the org lead's suggestion: player.prefab with a made-up user id (11400000001 and up), so IsNpc is false. It needs a hidden Kits kit, rnhrevolver, which is documented in its header. The README's tools/ row now names it.

The measured answers are in docs#300 (the docs PR opened with this one).

Worth knowing from the code

  • go.AwakeFromInstantiate() before Spawn(): without it the brain never starts.
  • RustNavMeshHelpers.SamplePosition: Rust's own Gen2 navmesh. Unity's NavMesh sees nothing in the open world.
  • An AttackerInfo override: needed for the name to reach the death screen.
  • IAISenses / IAIAttack re-implemented, and a harness-only attack call. These are what showed that Rust's AI design never fires at an NPC (D231, stage 5).

Checks

  • node scripts/checkPlugin.js and its tests pass; they read plugin/ only.
  • The harness compiled and ran on both rigs: Oxide 2.0.7726 and Carbon 2.0.259.
  • Both rigs are cleaned afterwards: the harness and its data are removed, and each Kits file is restored from backup. RunicNPC v0.1.0 is still loaded.

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 `tools/RunicNpcHarness.cs` is a developer plugin, never shipped. It measured the six questions stage 2 depends on (`docs/runicnpc/PLAN.md` §9, stage 1) on both rigs, on the same 6000/981448696 world: | Command | Question | |---|---| | `rnh.swap` | Does the subclass swap spawn, walk, fight and die cleanly? | | `rnh.save plant` → hard kill → `rnh.save check` | Does `enableSaving = false` hold? (Five unsaved, one saved control, matched by net id.) | | `rnh.tune`, `rnh.roam` | What Rust's brain honours, and when. | | `rnh.nav` | Navmesh coverage at 144 monuments, and on a player-built floor. | | `rnh.cost [window]` | 1/10/100 idle, 100 shooting players, 100 sensing NPCs: frame time, time per think, think interval. | | `rnh.dummy` | The name on the death screen, and what the bridge publishes. | It spawns **stand-in players** as targets, at the org lead's suggestion: `player.prefab` with a made-up user id (11400000001 and up), so `IsNpc` is false. It needs a hidden Kits kit, `rnhrevolver`, which is documented in its header. The README's `tools/` row now names it. The measured answers are in docs#300 (the docs PR opened with this one). ## Worth knowing from the code - **`go.AwakeFromInstantiate()` before `Spawn()`:** without it the brain never starts. - **`RustNavMeshHelpers.SamplePosition`:** Rust's own Gen2 navmesh. Unity's `NavMesh` sees nothing in the open world. - **An `AttackerInfo` override:** needed for the name to reach the death screen. - **`IAISenses` / `IAIAttack` re-implemented,** and a harness-only attack call. These are what showed that Rust's AI design never fires at an NPC (D231, stage 5). ## Checks - `node scripts/checkPlugin.js` and its tests pass; they read `plugin/` only. - The harness compiled and ran on both rigs: Oxide 2.0.7726 and Carbon 2.0.259. - **Both rigs are cleaned afterwards:** the harness and its data are removed, and each Kits file is restored from backup. RunicNPC v0.1.0 is still loaded. ## 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:23:58 +00:00
chore(tools): the stage 1 harness, RunicNpcHarness.cs
All checks were successful
PR Checks / plugin-checks (pull_request) Successful in 6s
18c90961ba
A developer plugin, never shipped, that measured the six questions stage 2
depends on (docs/runicnpc/PLAN.md §9, stage 1) on both rigs: the subclass
swap, saving across a hard kill, what Rust's brain honours, navmesh coverage,
the cost of 1/10/100 idle and fighting, and the death screen and bridge frames.

It spawns stand-in players (player.prefab, a made-up user id, IsNpc false) as
targets, at the org lead's suggestion. It needs a hidden Kits kit, rnhrevolver.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E14m6SuuY6i1vASFeGDBeY
whitlocktech merged commit 914047f1b0 into edge 2026-09-30 04:26:34 +00:00
whitlocktech deleted branch feat/stage-1-harness 2026-09-30 04:26:35 +00:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: RunicGateway/runicnpc-rust#3
No description provided.