PixelRick / CyberpunkSaveEditor

A tool to edit Cyberpunk 2077 sav.dat files
MIT License
319 stars 44 forks source link

Manual Game Directory Location Override #30

Open 0J3 opened 2 years ago

0J3 commented 2 years ago

Currently, when launching cpfs_winfsp.exe, it shows the below error Image at https://cdn.cbt.wiki/firefox_201_n0uj4PF8nZ.png as I have my Cyberpunk installed on my D: drive - I would like it if I could tell it, after that error is shown, where my cyberpunk files are located, so it can use them

PixelRick commented 2 years ago

Hi, I will add that when I rebuild cpfs. In the meantime, the game isn't searched by disk but with the registry. It looks for a path ending with Cyberpunk2077.exe in "Computer\HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Compatibility Assistant\Store". If you add an entry there with the full path (like the other entries), it should work. I thought it was a reliable method to find the game path.

Can you tell me what version of windows you are using and have you started the game once already ? If you start the game manually (without a launcher like steam, etc..) does it create the registry entry ?

edit: btw, cpfs is just a demonstrator for mounted archives.. if you want to edit archives I suggest you to use the WolvenKit CLI https://github.com/WolvenKit/Wolvenkit. Or maybe you thought it was the save editor since it shows up as latest release.. I've just put cpfs in pre-release so that the save editor release shows up on top.

PixelRick commented 2 years ago

note to myself: use multiple registry sources (see https://www.nirsoft.net/utils/executed_programs_list.html)

0J3 commented 2 years ago

Hi, I will add that when I rebuild cpfs. In the meantime, the game isn't searched by disk but with the registry. It looks for a path ending with Cyberpunk2077.exe in "Computer\HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Compatibility Assistant\Store". If you add an entry there with the full path (like the other entries), it should work.

thanks - will try that when im @ home

I thought it was a reliable method to find the game path.

Although it might be mostly reliable, generally, it's a good idea to let the user choose incase of failure, and overwrite incase they might have several cyberpunks installed at once (ie from GoG and steam at once - I don't, but that could be an issue for others)

Can you tell me what version of windows you are using and have you started the game once already ? If you start the game manually (without a launcher like steam, etc..) does it create the registry entry ?

Windows 11 - see below System Information - https://cdn.cbt.wiki/msinfo32_219_6C8BbSnaQ8.png

EDIT: When reporting this bug, I only tested it in a VM with the above OS Version, but have since also experienced it on a native windows 11 installation (which is where I got that screenshot from), therefor making it not be related to my VM

PixelRick commented 2 years ago

it's a good idea to let the user choose incase of failure

I know but since CPFS has no UI (except a notification icon menu) I couldn't reuse the save editor's code, and just left it that way. I'll use the windows API.

Windows 11 -> maybe it doesn't have the Compatibility Assistant entries.