code wiki / _hdl_build / nx_game_companion.nx
nx_game_companion.nx
buildroot/runtime/_hdl_build/nx_game_companion.nx
about
nx_game_companion.nx -- the OWNERSHIP core of the beat-Veloren companion-collector. The research (SDT +
operator's pillars, gamebench round 14) says Veloren wins on AUTONOMY but has no OWNERSHIP; the
endowment effect (Pokemon) is the pillar we can build because our certified parts already hold its
substrate. This part composes them into a companion whose OWNERSHIP is STRUCTURALLY REAL and MEASURABLE:
- UNIQUE by construction (a per-companion rolled trait vector; no two alike -- the IV/nature equiv),
- PERSISTENT (rides nx_gamesave bit-exact -- what you own does not evaporate),
- INVESTMENT-DIVERGENT (nx_rpgstats: what you pour XP into grows distinct -- the IKEA effect),
- individually addressed (nx_entity_store handle=index+generation; a companion is a THING, not a row).
⚠HONEST SCOPE: these are the measurable PREREQUISITES for the endowment effect, NOT the psychological
bond itself (unmeasurable). A game can have all three and still feel hollow; but a game LACKING them
cannot produce ownership at all -- so they are necessary, gate-able, and red-teamable.
LIB, no main. license_tier: ORIGINAL
dependencies 4 imports · 3 importers
imports: nx_syscalls.nxnx_entity_store.nxnx_rpgstats.nxnx_gamesave.nx
imported by: nx_creature_demo.nxnx_game_breed.nxnx_game_companion_gate.nx
structs
| none |
consts
| 17 | const COMP_MAGIC_2654435761: i64 = 2654435761 |
| 18 | const COMP_MAGIC_40503: i64 = 40503 |
| 20 | const COMP_NC: i64 = 8 // components |
| 21 | const C_SPEC: i64 = 0 |
| 22 | const C_IV0: i64 = 1 |
| 23 | const C_IV1: i64 = 2 |
| 24 | const C_IV2: i64 = 3 |
| 25 | const C_IV3: i64 = 4 |
| 26 | const C_XP: i64 = 5 |
| 27 | const C_LVL: i64 = 6 |
| 28 | const C_NICK: i64 = 7 |
| 29 | const COMP_NSPEC: i64 = 6 |
| 30 | const COMP_XB: i64 = 20 |
| 31 | const COMP_XQ: i64 = 10 |
| 32 | const COMP_HPB: i64 = 10 |
| 33 | const COMP_HPC: i64 = 2 |
| 34 | const COMP_HPL: i64 = 4 |
functions
| 36 | func comp_rng(s: i64) -> i64 called by 1: comp_new_roster |
| 46 | func comp_new_roster(ros: *i64, cap: i64, n: i64, seed: i64, variety: i64) -> i64 |
| 70 | func comp_vec(ros: *i64, h: i64) -> i64 |
| 79 | func comp_dup_count(ros: *i64) -> i64 |
| 99 | func comp_invest(ros: *i64, h: i64, xp: i64) -> i64 |
| 106 | func comp_power(ros: *i64, h: i64) -> i64 |
| 112 | func comp_serialize(ros: *i64, S: *i64) -> i64 |
| 125 | func comp_restore(ros: *i64, cap: i64, S: *i64) -> i64 |