goatfungus / NMSSaveEditor

No Man's Sky - Save Editor
1.62k stars 227 forks source link

Enable Hidden Files in the Save Path open dialog so that we can get to the files on our LInux systems #975

Closed tolistim closed 2 months ago

tolistim commented 3 months ago

Since the Steam folder on a Linux system is hidden (.steam), we can't get to our saves. Can you either provide the ability to add the save path as a launch argument or turn on view hidden folders in the Save Path initial dialog? Even manually typing the path in the dialog doesn't get things set properly:

/home/tjones/file:/home/tjones/.steam/steam/steamapps/common/No\ Man\'s\ Sky

goatfungus commented 3 months ago

Looks like there is a problem with directory handling in the file dialogs anyway, so I have added a fix to the latest version. It currently doesn't show hidden directories, but you should still be able to navigate them by manually typing the path as you tried before... let me know if this doesn't work.

ponycannon commented 2 months ago

Some work-arounds for this issue on linux.

Create a symbolic link to the steam directory in your home folder. If you are using wine/ proton the windows (and java) dialogs never work well with the hidden folders in linux, you'll need it for multiple games. In your home folder in terminal use the command.

ln -s ~/.steam/steam steamfolder

This will create a visible folder in your home directory linking to the steam folder.

The location of the save game is pretty bonkers because each proton run game has it's own "C drive" each game has a folder in the compatdata folder, which is conveniently a string of numbers with no obvious meaning, inside of which is a pfx folder, which contains the C drive loaded for the game that is run by proton, and in that folder, you merely have to find the location the save files are saved in. This would be the same as on Windows basically from this point.

For the editor, you can edit the NMSSaveEditor.conf file and add the file location, with a line like follows, in my conf file its just below the line for "FontScaling" "GameSaveDir": "/home/username/.steam/steam/steamapps/compatdata/275850/pfx/drive_c/users/steamuser/AppData/Roaming/HelloGames/NMS/st_76561197976771480",

The final folder st_76561197976771480, might be different for you?

Other issues with linux. When running the editor use the command line.

java -jar NMSSaveEditor.jar -autoupdate

This will mean if there is an update it will prompt you to download it, which gets saved in the NMSSaveditor directory as ~NMSSaveEditor.dl. You then need to copy this file to the NMSSaveEditor.jar file.

cp ~NMSSaveEditor.dl NMSSaveEditor.jar

These are basically what the windows bat file does, the obvious thing would be to create a shell script which does this...

A shell script called nmssaveeditor.sh could contain something like this

if [[ -e ~NMSSaveEditor.dl ]]; then
    cp ~NMSSaveEditor.dl NMSSaveEditor.jar
    rm \~NMSSaveEditor.dl
    java -jar NMSSaveEditor.jar -autoupdate
else
java -jar NMSSaveEditor.jar -autoupdate
fi  

Basically if the downloaded update file exists it will copy it to the jar, and then remove the update file, if not it runs the editor. If you are creating this on linux, you'll need to enable the executable bit for the bash script, like

chmod 764 nmssaveeditor.sh

To run it you would type ./nmssaveeditor.sh

tolistim commented 2 months ago

Thanks Goat and Pony - I'll grab the latest build. I do use the Linux native JRE - OpenJDK 8 - when launching the editor so that's at least solid. Asking about the .conf file was my next question, so again - thanks!.

tolistim commented 2 months ago

Updated and then typed the path directly and it worked. Created a new .conf file and added the path manually and it worked.

It also seems snappier on Linux than on my Native Windows 11 system!

Happy days.