Early-level build discount (B4) and start stock 1000 (B5)

Playtest on the live world: first hour feels a bit slow. B4: levels 1-3 of any building take x0.5/x0.67/x0.83 of the time (FORMULAS.earlyLevels/earlyTimeFactor, off at earlyLevels 0). Builds at 1 h (4 sittings/day) 8.9 -> 11.4, at 24 h 16.5 -> 20.4; mid game moves ~1 day head start (default mix), more for 2 sittings/day. B5: start stock 750 -> 1000 (measured separately: mid game unchanged, 60-min first sitting 12.1 -> 15.4 builds at 1 h). Numbers in docs/BALANCE.md.

Tested: npm test 208/208, openapi check, npm run e2e 61/61 (before B5), 50x30-day bot run INVARIANTS OK after B5. NOT tested: humans (bots only, 2 seeds), B4+B5 combined beyond one run, e2e does not exercise the discount (runs at 4000x speed). Not claimed: balanced.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Q2MJaQ5LXAHzGnTDgceT14
This commit is contained in:
jvanvik 2026-10-11 22:38:37 +02:00
parent cc0524de5e
commit bf7af0679c
10 changed files with 194 additions and 12 deletions

View file

@ -252,3 +252,15 @@ client reads the constant. See BALANCE.md section 5.
`events/return.js` stayed silent for empty-carrier return legs AND for shipments that came home with cargo; cargo above the Rack hall cap is
dropped on arrival, so that loss was invisible. Link legs that carry cargo now send `movement_returned` with `cargoLost`
(`test/bot-server-fixes.test.js`). Found by the harness's conservation ledger (BALANCE.md section 6, S1).
## B4 — Early-level build discount (`FORMULAS.earlyLevels` 3, `earlyTimeFactor` 0.5), first hour and first day
Owner playtest at speed 1: "a bit slow for the first hour". The harness (new `stats.early`: builds and Core router 1/6/24 h after joining, from the `buildDone` events)
showed two separate things. A player who plays only the 20-minute first sitting is limited by build time (8.9 builds at 1 h at any cadence); a player who plays the whole
first hour is limited by the starting stock (750 each pays for about 12 builds, income is ~90 an hour in all). A time change can only help the first group and moves the stall
earlier for the second. Chosen: building up to level L takes `f + (1 - f) * (L - 1) / n` of the normal time for L <= n (0.5, 0.67, 0.83 for levels 1 to 3, full from 4), read by
`rules.buildTimeMs` only, so `buildPlan`, the server and the client's time line agree and the balance stays in `data.js`. It is a ramp, not a flat factor, so there is no cliff at level n + 1.
Result (BALANCE.md B4): builds at 1 h 8.9 -> 11.4, at 24 h 16.5 -> 20.4 at 4 sittings a day; mid game is a head start of ~1 day (4 a day) to ~3.6 days (2 a day), not a
different slope (default mix field level +2 % on day 30, +0.1 % on day 60; 2 a day +9 % and +5 %). Lowering `timeGrowth` (1.12) and reaching further up the levels (6 to 10)
were measured and dropped: the first does nothing for the first hour and shifts the mid game, the second multiplies the head start (up to ~11 days) for no first-hour gain.
Not done, and probably the bigger lever for an engaged player: a higher starting stock (1000 of each moved the mid game by 0 days and gave a 60-minute first sitting 15.4 builds at 1 h
instead of 12.1). Left for the owner to call.