Saves: import and export Ocarina of Time saves between Hookshot and the emulators that run it #1190
No reviewers
Labels
No labels
accessibility
autorelease: pending
autorelease: tagged
bug
dependencies
documentation
duplicate
enhancement
github_actions
good first issue
help wanted
invalid
question
testing wanted
wontfix
No milestone
No assignees
1 participant
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Hookshot!1190
Loading…
Reference in a new issue
No description provided.
Delete branch "saves-lichii"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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
edenfolder, Eglantine haseglantine; Eden's newernand/user/save/account/<profile>/<title>/0layout is looked at too); NX2navi's from its documentation (<game folder>/profile/save/<account>, with itsprofile/save-txpending 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):
listshows every save it finds (Hookshot and each program, per profile, with its slots and dates);import <name>copies into Hookshot andexport <name>out of it, where the name is lichii, frizti, orchid, pokedinner, eden, eglantine or nx2navi;import --from <folder>andexport --to <folder>take any folder instead, either the save folder itself or one above it to search (a data folder, a portableuserfolder, 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,
--fromwith 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-runand the running-game guard with every process name (Windows and Linux, AppImages included). It only uses temporary folders.python -I -B tests/run_all.pypasses (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.