games/fort-nash: data-driven trail-kit migration + shared-schema dedup
#33 in Riparion/riparion-retro — merged 2026-06-12
Summary
Migrates fort-nash to the same data-driven architecture as kaintuck: all content and flow live in an embedded fort_nash.ron interpreted through a per-game trail-kit::fortnash schema module, with a golden-trace oracle (golden_trace_is_stable, 0xc26eed8bea10a5f7) holding behavior byte-identical to the hand-written engine.
Single source of truth. Every scalar, table, coefficient, date, checkpoint, event, outcome, minigame param, score, ending, and menu is data. Code retains only what the effect model deliberately can't express — RNG draws and multi-conditional incident flow (run_special events, rider tactics, gunfight tails, mountain passes, illness/cold rolls). The Terrain enum and all scalar consts were deleted and repointed to scenario().
Shared-schema dedup. Byte-identical trail-kit plumbing is now generic and imported by both games (as Tier already was):
SetPiece<G>/SetPieceOption<G>over the per-gameGateenumMinigameSpec<P>over the per-game params enumembed_scenario!macro collapses bothscenario_data.rsloaders
Per-game Effect/Outcome/EffectCtx/apply_effects stay separate (justified: kaintuck carries token-substitution state + catastrophe-gate fields fort-nash lacks).
Review hardening.
scenario_is_self_consistentvalidates every event-tableSpecial/Minigamestring is launchable and everyDie/DieIfBrokecause round-trips throughGameOverCause::from_key— a data typo now fails a test instead of panicking mid-game.- The generic minigame host renders a recoverable
StuckMinigamepanel instead of a blank screen on a param/id desync. - The Trail "Go hunting" button is shown-disabled-with-hint again (not hidden):
SetPieceOptiongainsdisable_gate+disabled_hint.
Test plan
cargo test -p fort-nash— 53 pass incl.golden_trace_is_stable+scenario_is_self_consistentcargo test -p kaintuck— 32 pass, golden trace unchangedcargo test -p trail-kit,cargo clippy(zero warnings),cargo check --target wasm32-unknown-unknownfor both games
Versions: trail-kit 0.1.0→0.1.2, fort-nash 0.1.4→0.1.6, kaintuck 0.1.3→0.1.4.
🤖 Generated with Claude Code
Last updated 2026-06-13
Links to this note
Merged pull requests, newest first.