KAZIK/docs/npc-life.md
Artvasil09 881a0061dc Add native NPC visitors with contracts, Clover slots, Pyramid, and party table scenes
Implement 32x32 BFS visitor navigation and daily contracts system with companion .npc journals; add native assembly scenes for Clover slots, Pyramid cards, Blackjack Party and Russian Party; package animation and sprite packs; add comprehensive offline test suites and rebuild shipping binaries.
2026-10-13 09:47:33 +03:00

53 lines
3.2 KiB
Markdown

# Native Visitors and Contracts
The graphical runtime remains MASM. The user's six personality records in
`npc_mind_data.inc` are retained. The visible people now read the positions of
those records instead of a separate, unrelated square-loop animation.
`npc_life.inc` owns bounded 32x32 BFS navigation, millisecond walking with
fractional carry, standing, seated lounge visits, entrance departures and
replacement visitors. All proposed steps check the existing body-clearance,
furniture/stage collision rules, the player and other visitors. A blocked person
stops animating their feet and chooses another destination after waiting.
The six active slots alternate between twelve identities. Standing/walking and
seated poses use the existing interior sprite pack; a full animated transition
into a chair and additional directional interior poses are not implemented yet.
Exterior people use outdoor sprites and long sidewalk routes, not courtyard
pacing or indoor guest sprites.
Press E when the conversation prompt appears. The owned graphical modal has
accept, reward and close commands. Mouse, 1/2, Enter, 0 and Escape work without
console input. The conversation holds the scene while it is open.
Twelve contract types cover played/won rounds of native coin, blackjack, poker,
European roulette, 777 and Durak. The any-round contract also counts Russian
roulette, Buckshot, dice, cups and skill checks. Only settled paid rounds count, with wins
requiring a positive result rather than a push. Progress starts after acceptance;
tasks remain associated with visitor identity even while that person is absent.
Offers rotate with the local calendar and visitors. Rewards range from $150 to
$700 and are capped by the game's existing billion-dollar balance limit.
Each local save has a companion `.npc` journal. It contains a date, bounded
accepted/claimed masks, capped progress and a checksum. Truncated, malformed,
wrong-date and cross-profile journals are not imported. Completed contracts
cannot be claimed twice after closing/reopening the dialog or restarting.
Journal write failures do not award repeatable money. The existing wallet save
and companion journal are separate writes; an abrupt power loss between them
can lose the reward credit, so this is not a transactional banking system.
The original save format and the legacy forty-task daily pool are unchanged.
Native tests exercise ten reachable destinations, equal-time movement at three
update rates, two minutes of body-clearance checks for all six visitors, capped
progress, early/double claims, persistence, profile isolation, day rollover,
mouse dialog commands and Escape. They use only journals inside build fixtures.
`check_npc_life.py --parity` checks three native framebuffer captures and
tested/shipping procedure parity.
## Multiplayer Tables
The user's legacy four-seat poker/personality code is preserved. It is not
called from the graphical casino because it uses console input/output. The
existing native tables remain heads-up. Native three/four-seat poker needs
proper repeated betting turns, ties, all-ins/side pots, exit settlement and
seated opponent rendering before it can replace that loop. Russian roulette
and Buckshot likewise still use their existing two-actor scenes.