code wiki / _hdl_build / nx_story_vm.nx
nx_story_vm.nx
buildroot/runtime/_hdl_build/nx_story_vm.nx
about
nx_story_vm.nx -- S-R1: the sovereign DATA-DRIVEN STORY-GRAPH VM (P4 story pillar foundation).
A story is DATA, not control flow: nodes with up to SV_NCH choices; each choice has a target node,
an optional REQUIRED flag (gate the branch) and an optional SET flag (effect). State = current node +
an i64 flag bitmask. This is the engine for dialogue trees, quests, and branching narrative; later
rungs slot LLM-authored text into nodes (P5). Pure integer logic, 100% sovereign. license_tier: ORIGINAL
dependencies 1 imports · 5 importers
imports: nx_syscalls.nx
imported by: nx_coc_engine.nxnx_minigame_capstone_gate.nxnx_plotgen.nxnx_story_quest_gate.nxnx_story_vm_gate.nx
structs
| none |
consts
| 8 | const SV_NCH: i64 = 4 // max choices per node |
functions
| 12 | func sv_choose(ch_target: *i64, ch_req: *i64, ch_set: *i64, cur: i64, choice: i64, flags: *i64) -> i64 |
| 26 | func sv_is_end(node_is_end: *i64, node: i64) -> i64 |
| 31 | func sv_has_flag(flags: *i64, bit: i64) -> i64 |