A read-only line of the game's state for scripted runs #2335

Closed
opened 2026-11-11 15:10:03 +00:00 by mooki000 · 1 comment
mooki000 commented 2026-11-11 15:10:03 +00:00 (Migrated from github.com)

The idea

A script that plays the game through HOS_INPUT_LIVE sees only pictures and the log. Before its next press it cannot tell where Link is, which way the camera looks, or whether a cutscene or a talk holds him, so a scripted test has to wait fixed times.

With HOS_OOT_STATE_FILE=<file> the game would write one line of JSON every few presents: the map, Link's position and facing, the camera's yaw, whether an event plays, loading, age, life, rupees, the A button's action and the music, and on request named GameData flags. Everything is read from the places the debug tools already read; nothing in the game is written, and without the switch nothing is read.

It helps anyone who tests a change in the game without a hand on the controller: a script can wait for "Link stands in Kokiri Forest and no event plays" instead of for 40 seconds.

Anything else

  • Claim: #2292 is open with it and its test. By docs/workflow.md: S3 (1), a feature for developers; confidence 1.0 (it runs here; my own scripted runs use it).
  • Nearby work, so nobody does it twice: #926 (drive a running game over a local socket), #1025 (an MCP server for scripted testing), #1543 (a local scene testing API) and #2048 (a pipeline tour that plays the game). This is the smallest piece of that kind: read-only, a file, no socket. If you would rather have it inside #926 or #2048, I will fold it in there.
  • I can test on Linux with an RTX 4090 (NVIDIA 615.78.08) and an Intel UHD 770 (Mesa 26.2.5), not on Windows or AMD.
### The idea A script that plays the game through `HOS_INPUT_LIVE` sees only pictures and the log. Before its next press it cannot tell where Link is, which way the camera looks, or whether a cutscene or a talk holds him, so a scripted test has to wait fixed times. With `HOS_OOT_STATE_FILE=<file>` the game would write one line of JSON every few presents: the map, Link's position and facing, the camera's yaw, whether an event plays, loading, age, life, rupees, the A button's action and the music, and on request named GameData flags. Everything is read from the places the debug tools already read; nothing in the game is written, and without the switch nothing is read. It helps anyone who tests a change in the game without a hand on the controller: a script can wait for "Link stands in Kokiri Forest and no event plays" instead of for 40 seconds. ### Anything else - Claim: #2292 is open with it and its test. By `docs/workflow.md`: S3 (1), a feature for developers; confidence 1.0 (it runs here; my own scripted runs use it). - Nearby work, so nobody does it twice: #926 (drive a running game over a local socket), #1025 (an MCP server for scripted testing), #1543 (a local scene testing API) and #2048 (a pipeline tour that plays the game). This is the smallest piece of that kind: read-only, a file, no socket. If you would rather have it inside #926 or #2048, I will fold it in there. - I can test on Linux with an RTX 4090 (NVIDIA 615.78.08) and an Intel UHD 770 (Mesa 26.2.5), not on Windows or AMD.
NotRexed commented 2026-11-11 21:31:30 +00:00 (Migrated from github.com)

This is being done in your pull request #2292; closing the issue so the work is tracked in one place there.

This is being done in your pull request #2292; closing the issue so the work is tracked in one place there.
Commenting is not possible because the repository is archived.
No milestone
No assignees
1 participant
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
MagicBeanDev/Hookshot#2335
No description provided.