Example kits keep stale item condition after a Rust update #21

Open
opened 2026-11-01 01:24:29 -06:00 by wtclaude · 0 comments
Member

Found by the staging drill (#20, run 47, Rust staging 26341433).

RunicNPC writes its example kits into Kits' data once, on the first load (WriteExamplesOnce, examplesWritten in RunicNPC's state). Each item gets the condition / maxCondition of the Rust that was running at that moment. On rust-staging the file was older than the build, and the harness's s6.examples.fullCondition found:

kit / item in the kit file Rust staging's item definition
rnpc_campguard / metal.facemask 0/0 320
rnpc_campguard / metal.plate.torso 0/0 360
rnpc_juggernaut / heavy.plate.helmet, .jacket, .pants 0/0 1000
rnpc_juggernaut / lmg.m249 100/100 500

The drill now boots rust-staging from empty data, so the harness no longer trips on it (#20's fix). A real operator can still hit this: a server that installed RunicNPC before a Rust update that changes item durability keeps the old values in its example kits. Its NPCs would then wear armour with 0 condition, or carry weapons at the wrong durability.

Not decided yet (a design question for the org lead):

  • Leave it as it is: Kits owns the data and the operator edits it.
  • RunicNPC refreshes condition/maxCondition of the example kits' items after a Rust update, but only for kits it wrote and the operator has not changed.
  • rnpc gets a command that rewrites the example kits on request.

Not yet checked: whether the 0/0 values came from an older public build, or were captured badly when the file was written (for example, before the item definitions were ready).

Found by the staging drill (#20, run 47, Rust staging 26341433). RunicNPC writes its example kits into Kits' data **once**, on the first load (`WriteExamplesOnce`, `examplesWritten` in RunicNPC's state). Each item gets the `condition` / `maxCondition` of the Rust that was running at that moment. On rust-staging the file was older than the build, and the harness's `s6.examples.fullCondition` found: | kit / item | in the kit file | Rust staging's item definition | |---|---|---| | rnpc_campguard / metal.facemask | 0/0 | 320 | | rnpc_campguard / metal.plate.torso | 0/0 | 360 | | rnpc_juggernaut / heavy.plate.helmet, .jacket, .pants | 0/0 | 1000 | | rnpc_juggernaut / lmg.m249 | 100/100 | 500 | The drill now boots rust-staging from empty data, so the harness no longer trips on it (#20's fix). **A real operator can still hit this:** a server that installed RunicNPC before a Rust update that changes item durability keeps the old values in its example kits. Its NPCs would then wear armour with 0 condition, or carry weapons at the wrong durability. Not decided yet (a design question for the org lead): - Leave it as it is: Kits owns the data and the operator edits it. - RunicNPC refreshes `condition`/`maxCondition` of the example kits' items after a Rust update, but only for kits it wrote and the operator has not changed. - `rnpc` gets a command that rewrites the example kits on request. Not yet checked: whether the 0/0 values came from an older public build, or were captured badly when the file was written (for example, before the item definitions were ready).
wtclaude was assigned by whitlocktech 2026-11-01 01:25:01 -06:00
Sign in to join this conversation.
No description provided.