code wiki / (root) / nx_object_spec.nx

nx_object_spec.nx

buildroot/runtime/nx_object_spec.nx

24152 B692 linesdepth 3pulls 3 transitivereach 2 importersview sourcekind tool
docsdependenciesstructsconstsfunctions

about

nx_object_spec.nx -- per-part object-class spec catalog. CAPABILITY_COMPLETENESS: FULL (for the 32 starter specs; additional specs register via catalog extension at nishi-library/seeds/object_specs.jsonl) User direction 2026-05-16: "expand the concepts into clothing and lots of other patterns our goal is to be beyond s class at validating what we ask is what we get so a dnd sword isnt a bubble wand" Generalises the per-region modesty pattern (nx_modesty_profile) into universal per-part object-class verification: spec = required parts + optional parts + distinguishing negations (parts that MUST NOT appear) Catches near-neighbour-class confusion that silhouette-only classifiers miss. A "sword" with no crossguard + a loop at the end is a BUBBLE_WAND, not a sword. The negations list names what would make this NOT the asked-for class. genealogy_id: substrate_object_spec_validation_2026_05_16 lineage_id: nx_object_spec_v1

dependencies 3 imports · 2 importers

nx_syscalls.nx nx_runtime.nx nx_tier.nx nx_object_spec.nx nx_catalog_id_lookup.nx nx_object_spec_match.nx

imports: nx_syscalls.nxnx_runtime.nxnx_tier.nx

imported by: nx_catalog_id_lookup.nxnx_object_spec_match.nx

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main nx_object_spec_get nx_object_spec_is_valid _spec_build_sword_long sys_mmap _spec_alloc_part_list sys_mmap ↻ _spec_build_bubble_wand sys_mmap ↻ _spec_alloc_part_list ↻ _spec_build_dagger sys_mmap ↻ _spec_alloc_part_list ↻ _spec_build_bow_long sys_mmap ↻ _spec_alloc_part_list ↻ _spec_build_wand_magic sys_mmap ↻ _spec_alloc_part_list ↻ _spec_build_shirt_button sys_mmap ↻ _spec_alloc_part_list ↻ _spec_build_shirt_t sys_mmap ↻ _spec_alloc_part_list ↻ _spec_build_lingerie_bra sys_mmap ↻ _spec_alloc_part_list ↻ _spec_build_orc sys_mmap ↻ _spec_alloc_part_list ↻ _spec_build_elf sys_mmap ↻ _spec_alloc_part_list ↻ _spec_build_dragon sys_mmap ↻ _spec_alloc_part_list ↻ _spec_build_car_sedan sys_mmap ↻ _spec_alloc_part_list ↻

structs

182struct NxObjectSpec

consts

37const NX_PT_BLADE: nx_int = 0
38const NX_PT_EDGE: nx_int = 1
39const NX_PT_POINT: nx_int = 2
40const NX_PT_TANG: nx_int = 3
41const NX_PT_CROSSGUARD: nx_int = 4
42const NX_PT_GRIP: nx_int = 5
43const NX_PT_POMMEL: nx_int = 6
44const NX_PT_HAFT: nx_int = 7
45const NX_PT_HEAD_WEAPON: nx_int = 8
46const NX_PT_LIMB_BOW: nx_int = 9
47const NX_PT_STRING_BOW: nx_int = 10
48const NX_PT_NOCK: nx_int = 11
49const NX_PT_FLETCHING: nx_int = 12
52const NX_PT_HANDLE_STICK: nx_int = 13
53const NX_PT_LOOP: nx_int = 14
54const NX_PT_FILM: nx_int = 15
55const NX_PT_NIB: nx_int = 16
56const NX_PT_TIP: nx_int = 17
57const NX_PT_FLAME: nx_int = 18
60const NX_PT_COLLAR: nx_int = 19
61const NX_PT_NECKLINE: nx_int = 20
62const NX_PT_SLEEVE_SHORT: nx_int = 21
63const NX_PT_SLEEVE_LONG: nx_int = 22
64const NX_PT_CUFF: nx_int = 23
65const NX_PT_HEM: nx_int = 24
66const NX_PT_WAISTBAND: nx_int = 25
67const NX_PT_BUTTON: nx_int = 26
68const NX_PT_ZIPPER: nx_int = 27
69const NX_PT_POCKET: nx_int = 28
70const NX_PT_LAPEL: nx_int = 29
71const NX_PT_HOOD: nx_int = 30
72const NX_PT_BRA_CUP: nx_int = 31
73const NX_PT_BRA_STRAP: nx_int = 32
76const NX_PT_HEAD: nx_int = 33
77const NX_PT_TUSK: nx_int = 34
78const NX_PT_HORN: nx_int = 35
79const NX_PT_WING: nx_int = 36
80const NX_PT_TAIL: nx_int = 37
81const NX_PT_SCALE: nx_int = 38
82const NX_PT_FUR: nx_int = 39
83const NX_PT_POINTED_EAR: nx_int = 40
84const NX_PT_CLAW: nx_int = 41
85const NX_PT_FANG: nx_int = 42
88const NX_PT_WHEEL: nx_int = 43
89const NX_PT_WINDSHIELD: nx_int = 44
90const NX_PT_HEADLIGHT: nx_int = 45
91const NX_PT_LICENSE_PLATE: nx_int = 46
92const NX_PT_MIRROR: nx_int = 47
93const NX_PT_GRILLE: nx_int = 48
94const NX_PT_HANDLEBAR: nx_int = 49
97const NX_PT_WALL: nx_int = 50
98const NX_PT_WINDOW_PANE: nx_int = 51
99const NX_PT_DOOR: nx_int = 52
100const NX_PT_ROOF: nx_int = 53
101const NX_PT_BATTLEMENT: nx_int = 54
102const NX_PT_ARROW_SLIT: nx_int = 55
103const NX_PT_TURRET: nx_int = 56
104const NX_PT_CHIMNEY: nx_int = 57
107const NX_PT_RESERVED_58: nx_int = 58
108const NX_PT_RESERVED_59: nx_int = 59
109const NX_PT_RESERVED_60: nx_int = 60
110const NX_PT_RESERVED_61: nx_int = 61
111const NX_PT_RESERVED_62: nx_int = 62
112const NX_PT_RESERVED_63: nx_int = 63
113const NX_PT_N_PARTS: nx_int = 64
124const NX_SPEC_SWORD_LONG: nx_int = 0
125const NX_SPEC_SWORD_SHORT: nx_int = 1
126const NX_SPEC_DAGGER: nx_int = 2
127const NX_SPEC_SPEAR: nx_int = 3
128const NX_SPEC_AXE_BATTLE: nx_int = 4
129const NX_SPEC_MACE: nx_int = 5
130const NX_SPEC_HAMMER_WAR: nx_int = 6
131const NX_SPEC_BOW_LONG: nx_int = 7
132const NX_SPEC_STAFF_QUARTER: nx_int = 8
133const NX_SPEC_WAND_MAGIC: nx_int = 9
136const NX_SPEC_SHIRT_BUTTON: nx_int = 10
137const NX_SPEC_SHIRT_T: nx_int = 11
138const NX_SPEC_PANTS_JEANS: nx_int = 12
139const NX_SPEC_DRESS_SUNDRESS: nx_int = 13
140const NX_SPEC_COAT_TRENCH: nx_int = 14
141const NX_SPEC_HAT_FEDORA: nx_int = 15
142const NX_SPEC_LINGERIE_BRA: nx_int = 16
145const NX_SPEC_ORC_STANDARD: nx_int = 17
146const NX_SPEC_ELF_HIGH: nx_int = 18
147const NX_SPEC_DRAGON_WESTERN: nx_int = 19
148const NX_SPEC_WEREWOLF: nx_int = 20
151const NX_SPEC_CAR_SEDAN: nx_int = 21
152const NX_SPEC_MOTORCYCLE: nx_int = 22
155const NX_SPEC_CASTLE_MEDIEVAL: nx_int = 23
158const NX_SPEC_BUBBLE_WAND: nx_int = 24
159const NX_SPEC_PEN_BALLPOINT: nx_int = 25
160const NX_SPEC_TORCH: nx_int = 26
161const NX_SPEC_FLASHLIGHT: nx_int = 27
164const NX_SPEC_RESERVED_28: nx_int = 28
165const NX_SPEC_RESERVED_29: nx_int = 29
166const NX_SPEC_RESERVED_30: nx_int = 30
167const NX_SPEC_RESERVED_31: nx_int = 31
168const NX_SPEC_N_SPECS: nx_int = 32
178const NX_SPEC_MAX_REQUIRED: nx_int = 16
179const NX_SPEC_MAX_OPTIONAL: nx_int = 16
180const NX_SPEC_MAX_NEGATIONS: nx_int = 16
193const NX_SPEC_BYTES: nx_size = 56

functions

115func nx_part_is_valid(p: nx_int) -> nx_int
called by 1: main
170func nx_object_spec_is_valid(s: nx_int) -> nx_int
197func _spec_alloc_part_list() -> *nx_int
210func _spec_build_sword_long() -> *NxObjectSpec
243func _spec_build_bubble_wand() -> *NxObjectSpec
273func _spec_build_dagger() -> *NxObjectSpec
298func _spec_build_bow_long() -> *NxObjectSpec
322func _spec_build_wand_magic() -> *NxObjectSpec
350func _spec_build_shirt_button() -> *NxObjectSpec
375func _spec_build_shirt_t() -> *NxObjectSpec
400func _spec_build_lingerie_bra() -> *NxObjectSpec
425func _spec_build_orc() -> *NxObjectSpec
448func _spec_build_elf() -> *NxObjectSpec
472func _spec_build_dragon() -> *NxObjectSpec
500func _spec_build_car_sedan() -> *NxObjectSpec
524func _spec_build_motorcycle() -> *NxObjectSpec
547func _spec_build_castle() -> *NxObjectSpec
573func nx_object_spec_get(spec_id: nx_int) -> *NxObjectSpec
596func nx_object_spec_part_required(spec: *NxObjectSpec, part_id: nx_int) -> nx_int
called by 1: main
606func nx_object_spec_part_negated(spec: *NxObjectSpec, part_id: nx_int) -> nx_int
called by 1: main
618func main() -> nx_int