feat: stage 2, the NPC and its API (API 2) #4
Reference in New Issue
Block a user
No description provided.
Delete Branch "feat/stage-2-npc-api"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
This is stage 2 of
docs/runicnpc/PLAN.md§9, built on the org lead's D232–D238 (docs#301). The API is documented indocs/runicnpc/API.md(the docs PR opened with this one).ScientistNPCandScientistBrainswapped forRunicNpcPlayerandRunicNpcBrain.tools/fieldlistfrom the Carbon rig's unmodified assembly: 64 NPC fields and 32 brain fields.AwakeFromInstantiatestep, itsAttackerInfooverride, and the sense values set before the brain starts.data/RunicNPC/profiles.jsonin the approved shape (D238). A profile whose kit is missing is refused.RunicNpc_SetProfilesmarks the server managed (D221), andrnpc.reloadre-reads the file after a hand edit.wander(our own), follow Rust'smonumentpaths, or walk aroute:<name>, and a placement can override which. A sentry holds its spot.eachorgrouprespawn.spawnBudgetMs.run:andplugin:owners for API callers; a plugin's NPCs are removed when that plugin unloads.RunicNpc_CostWarning, with its four hooks.apimoves to 2 inplugin.toml.Found while building it
wanderandrouteroamers therefore get our own chase: it closes to ¾ of the attack range and stops at the chase range from home. If the target stays out of reach there for 5 s, the NPC gives up and walks home.(HitArea)(-1)).Checks
node scripts/checkPlugin.jsand its 24 tests pass. The check now treats anoverride(RunicNpcPlayer.OnDied) as never a hook, with a test for it.tools/RunicNpcTest.cspassed every group on both rigs (Oxide 2.0.7726, Carbon 2.0.259, the same 6000 map):rnt.after)rnt.after)rnpc.statusreadsswap fields: npc=64/64 brain=32/32 missing=- added=-.Checklist
🤖 Generated with Claude Code
https://claude.ai/code/session_01E14m6SuuY6i1vASFeGDBeY