Status: done (2026-11-11) Priority: 2 Size: M Design ref: design.md, The player, commands and views, Starting a game (11 November); docs/mocks/setup.html (step 2) Goal: Build step 2 of Starting a game as a mode of the game’s own page, in place of the small play offer. Acceptance criteria:
#playOffer: the stage’s other interface is put away as for the menu screens, the map is dragged and zoomed as always, and the camera rests on the suggested pawn’s farm (suggestedPawn)..panel) shows the farm’s icon (farmIcon), its name and village, its food in days (foodDays) and its living members as portraits (faceImg), children among them but disabled (under ADULT). An empty farm or a ruin can be selected and says no one lives there.Sim.successors, or that the line would break); “Can” and “Ahead” as icon chips. Who speaks at the meeting is read from the custom in force in that village, not from a table of the page; the heir shown is the one the game’s succession names.playAs, then the Actions panel and Follow as the offer did). The game starts paused in the mode and takes the speed it had before on leaving.title; no numbers that are not read from st.st.player.pawn); Watch only leaves st.player null; a load does not open it. The tests that relied on #playOffer are moved to the mode.src/sim/ beyond a read-only helper if one is needed; tests/golden.json unchanged. npm run verify once; index.html rebuilt.
Notes:docs/mocks/setup.html; open it in a browser, raise the land, and read its step2, stories, CAN, NEXT, HARD and POS for the look and the words). The mock’s map is a picture and its positions are a rule of its own; here the map is the stage and positions come from the game (hh.holder, Sim.spouseOf, p.role, p.servant, Sim.successors, the customs in force, Culture).st and writes through Sim (AGENTS.md, Conventions): the mode is page state, never saved.src/page/ (play.js, loader.js, input.js, a new page/choose.js if that keeps play.js under its size baseline), src/body.html and src/head.html: run one at a time with other page tasks. VB-340 waits for it.src/page/positions.js (new) reads each living person’s position from the run (hh.holder, Sim.spouseOf, p.retired, p.servant, the first of Sim.heirRanking for heir and heiress; a holder without a spouse who was never wed is “unmarried”, a widowed woman holder “the widow”), its name (a servant’s is Sim.ROLES[p.role].title), the mock’s line on the life, and the Can and Ahead chips; the chips that hang on a custom read Sim.practice of the person’s village (handover, widow, heirCount, heirSex, residence, daughterShare) and “Speaks at the meeting” is added wherever Sim.voiceOf gives a voice under the village’s custom. storyCards(scenario, pressed) builds the archetype cards (buttons with data-story) from storyPeople(scenario), for VB-340 to reuse unchanged. src/page/choose.js (new) is the mode: openChoose (from build in page/loader.js, for a new game only, in place of offerPlay), chooseAt (map clicks, handed over by pick in page/tileinfo.js: a person outdoors, a farm’s name, its house, a field or a meadow), renderChoose (the household and person panel) and closeChoose. The intro’s glide ends on the suggested farm; on a narrow screen the farm is put in the middle of the map’s strip. While choosing, body.choosing puts away the HUD, dock, sheets, toasts and map tools as the menu screens do, and the keyboard keeps only the map’s keys (page/input.js). Back opens New archipelago with the game left paused in the mode (Back to game returns to it); Watch only and Play as give the game the speed it had (the last speed chosen, if it was paused). Play as calls playAs, then focusPawn and the Actions panel, as the offer did (Follow is not switched on, as the offer did not). #playOffer and offerPlay are gone; play.js is 385 lines. No change under src/sim/.npm test passes (3 targets out, as on main); npm run verify: 117 scripts passed (every hard check, golden file among them); 11 targets out, all simulation cost targets (history., scaling.), which this change cannot move: it changes no module under src/sim/ and nothing the headless runs load. The page’s tests: tests/smoke.js (jsdom) checks a new game opens the mode with a household and archetypes and Watch only closes it; tests/browser.js checks the mode opens paused on the suggestion, a holder, with no pawn played, a click on another farm’s house on the map chooses it, a click on one of its grown people chooses them, Play as plays that pawn, closes the mode, opens the Actions panel and restores the speed; tests/browser-mobile.js checks at 390 px the order map, household, archetypes, the bar at the bottom of the screen, no sideways scroll, the dock put away, and Watch only (no pawn, speed back); tests/browser-saves.js plays the suggestion through the mode, checks a load does not open it and Watch only after Start a new game leaves st.player null; tests/browser-speed.js closes the mode with Watch only. tests/golden.json unchanged. Screenshots: docs/img/vb339-choose.jpg (heirs, seed 7, tiny: the heiress chosen from her card), docs/img/vb339-choose-phone.jpg (populous, seed 7, tiny, 400 px).