code wiki / _hdl_build / nx_vn_living.nx

nx_vn_living.nx

buildroot/runtime/_hdl_build/nx_vn_living.nx

3608 B55 linesdepth 2pulls 2 transitivereach 1 importersview sourcekind librarytopic vn
docsdependenciesstructsconstsfunctions

about

nx_vn_living.nx -- the "LIVING but it still TRACKS" engine for the VN (operator: interactions can be LLM-run IN LIMITS so they feel living, but the story stays on its rails). The hard part is the LIMITS, and they must hold for ANY interaction provider -- a deterministic template now, a sovereign no-float LLM later. Design: - a scene carries CANON: a required FACT (must appear) + a FORBIDDEN string (must never appear) + an authored fallback line that is itself on-canon. - a PROVIDER generates a living interaction line (varied). Could be an LLM. - the VALIDATOR (vl_ok) is THE LIMIT: it accepts the line ONLY if it keeps canon (has fact, lacks forbidden). - vl_interact runs the provider, validates, and FALLS BACK to the authored canon line if it derails -> so the final line is ALWAYS on-canon. An unbounded/hallucinating provider can vary the flavour but CANNOT break the plot. That is "living interactions, story still tracks", made mechanical + provider-agnostic. license_tier: ORIGINAL

dependencies 1 imports · 1 importers

nx_syscalls.nx nx_vn_living.nx nx_vn_living_gate.nx

imports: nx_syscalls.nx

imported by: nx_vn_living_gate.nx

structs

none

consts

none

functions

13func vl_has(hay: *u8, needle: *u8) -> i64
called by 2: vl_okmain
24func vl_cpy(out: *u8, s: *u8) -> i64 { var i: i64 = 0; while s[i] != (0 as u8) { out[i] = s[i]; i = i + 1 } out[i] = 0 as u8; return i }
27func vl_ok(line: *u8, fact: *u8, forbidden: *u8) -> i64
called by 2: vl_interactmain calls 1: vl_has
34func vl_gen_good(seed: i64, out: *u8) -> i64
called by 1: vl_interact calls 1: vl_cpy
42func vl_gen_rogue(seed: i64, out: *u8) -> i64
called by 1: vl_interact calls 1: vl_cpy
49func vl_interact(seed: i64, kind: i64, fact: *u8, forbidden: *u8, authored: *u8, out: *u8, accbox: *i64) -> i64