feat(input): "!place X Y Z" in the live input puts Link at a position in the map he is in #1351

Open
mooki wants to merge 1 commit from mooki/Longshot:live-place into main
Member

Type: feat · Risk: low · Tested on: Linux (Arch, kernel 7.2.15), RTX 4090 (NVIDIA 615.78.08) · Needs: Windows, any GPU (a !place line in a real run)

Why

A bug report that says where Link was (the map, and x, y and z) cannot be followed by a tester today without walking there, and a test scenario or scripted run that has to start at one exact spot (the automated test player of #1198 is one) has no way to say so. The Debug tab's Teleport takes Link to a map's entrance, and Mark position and Return to mark only go back to a spot Link marked himself. This adds one line for the live input file (HOS_INPUT_LIVE), !place X Y Z, that puts Link at that position in the map he is in. A tester pastes the numbers of a report's place line into it. The Bug report's place: line (a separate change, not in this PR) prints the same numbers: metres, the frame of the control bridge's pos, one decimal, so a pasted position is within 0.09 m of where the player stood.

What changed

!place X Y Z is a new line for the live input file, next to !cheat. The host takes three finite numbers, makes them the mark of the Debug tab's Return to mark and runs that return at Link's next update, so the game's own position change moves him and the log says cheats: returned to X Y Z. Any other line (two numbers, nan, inf, letters, no numbers, a longer command that starts the same) is ignored. It needs neither HOS_OOT_CHEATS nor the Debug tools row.

  • host/nn_hid.c: the live input's reader parses !place <x> <y> <z> beside !cheat: sscanf of three floats, each tested finite, then the three are stored and one request is raised (release store).
  • host/hos_main.c: oot_update_player_cheats takes the request (acquire exchange) when no other action is waiting, copies the position into the return to mark's mark, marks the actor and controller as the mark's own, and runs the existing return to mark (action 3) at the same update. The flight, mark and return code is unchanged.
  • tests/input_background_test.c, tests/test_input_background.py: a new live-place case runs the real read_input against a live file: a good line stores its three numbers and asks once; the six look-alike or malformed lines leave the stored numbers and the request alone.
  • docs/development.md: the HOS_INPUT_LIVE row says what !place takes and does.

What it does not do:

  • It does not set Link's facing: the return to mark does not turn him.
  • It does not change the map: it places Link in the map he is in, so teleport first for another map.
  • It does not wait for or work around an event or a load: the request is taken at Link's next update, as !cheat is, and a position inside a wall or over a drop is accepted as asked (the game then does what it does with Link). None of these was tried.
  • If the game has no controller for Link at that update (he is not being updated), the request is dropped and the log has no cheats: returned to line; a driver tells by that line (read from the code, not tried).
  • Two !place lines read in the same 30 ms poll: the last one wins.
  • It replaces the Debug tab's mark: Return to mark afterwards goes to the placed position, until the next Mark position.

Measurements

Nothing to time: the only cost when no !place line is sent is one atomic exchange of an integer per update of Link; what was checked is that it works, in Testing.

Flags and settings

None. !place is a line in the live input file, not a RX_, HOS_ or LONGSHOT_ switch, a menu row or an ini key.

Testing

Tested: Linux (Arch, kernel 7.2.15), RTX 4090 (NVIDIA 615.78.08), i9-13900K, headless, 2026-11-16; main @ 8e9cfc3a2 and this PR @ d8277decf (based on that main; not rebased onto the six commits main has gained since).

  • The new game-free test, both ways. tests/test_input_background.py has the new case live-place. On main's host/nn_hid.c it fails: FAIL:391 hos_oot_place_ask == 1 && hos_oot_place[0] == 1.5f && hos_oot_place[1] == 2.0f && hos_oot_place[2] == -3.25f (the line is never read). With this PR the whole file passes, ending PASS: the live input's !place stores a finite position and asks once; malformed lines are ignored.

  • The whole suite, python -I -B tests/run_all.py --jobs 6 --strict, in a fresh home, once on this PR and once on main @ 8e9cfc3a2. This PR: 657 passed, 39 failed, 17 skipped. Main: 656 passed, 40 failed, 17 skipped. The 39 that fail here fail on main too, and are not this PR's: test_bug_report_defaults, test_cpu_report, test_crt_options, test_damage_debug_menu, test_display_startup_failure, test_dlss_feature_size, test_failed_compile_keeps_objects, test_framegen_preset, test_fsr_uniform_ownership, test_guest_imported, test_hud_layout_row, test_import_reach, test_invalidate_vcore, test_linux_preflight, test_linux_pressure, test_linux_update, test_menu_i18n, test_mirror_budget, test_missing_nup, test_mods_size_table, test_nonuniform_image_arrays, test_parallel_init_order, test_pending_guest_import, test_pipeline_play_cache, test_present_thread, test_profiling_mode, test_readback_timeout_source, test_replay_write_order, test_rumble_menu, test_run_all_changed, test_slow_frames, test_staging_burst, test_target_image_pool, test_tested_configurations, test_upscaler_round_trip, test_upscaler_rows, test_vcore_escape, test_vk_occlusion_queries, test_walk_key. (Main also failed test_bake_skeleton in its run; it passes on this PR.) The rule tests this change could touch pass: test_input_background, test_pipeline_tour (it reads the !cheat line in host/nn_hid.c), test_debug_tools_linux, test_flight_yields_to_events, test_doc_anchors, test_env_on, test_readme_menu_rows. test_menu_i18n fails on main as well (pt-BR: 583 != 582).

  • Linux build. A full make_game.py build of this PR @ d8277decf exited 0 (7 min 10 s: the game translated again from this checkout's sources; 104 of the 517 compiled files were new, the rest came from an object cache of an earlier build with the same compiler), @@done. The build did not prepare shaders; the game run's first stage did (below).

  • Windows, compiled, not run. The Windows-target syntax check of the changed fixture (tests/input_background_test.c, llvm-mingw 20261104): PASS, stopped before running it. A cross-build on Linux with the same llvm-mingw (Clang 23.1.5) and the project's own build plan: the renderer DLL linked, and 61 of 61 host sources compiled for Windows, host/hos_main.c and host/nn_hid.c among them (both new, not cached), with 0 warnings under the project's flags (-Wno-everything, so that is not a warning-clean claim). The game executable was not linked (no Windows lift here), and nothing ran on Windows.

  • In the game, three maps, one run. A hold of one game run on this PR's full build @ d8277decf (a first stage prepared the shaders, 353 s; then the game, started from a copied save with only HOS_CONTROL and HOS_INPUT_LIVE: guest memory off, no HOS_OOT_CHEATS, the Debug tools row Off). In Kokiri Forest, Hyrule Field and the Deku Tree (child Link) the driver teleported Link in, read his position, walked him about 4.8 m, read it again, then sent !place back to the first position and on to the second, reading his position for 2 s after each and taking a picture. A seventh warp teleported into the Deku Tree first and then placed him.

    Map Warp Result Link's distance from the asked position, 2 s later
    Kokiri Forest back to the first position verified 0.00 m
    Kokiri Forest on to the second verified 0.00 m
    Hyrule Field back to the first position verified 0.00 m
    Hyrule Field on to the second verified 0.00 m
    Deku Tree back to the first position verified 0.00 m
    Deku Tree on to the second verified 0.00 m
    Deku Tree after a teleport of its own verified 0.00 m

    Every warp has both lines in longshot_log.txt, in this order, with the asked numbers (shown here as X Y Z): 7 !place lines, 7 returns, none missing or extra:

    [hos ...] hid: live command at 28.4 s: !place X Y Z
    [hos ...] cheats: returned to X Y Z
    

    The run ended by the game's quit: exit 0, fatal=0 crash=0 devlost=0, no kernel or driver lines (kernel=0 nvrm=0), 5,675 frames, headless on the RTX 4090 with the PC busy, so its frame rate says nothing. Pictures, each after the first !place of a map (Link stands where it was asked; the HUD and the map show the right place): live-place-kokiri-forest.jpg (Kokiri Forest), live-place-hyrule-field.jpg (Hyrule Field, in a tunnel mouth), live-place-deku-tree.jpg (Deku Tree, 1F). The same three maps gave 6 of 6 warps at 0.00 m on a private build of an older commit with the same patch.

Kokiri Forest after the first !place: child Link on the forest path where the numbers put him, the minimap showing Kokiri Forest.

Hyrule Field after the first !place: Link in a tunnel mouth, the minimap showing Hyrule Field.

Deku Tree after the first !place: Link on the first floor, the dungeon map showing 1F.

Not tested:

  • Windows: !place has not run on Windows; the changed fixture and the host were only compiled for it (above).
  • Other GPUs (AMD, Intel) and the Steam Deck: no run. The change does not touch the renderer, but nothing was run there.
  • Adult Link, and maps other than the three above.
  • A position in a wall, below the floor, over a drop or outside the map; a line sent during a cutscene or a load; two lines in one poll.
  • Facing: it is not set (the Debug tab's return to mark does not turn Link); the run only looked at where he stood.

Must be tested:

  • Windows, any GPU (by hand, or a Windows request to the Test Farm for !place in the live input): start the game with HOS_INPUT_LIVE=<file> (the control bridge's status for Link's position), load a save in Kokiri Forest, append the line !place X Y Z to the file with three numbers a few metres from where Link stands, and expect hid: live command ... !place ... and cheats: returned to X Y Z in longshot_log.txt, and Link standing at the asked place a second later (his pos equal to the numbers).

Risks

What could break: Only a !place line in the live input file does anything new, and that file is a test run's, not a player's. With no such line the host's Link update takes one more atomic exchange of an integer each time. A position that is wrong for the map (inside a wall, below the floor, over a drop) is taken as asked and the game then does what it does with Link; the command does not check the map. It reuses the Debug tab's return to mark, so it replaces that mark: Return to mark in the tab goes to the placed position until the next Mark position.

Turning it off: revert the commit; with no !place line in the live input file nothing changes.

Compatibility: Nothing changes: no save, longshot_options.ini, cache, MkwVkHost or builder change.

Issues

See #1198 (#1198): the automated test player, which needs to start a scenario at a given place.

Checklist

Everyone

  • One topic.
  • The title is a Conventional Commit (type(scope): description) of the status line's type.
  • Why gives the reason plainly and links the issues that fit (the tracker searched).
  • Tested on my own PC where it runs (in the game, for a change the game runs), as Testing's Tested says; what
    can't be run by hand is in Testing's Not testable by hand, with why.
  • Measurements has a verdict, or one line saying why there is nothing to measure.
  • Nothing gets worse that I know of: any cost (speed, latency, memory, a setup that worked before) is measured and
    in Risks.
  • Testing names what was tested, what wasn't, and what must still be tested, where and how.
  • Rebased on current main (544229a26): the branch is one commit on top of it, the game-free input test passes after the rebase (python -I -B tests/test_input_background.py). The game run and the full build were on the commit before the rebase (main @ 8e9cfc3a2); the six commits between touch host/hos_main.c and docs/development.md away from these lines and the rebase had no conflict. A rebuild on the new base is not done.
  • python -I -B tests/run_all.py passes (any failure that also fails on main is named): the 39 failures are main's own and named in Testing.
  • No game files, dumps, build output or generated files.
  • third_party/ untouched (a new folder with a PROVENANCE.md instead).
  • The license is OK: GPL-3.0-or-later, nothing incompatible and nothing decompiled.

When it applies

  • AI assistance recorded with Assisted-by: / Co-Authored-By: trailers.
  • A game-free test added for the fix, failing on main and passing here.
  • A check under tests/ that reads changed source updated in this PR, not weakened.
  • Host code builds on both Windows (llvm-mingw) and Linux, with UTF-8 paths.
  • Docs updated.

New on this forge; not opened on GitHub.

**Type:** feat · **Risk:** low · **Tested on:** Linux (Arch, kernel 7.2.15), RTX 4090 (NVIDIA 615.78.08) · **Needs:** Windows, any GPU (a `!place` line in a real run) ## Why A bug report that says where Link was (the map, and x, y and z) cannot be followed by a tester today without walking there, and a test scenario or scripted run that has to start at one exact spot (the automated test player of https://git.magicbean.dev/MagicBeanDev/Longshot/issues/1198 is one) has no way to say so. The Debug tab's Teleport takes Link to a map's entrance, and Mark position and Return to mark only go back to a spot Link marked himself. This adds one line for the live input file (`HOS_INPUT_LIVE`), `!place X Y Z`, that puts Link at that position in the map he is in. A tester pastes the numbers of a report's place line into it. The Bug report's `place:` line (a separate change, not in this PR) prints the same numbers: metres, the frame of the control bridge's `pos`, one decimal, so a pasted position is within 0.09 m of where the player stood. ## What changed `!place X Y Z` is a new line for the live input file, next to `!cheat`. The host takes three finite numbers, makes them the mark of the Debug tab's Return to mark and runs that return at Link's next update, so the game's own position change moves him and the log says `cheats: returned to X Y Z`. Any other line (two numbers, `nan`, `inf`, letters, no numbers, a longer command that starts the same) is ignored. It needs neither `HOS_OOT_CHEATS` nor the Debug tools row. - `host/nn_hid.c`: the live input's reader parses `!place <x> <y> <z>` beside `!cheat`: `sscanf` of three floats, each tested finite, then the three are stored and one request is raised (release store). - `host/hos_main.c`: `oot_update_player_cheats` takes the request (acquire exchange) when no other action is waiting, copies the position into the return to mark's `mark`, marks the actor and controller as the mark's own, and runs the existing return to mark (action 3) at the same update. The flight, mark and return code is unchanged. - `tests/input_background_test.c`, `tests/test_input_background.py`: a new `live-place` case runs the real `read_input` against a live file: a good line stores its three numbers and asks once; the six look-alike or malformed lines leave the stored numbers and the request alone. - `docs/development.md`: the `HOS_INPUT_LIVE` row says what `!place` takes and does. What it does not do: - It does not set Link's facing: the return to mark does not turn him. - It does not change the map: it places Link in the map he is in, so teleport first for another map. - It does not wait for or work around an event or a load: the request is taken at Link's next update, as `!cheat` is, and a position inside a wall or over a drop is accepted as asked (the game then does what it does with Link). None of these was tried. - If the game has no controller for Link at that update (he is not being updated), the request is dropped and the log has no `cheats: returned to` line; a driver tells by that line (read from the code, not tried). - Two `!place` lines read in the same 30 ms poll: the last one wins. - It replaces the Debug tab's mark: Return to mark afterwards goes to the placed position, until the next Mark position. ## Measurements Nothing to time: the only cost when no `!place` line is sent is one atomic exchange of an integer per update of Link; what was checked is that it works, in Testing. ### Flags and settings None. `!place` is a line in the live input file, not a `RX_`, `HOS_` or `LONGSHOT_` switch, a menu row or an ini key. ## Testing **Tested:** Linux (Arch, kernel 7.2.15), RTX 4090 (NVIDIA 615.78.08), i9-13900K, headless, 2026-11-16; main @ 8e9cfc3a2 and this PR @ d8277decf (based on that main; not rebased onto the six commits main has gained since). - **The new game-free test, both ways.** `tests/test_input_background.py` has the new case `live-place`. On main's `host/nn_hid.c` it fails: `FAIL:391 hos_oot_place_ask == 1 && hos_oot_place[0] == 1.5f && hos_oot_place[1] == 2.0f && hos_oot_place[2] == -3.25f` (the line is never read). With this PR the whole file passes, ending `PASS: the live input's !place stores a finite position and asks once; malformed lines are ignored`. - **The whole suite**, `python -I -B tests/run_all.py --jobs 6 --strict`, in a fresh home, once on this PR and once on main @ 8e9cfc3a2. This PR: 657 passed, 39 failed, 17 skipped. Main: 656 passed, 40 failed, 17 skipped. The 39 that fail here fail on main too, and are not this PR's: test_bug_report_defaults, test_cpu_report, test_crt_options, test_damage_debug_menu, test_display_startup_failure, test_dlss_feature_size, test_failed_compile_keeps_objects, test_framegen_preset, test_fsr_uniform_ownership, test_guest_imported, test_hud_layout_row, test_import_reach, test_invalidate_vcore, test_linux_preflight, test_linux_pressure, test_linux_update, test_menu_i18n, test_mirror_budget, test_missing_nup, test_mods_size_table, test_nonuniform_image_arrays, test_parallel_init_order, test_pending_guest_import, test_pipeline_play_cache, test_present_thread, test_profiling_mode, test_readback_timeout_source, test_replay_write_order, test_rumble_menu, test_run_all_changed, test_slow_frames, test_staging_burst, test_target_image_pool, test_tested_configurations, test_upscaler_round_trip, test_upscaler_rows, test_vcore_escape, test_vk_occlusion_queries, test_walk_key. (Main also failed `test_bake_skeleton` in its run; it passes on this PR.) The rule tests this change could touch pass: `test_input_background`, `test_pipeline_tour` (it reads the `!cheat` line in `host/nn_hid.c`), `test_debug_tools_linux`, `test_flight_yields_to_events`, `test_doc_anchors`, `test_env_on`, `test_readme_menu_rows`. `test_menu_i18n` fails on main as well (pt-BR: 583 != 582). - **Linux build.** A full `make_game.py` build of this PR @ d8277decf exited 0 (7 min 10 s: the game translated again from this checkout's sources; 104 of the 517 compiled files were new, the rest came from an object cache of an earlier build with the same compiler), `@@done`. The build did not prepare shaders; the game run's first stage did (below). - **Windows, compiled, not run.** The Windows-target syntax check of the changed fixture (`tests/input_background_test.c`, llvm-mingw 20261104): PASS, stopped before running it. A cross-build on Linux with the same llvm-mingw (Clang 23.1.5) and the project's own build plan: the renderer DLL linked, and 61 of 61 host sources compiled for Windows, `host/hos_main.c` and `host/nn_hid.c` among them (both new, not cached), with 0 warnings under the project's flags (`-Wno-everything`, so that is not a warning-clean claim). The game executable was not linked (no Windows lift here), and nothing ran on Windows. - **In the game, three maps, one run.** A hold of one game run on this PR's full build @ d8277decf (a first stage prepared the shaders, 353 s; then the game, started from a copied save with only `HOS_CONTROL` and `HOS_INPUT_LIVE`: guest memory off, no `HOS_OOT_CHEATS`, the Debug tools row Off). In Kokiri Forest, Hyrule Field and the Deku Tree (child Link) the driver teleported Link in, read his position, walked him about 4.8 m, read it again, then sent `!place` back to the first position and on to the second, reading his position for 2 s after each and taking a picture. A seventh warp teleported into the Deku Tree first and then placed him. | Map | Warp | Result | Link's distance from the asked position, 2 s later | |---|---|---|---| | Kokiri Forest | back to the first position | verified | 0.00 m | | Kokiri Forest | on to the second | verified | 0.00 m | | Hyrule Field | back to the first position | verified | 0.00 m | | Hyrule Field | on to the second | verified | 0.00 m | | Deku Tree | back to the first position | verified | 0.00 m | | Deku Tree | on to the second | verified | 0.00 m | | Deku Tree | after a teleport of its own | verified | 0.00 m | Every warp has both lines in `longshot_log.txt`, in this order, with the asked numbers (shown here as X Y Z): 7 `!place` lines, 7 returns, none missing or extra: ``` [hos ...] hid: live command at 28.4 s: !place X Y Z [hos ...] cheats: returned to X Y Z ``` The run ended by the game's quit: exit 0, `fatal=0 crash=0 devlost=0`, no kernel or driver lines (`kernel=0 nvrm=0`), 5,675 frames, headless on the RTX 4090 with the PC busy, so its frame rate says nothing. Pictures, each after the first `!place` of a map (Link stands where it was asked; the HUD and the map show the right place): `live-place-kokiri-forest.jpg` (Kokiri Forest), `live-place-hyrule-field.jpg` (Hyrule Field, in a tunnel mouth), `live-place-deku-tree.jpg` (Deku Tree, 1F). The same three maps gave 6 of 6 warps at 0.00 m on a private build of an older commit with the same patch. ![Kokiri Forest after the first `!place`: child Link on the forest path where the numbers put him, the minimap showing Kokiri Forest.](https://git.magicbean.dev/attachments/e34e5587-c263-4c61-8565-2818001296b7) ![Hyrule Field after the first `!place`: Link in a tunnel mouth, the minimap showing Hyrule Field.](https://git.magicbean.dev/attachments/1d698546-9e0e-4b3e-80d8-8ce4ffbbecfe) ![Deku Tree after the first `!place`: Link on the first floor, the dungeon map showing 1F.](https://git.magicbean.dev/attachments/4f83dabf-9220-44e0-b5f4-471cd800327a) **Not tested:** - Windows: `!place` has not run on Windows; the changed fixture and the host were only compiled for it (above). - Other GPUs (AMD, Intel) and the Steam Deck: no run. The change does not touch the renderer, but nothing was run there. - Adult Link, and maps other than the three above. - A position in a wall, below the floor, over a drop or outside the map; a line sent during a cutscene or a load; two lines in one poll. - Facing: it is not set (the Debug tab's return to mark does not turn Link); the run only looked at where he stood. **Must be tested:** - Windows, any GPU (by hand, or a Windows request to the Test Farm for `!place` in the live input): start the game with `HOS_INPUT_LIVE=<file>` (the control bridge's `status` for Link's position), load a save in Kokiri Forest, append the line `!place X Y Z` to the file with three numbers a few metres from where Link stands, and expect `hid: live command ... !place ...` and `cheats: returned to X Y Z` in `longshot_log.txt`, and Link standing at the asked place a second later (his `pos` equal to the numbers). ## Risks **What could break:** Only a `!place` line in the live input file does anything new, and that file is a test run's, not a player's. With no such line the host's Link update takes one more atomic exchange of an integer each time. A position that is wrong for the map (inside a wall, below the floor, over a drop) is taken as asked and the game then does what it does with Link; the command does not check the map. It reuses the Debug tab's return to mark, so it replaces that mark: Return to mark in the tab goes to the placed position until the next Mark position. **Turning it off:** revert the commit; with no `!place` line in the live input file nothing changes. **Compatibility:** Nothing changes: no save, `longshot_options.ini`, cache, `MkwVkHost` or builder change. ## Issues See #1198 (https://git.magicbean.dev/MagicBeanDev/Longshot/issues/1198): the automated test player, which needs to start a scenario at a given place. ## Checklist ### Everyone - [x] One topic. - [x] The title is a Conventional Commit (`type(scope): description`) of the status line's type. - [x] Why gives the reason plainly and links the issues that fit (the tracker searched). - [x] Tested on my own PC where it runs (in the game, for a change the game runs), as Testing's Tested says; what can't be run by hand is in Testing's Not testable by hand, with why. - [x] Measurements has a verdict, or one line saying why there is nothing to measure. - [x] Nothing gets worse that I know of: any cost (speed, latency, memory, a setup that worked before) is measured and in Risks. - [x] Testing names what was tested, what wasn't, and what must still be tested, where and how. - [x] Rebased on current `main` (544229a26): the branch is one commit on top of it, the game-free input test passes after the rebase (`python -I -B tests/test_input_background.py`). The game run and the full build were on the commit before the rebase (main @ 8e9cfc3a2); the six commits between touch `host/hos_main.c` and `docs/development.md` away from these lines and the rebase had no conflict. A rebuild on the new base is not done. - [x] `python -I -B tests/run_all.py` passes (any failure that also fails on `main` is named): the 39 failures are main's own and named in Testing. - [x] No game files, dumps, build output or generated files. - [x] `third_party/` untouched (a new folder with a `PROVENANCE.md` instead). - [x] The license is OK: GPL-3.0-or-later, nothing incompatible and nothing decompiled. ### When it applies - [x] AI assistance recorded with `Assisted-by:` / `Co-Authored-By:` trailers. - [x] A game-free test added for the fix, failing on `main` and passing here. - [x] A check under `tests/` that reads changed source updated in this PR, not weakened. - [x] Host code builds on both Windows (llvm-mingw) and Linux, with UTF-8 paths. - [x] Docs updated. New on this forge; not opened on GitHub.
feat(input): "!place X Y Z" in the live input puts Link at a position in the map he is in
All checks were successful
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been skipped
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been skipped
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
Website / Website on Cloudflare (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 10s
Website / Website on Cloudflare (pull_request_target) Has been skipped
CI / Workflow lint (actionlint) (pull_request) Successful in 21s
Guide screenshots / Guide images and local UI source review (pull_request) Successful in 22s
Third-party parts / As their notes say (pull_request) Successful in 23s
PR description / Description follows the template (pull_request_target) Successful in 9s
20d9dff9ff
A test run or a bug report that gives coordinates could only be followed by walking there, or by a teleport that
lands at the map's entrance. "!place X Y Z" in HOS_INPUT_LIVE's file asks the host to put Link at that position
(metres, the frame of the control bridge's pos) by the Debug tab's Return to mark path: the asked position becomes the
mark and the return runs at Link's next update, so the log says "cheats: returned to X Y Z" and the game's own
position change moves him. Only three finite numbers are taken; any other line is ignored. It does not set his
facing, change the map or wait for an event, and it needs neither HOS_OOT_CHEATS nor the Debug tools row.

nn_hid.c reads the line (host/nn_hid.c, beside "!cheat"), hos_main.c's oot_update_player_cheats takes it as the
return to mark's action when no other action is waiting.

tests/input_background_test.c, tests/test_input_background.py: the live-place case runs the real read_input against a
live file: a good line stores its three numbers and asks once; a short line, nan, inf, letters, no numbers and a
longer command name that starts the same ("!placement") are ignored. It fails on main (the ask is never set).
docs/development.md: the HOS_INPUT_LIVE row.

Assisted-by: Claude Sonnet 5.5
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
mooki changed title from WIP: feat(input): "!place X Y Z" in the live input puts Link at a position in the map he is in to feat(input): "!place X Y Z" in the live input puts Link at a position in the map he is in 2026-11-17 05:13:27 +00:00
TrashPanda left a comment

!place X Y Z in the live input file puts Link at that position in the map he is already in. I read head 20d9dff9. It applies onto current main. The Windows run it still names is open, so this is not an approval.

The reader keeps three finite numbers and raises one request. A short line, nan, inf, letters, or a longer word that only starts with place leaves the request alone. Link's next update takes it when no cheat action is already waiting, copies the numbers into the Debug tab's mark, and runs the existing return to mark. The log says cheats: returned to. It does not need HOS_OOT_CHEATS or the Debug tools row, and it does not turn him or change the map. Return to mark afterwards goes to the placed position until the next Mark position. If that update has no player controller, the request has already been taken and the log has no return line; the description says so.

The game-free test checks the reader. The Linux run, on the commit before this rebase, put him on the asked spot in Kokiri Forest, Hyrule Field and the Deku Tree, with a return line for each !place. Must be tested still asks for the same line in a Windows run.

`!place X Y Z` in the live input file puts Link at that position in the map he is already in. I read head `20d9dff9`. It applies onto current main. The Windows run it still names is open, so this is not an approval. The reader keeps three finite numbers and raises one request. A short line, `nan`, `inf`, letters, or a longer word that only starts with `place` leaves the request alone. Link's next update takes it when no cheat action is already waiting, copies the numbers into the Debug tab's mark, and runs the existing return to mark. The log says `cheats: returned to`. It does not need `HOS_OOT_CHEATS` or the Debug tools row, and it does not turn him or change the map. Return to mark afterwards goes to the placed position until the next Mark position. If that update has no player controller, the request has already been taken and the log has no return line; the description says so. The game-free test checks the reader. The Linux run, on the commit before this rebase, put him on the asked spot in Kokiri Forest, Hyrule Field and the Deku Tree, with a return line for each `!place`. Must be tested still asks for the same line in a Windows run.
Owner

Brought up to the ready-for-review standard (#1454): the checklist's Everyone list has two new boxes, added here from what this PR's description and comments show (please check they match what you know).

  • Tested on my own PC: ticked: Testing's Tested: an in-game run on Linux, RTX 4090 (NVIDIA 615.78.08), with a !place line in three maps.
  • Nothing gets worse that I know of: ticked: Measurements gives a reason nothing needs timing, and Risks states the one atomic exchange per Link update.
Brought up to the [ready-for-review standard](https://git.magicbean.dev/MagicBeanDev/Longshot/src/branch/main/CONTRIBUTING.md#ready-for-review-out-of-wip) (#1454): the checklist's Everyone list has two new boxes, added here from what this PR's description and comments show (please check they match what you know). - *Tested on my own PC*: ticked: Testing's Tested: an in-game run on Linux, RTX 4090 (NVIDIA 615.78.08), with a !place line in three maps. - *Nothing gets worse that I know of*: ticked: Measurements gives a reason nothing needs timing, and Risks states the one atomic exchange per Link update.
All checks were successful
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been skipped
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been skipped
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
Website / Website on Cloudflare (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 10s
Website / Website on Cloudflare (pull_request_target) Has been skipped
CI / Workflow lint (actionlint) (pull_request) Successful in 21s
Guide screenshots / Guide images and local UI source review (pull_request) Successful in 22s
Third-party parts / As their notes say (pull_request) Successful in 23s
PR description / Description follows the template (pull_request_target) Successful in 9s
This pull request doesn't have enough approvals yet. 0 of 1 approvals granted.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u 'live-place:mooki-live-place'
git switch 'mooki-live-place'
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
3 participants
Notifications
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/Longshot!1351
No description provided.