Saves: import and export Ocarina of Time saves between Hookshot and the emulators that run it #1190

Merged
hckrman101 merged 3 commits from saves-lichii into main 2026-11-09 17:15:39 +00:00
hckrman101 commented 2026-11-09 16:53:36 +00:00 (Migrated from github.com)

Hookshot and the emulators and ports that run the Switch 2 Ocarina of Time on a PC (Lichii, its fork Frizti/Fritchii, Orchid, PokeDinner, Eglantine, NX2navi) keep the game's saves in the same files: account.sav, option.sav and slot_NN/{progress,caption}.sav, one folder per profile. A save made in one loads in the other with no conversion, but finding the folders and copying safely is fiddly, so this adds a guide and a small script.

docs/saves.md ("Using a save from an emulator"): a table of where each program keeps the saves on Linux and Windows, and how sure each row is. Hookshot's come from host/hos_main.c and host/nn_fs.c; the emulators' from their own fs_paths.h, path_util.cpp and savedata_factory.cpp (Lichii, Frizti, Orchid and PokeDinner share Eden's eden folder, Eglantine has eglantine; Eden's newer nand/user/save/account/<profile>/<title>/0 layout is looked at too); NX2navi's from its documentation (<game folder>/profile/save/<account>, with its profile/save-tx pending saves). Then how to copy with the script or by hand, the cautions (close both games, settings follow the save, profiles, never run two on one save) and what was tested. Ryujinx and its forks are left out: they do not run Switch 2 games. The readme's saves line links to it.

scripts/oot_saves.py (Python 3, standard library only, Linux and Windows): list shows every save it finds (Hookshot and each program, per profile, with its slots and dates); import <name> copies into Hookshot and export <name> out of it, where the name is lichii, frizti, orchid, pokedinner, eden, eglantine or nx2navi; import --from <folder> and export --to <folder> take any folder instead, either the save folder itself or one above it to search (a data folder, a portable user folder, NX2navi's game folder). The programs are one table (name, data folders per OS, process names): adding one is one entry. It backs up the side it overwrites to oot-save-backups/---

tests/test_oot_saves.py covers the discovery for every table entry (the Linux and Windows layouts through the environment), Eden's newer layout, deeper and shallower folders, an empty title folder as a target, folders that only look like saves, ambiguous profiles, --from with a save folder and with a data folder, --to, NX2navi both ways and its waiting-save refusal, the old command names, both directions byte for byte with their backups, --keep-settings, --dry-run and the running-game guard with every process name (Windows and Linux, AppImages included). It only uses temporary folders. python -I -B tests/run_all.py passes (143 passed, 7 skipped).

Tested by hand on Linux with Lichii: a Hookshot save copied to Lichii loads at the same spot. A Lichii save copied to Hookshot arrives identical but was not played through. Windows and the other programs are not tested; their folders come from their source or, for NX2navi, its documentation.

Hookshot and the emulators and ports that run the Switch 2 Ocarina of Time on a PC (Lichii, its fork Frizti/Fritchii, Orchid, PokeDinner, Eglantine, NX2navi) keep the game's saves in the same files: account.sav, option.sav and slot_NN/{progress,caption}.sav, one folder per profile. A save made in one loads in the other with no conversion, but finding the folders and copying safely is fiddly, so this adds a guide and a small script. docs/saves.md ("Using a save from an emulator"): a table of where each program keeps the saves on Linux and Windows, and how sure each row is. Hookshot's come from host/hos_main.c and host/nn_fs.c; the emulators' from their own fs_paths.h, path_util.cpp and savedata_factory.cpp (Lichii, Frizti, Orchid and PokeDinner share Eden's `eden` folder, Eglantine has `eglantine`; Eden's newer `nand/user/save/account/<profile>/<title>/0` layout is looked at too); NX2navi's from its documentation (`<game folder>/profile/save/<account>`, with its `profile/save-tx` pending saves). Then how to copy with the script or by hand, the cautions (close both games, settings follow the save, profiles, never run two on one save) and what was tested. Ryujinx and its forks are left out: they do not run Switch 2 games. The readme's saves line links to it. scripts/oot_saves.py (Python 3, standard library only, Linux and Windows): `list` shows every save it finds (Hookshot and each program, per profile, with its slots and dates); `import <name>` copies into Hookshot and `export <name>` out of it, where the name is lichii, frizti, orchid, pokedinner, eden, eglantine or nx2navi; `import --from <folder>` and `export --to <folder>` take any folder instead, either the save folder itself or one above it to search (a data folder, a portable `user` folder, NX2navi's game folder). The programs are one table (name, data folders per OS, process names): adding one is one entry. It backs up the side it overwrites to oot-save-backups/<import or export>-<name>-<date>-<time>/, replaces its slots and copies account.sav and option.sav. It refuses while Hookshot or any program in the table runs, and while NX2navi still has a save waiting in profile/save-tx, unless `--force`. `--keep-settings` leaves option.sav alone, `--dry-run` changes nothing, `--hookshot` and `--backup-dir` override those folders, and `--profile` picks the profile when several have saves (it lists them and stops rather than guess). `to-lichii` and `to-hookshot` still work as `export lichii` and `import lichii`. tests/test_oot_saves.py covers the discovery for every table entry (the Linux and Windows layouts through the environment), Eden's newer layout, deeper and shallower folders, an empty title folder as a target, folders that only look like saves, ambiguous profiles, `--from` with a save folder and with a data folder, `--to`, NX2navi both ways and its waiting-save refusal, the old command names, both directions byte for byte with their backups, `--keep-settings`, `--dry-run` and the running-game guard with every process name (Windows and Linux, AppImages included). It only uses temporary folders. `python -I -B tests/run_all.py` passes (143 passed, 7 skipped). Tested by hand on Linux with Lichii: a Hookshot save copied to Lichii loads at the same spot. A Lichii save copied to Hookshot arrives identical but was not played through. Windows and the other programs are not tested; their folders come from their source or, for NX2navi, its documentation.
Commenting is not possible because the repository is archived.
No description provided.