WP-026: The player profile, and ScummVM saves that hold it (Gen 1)

Status: ✅ Done (2026-11-14) Phase: 4 (game logic: saves) Depends on: WP-020 ✅ (exits), WP-021 ✅ (clickables), WP-022 ✅ (movies), WP-023 ✅ and WP-024 ✅ (the inventory, snacks, suspects) Companion EC: none (inline checklist under Exit criteria) Estimated effort: Half-day Pre-flight: pre-flight-WP-026-2026-11-14


Result (2026-11-14)

The reference is wp026_ref.py, written from the trace. It reads the art and object.ini through tools/probe_art.py, and never runs the engine. For the check’s own state, it prints the keys the profile must hold. It also writes an original-format profile for the engine to read, and prints what that must give.

Exit criterion Result
1. The written profile ✅ Both titles match key for key: 128 keys on Showdown, 127 on Phantom, whose first room has no clickable. The state: two items in slots and a third taken and used up, 7 snacks, ARTIE met, movies 1 and 32 seen, an exit taken and a clickable’s state. Read into a new game and written again, the profile’s text is the same, byte for byte.
2. An original profile ✅ All 137 keys match on both titles. The file has CRLF lines and story keys the engine doesn’t model (Difficulty, Whodunit, CluesFound0, SheriffPuzzle), which come back as written. Odd values come back by the original’s rules: MovieHistory5=yes reads as No (only Yes is true), and exits TRUE and on are taken while 0 and yes aren’t; they stay as written. An empty Snacks gives 1, and Nothing slots are empty. The game went to the profile’s StartRoom (Street 1, Souvenir Shop).
3. Live, Showdown ✅ The input played through test_script, minimized, with saves in a scratch folder. In Town Center the sign was picked up, and slot 1 was saved. The gang walked to Street 2. Loading slot 1 brought back Town Center, the sign in the toolbar and gone from the street, and the exit untaken. A new run with save_slot=1, as the launcher starts it, loaded the same state. That is Integration §8’s “saved before a room change, restored after a restart”.
4. Build and diff ✅ Scooby-only build: 0 errors, 0 warnings. Before the rebase onto WP-025, the exit, click, inventory, hint and snack checks were identical to WP-024’s run, hashed. After it, they still end with 0 stuck, and the profile check still matches. Fork commit 22d8978458 stages its 10 files by name, inside engines/scooby/, sits on WP-025’s ec9a31a9f4, and is pushed.

Deviations and gaps:


Goal

Save and load a Gen 1 game in ScummVM, keeping the original’s own record of a game. That record is the player’s profile: an INI file the game writes as it plays.

Background

The original has no save slots (details in scooby-exe):

The fork kept these as session state (WP-020 to WP-024), so they were lost when the game closed.

Scope

In scope (fork, engines/scooby/ only):

Out of scope:

Exit criteria

  1. On both discs, the profile the check writes matches an independent reference key for key, and reading it back writes the same text.
  2. An original-format profile matches the reference after reading and writing. That covers CRLF lines, a lowercase yes, TRUE/on exits, an empty Snacks, Nothing slots and story keys.
  3. Live, in Showdown:
    • a save after a pick-up, then a walk to another room, and a load brings the room and the item back;
    • starting with save_slot loads it too.
  4. Scooby-only build: 0 errors and 0 warnings. The earlier checks are unchanged line for line. The fork diff stays inside engines/scooby/, staged by name.

Deliverables