code wiki / (root) / nx_wow_moment_detector.nx

nx_wow_moment_detector.nx

buildroot/runtime/nx_wow_moment_detector.nx

14869 B404 linesdepth 3pulls 3 transitivereach 0 importersview sourcekind tool
docsdependenciesstructsconstsfunctions

about

nx_wow_moment_detector.nx -- signature-feature awe-density grader. Per honest audit 2026-05-16: a world can be statistically diverse but still bland if it has no MEMORABLE features. This grader directly counts AWE MOMENTS -- the views that make a player stop and gawk: monumental peaks, cliff edges over deep valleys, hidden alcoves, dramatic vistas. A world with no awe moments is bland; 3-8 per 10x10 km region is incredible. AXES (Q14 [0, Q]; higher = MORE wow): 0. SIGNATURE_PEAKS_PER_REGION: distinct local maxima above 0.85 * max_relief, weighted by isolation (lonely peaks > clumps). Target [3, 8] per region; saturates above. 1. DRAMATIC_VALLEYS: cells below 0.10 * max_relief that have a cell within 5m on the heightmap above 0.50 * max_relief (canyon-edge proximity). 2. ISOLATION_VARIANCE: stddev of nearest-neighbour distances among signature features. Clumped features = boring; spread = wow. 3. SCALE_DIVERSITY: ratio of largest to smallest signature feature size. Worlds with only-huge or only-tiny features score low. 4. RARITY: fraction of features with unique nearest-neighbour bearing (no two adjacent features point the same way). EMITS LAYER_VERDICT (kind = NX_LAYER_KIND_READABILITY). genealogy_id: kaplan_1987_environmental_preference + appleton_1996_landscape_aesthetics + awe_psych_canon lineage_id: nx_wow_moment_detector_5axis_v1

dependencies 3 imports · 0 importers

nx_syscalls.nx nx_tier.nx nx_layer_verdict.nx nx_wow_moment_detector.nx

imports: nx_syscalls.nxnx_tier.nxnx_layer_verdict.nx

imported by: nobody (leaf or entry point)

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

main sys_mmap nx_wow_moment_detect _wm_signature_peaks_q14 _wm_dramatic_valleys_q14 _wm_isolation_var_q14 _wm_scale_diversity_q14 _wm_rarity_q14 sys_mmap ↻ nx_layer_verdict_init nx_layer_verdict_finalize nx_layer_grade_from_axes nx_lv_axis_verdict nx_lv_grade_is_valid

structs

none

consts

41const NX_WM_Q: nx_int = 16384
43const NX_WM_AXIS_SIG_PEAKS: nx_int = 0
44const NX_WM_AXIS_DRAMATIC_VALLEYS: nx_int = 1
45const NX_WM_AXIS_ISOLATION_VAR: nx_int = 2
46const NX_WM_AXIS_SCALE_DIVERSITY: nx_int = 3
47const NX_WM_AXIS_RARITY: nx_int = 4
48const NX_WM_AXIS_COUNT: nx_int = 5

functions

50func _wm_band_score(val: nx_int, lo_q: nx_int, hi_q: nx_int) -> nx_int
65func _wm_signature_peaks_q14(
132func _wm_dramatic_valleys_q14(
203func _wm_isolation_var_q14(
239func _wm_scale_diversity_q14(
266func _wm_rarity_q14(
called by 1: nx_wow_moment_detect calls 1: sys_mmap
304func nx_wow_moment_detect(
326func main() -> i64