666shooter Posted March 5, 2022 (edited) Hello, I have asked about this issue in another thread, but the OP there was unfortunately not able to replicate the issue, so was not able to offer any advice. I am hopeful with a more generalized post, someone will be able to determine what might be causing this problem. I have been using GZDoom since 4.5 and have not encountered any issues with my savegames there or in 4.6, where they are directed to a folder within GZDoom's base, like so: C:\Program Files (x86)\Steam\steamapps\common\Doom 2\base\GZDoom_4.6\Save. According to ini file generated, it shows save_dir= , with no designated value. Since upgrading to 4.7, and then 4.7.1, my savegames have ceased defaulting to this pathway in my base folder, and now default as follows, to an arbitrary folder created in my PC personal folders: C:\Users\X\Saved Games\GZDoom [where X is the familiar name of my PC]. This has occurred even when reinstalling GZDoom and deleting this created folder, as a default setting somehow. This causes problems with parsing statistics when using Doom Launcher, even when designating an alternate save path, and is simply confusing to locate files in such an unfamiliar location. GZDoom 4.7.1 has not created an ini, but when checking the save_dir in-game, it shows =(default: ""). Does anyone know what is causing this to occur? Was there a change in the savegame coding when updating to 4.7? Do I need to manually designate a new pathing for the save directory to use the Base folder as it always has done in the past? I am running Windows 11 using a Dell G7 laptop, though upgrading my computer has not made a difference with GZDoom 4.6 saves. Edited March 5, 2022 by 666shooter Updated save dir desigation for 4.7 in-game 0 Quote Share this post Link to post
Graf Zahl Posted March 5, 2022 The change was to avoid writing data to protected folders. Since this was a constant issue for some users, this was changed to unconditionally consider Program Files and Program Files (x86) write protected and instead place the saves into your user directory. 2 Quote Share this post Link to post
666shooter Posted March 5, 2022 Okay, that at least clarifies that first major question. Thanks for your prompt reply, Graf! I do appreciate your attention and support to your Source Port over the years. For whatever reason, this seems to be causing a direct issue with Doom Launcher's statistics for some reason, that I have not been able to resolve. I wonder why it will not parse those statistics even when Save Statistics is selected and I have designated the Alternate Save directory? Hobomaster seemed to have no issue with a clean install on his end, so what is different on mine, I wonder? 0 Quote Share this post Link to post
Graf Zahl Posted March 5, 2022 Hm. Looks like that one fell through the cracks. There is no path checks on it at all. Until this can be addressed, set the 'statfile' CVar to the full path of the file you want to save to. 1 Quote Share this post Link to post
666shooter Posted March 5, 2022 21 minutes ago, Graf Zahl said: Hm. Looks like that one fell through the cracks. There is no path checks on it at all. Until this can be addressed, set the 'statfile' CVar to the full path of the file you want to save to. Thank you so much, I will certainly try that today and see how that updates things. How do I edit the Cvar? I assume you mean for GZDoom itself and not on Doom Launcher? 0 Quote Share this post Link to post
Graf Zahl Posted March 5, 2022 There's two ways. Either open the INI file in a text editor and enter the value there or do it from the console. It's 'statfile <path>' 1 Quote Share this post Link to post
666shooter Posted March 5, 2022 3 minutes ago, Graf Zahl said: There's two ways. Either open the INI file in a text editor and enter the value there or do it from the console. It's 'statfile <path>' Do you know how to get the program to generate the INI file so I can edit it? As stated in the original post, one has been created for 4.6, but 4.7.1 never generated one for me, and I am unsure how to do this manually? 0 Quote Share this post Link to post
TruthInFiction Posted March 7, 2022 On 3/5/2022 at 1:26 PM, 666shooter said: Do you know how to get the program to generate the INI file so I can edit it? As stated in the original post, one has been created for 4.6, but 4.7.1 never generated one for me, and I am unsure how to do this manually? Have you tried doing a file search to see if GZDoom saved the INI file to an unexpected location? If it now defaults to putting save files in a different folder it might be doing the same for your INI file. Failing that, if you still have version 4.6 it might be worth trying to just copy over the old INI file. Worst case scenario is it borks your settings and you can just delete it again. 0 Quote Share this post Link to post
666shooter Posted March 7, 2022 25 minutes ago, TruthInFiction said: Have you tried doing a file search to see if GZDoom saved the INI file to an unexpected location? If it now defaults to putting save files in a different folder it might be doing the same for your INI file. Failing that, if you still have version 4.6 it might be worth trying to just copy over the old INI file. Worst case scenario is it borks your settings and you can just delete it again. Thank you for the reply; I still haven't figured out what to do about this issue. I have considered moving the INI file but wasn't sure if that would disable certain features (especially MBF) which are exclusive to GZDoom 4.7? I'm not sure how much is contained within that file, but I know for 4.6 it included fairly extensive settings for all of the IWADs, and when I tried adding the line for "statfile" and copying the file path from the new Saved Games folder 4.7 creates, saving this new line as a cfg file in the 4.7 base, it still doesn't affect Doom Launcher's parsing for statistics. I considered adding this command to DL's config file, but was afraid that would affect its parsing for any source port other than 4.7.1 if I did that? 0 Quote Share this post Link to post
Graf Zahl Posted March 7, 2022 If you cannot find the INI, type 'whereisini' at the console and the engine will tell you. 2 Quote Share this post Link to post
NightFright Posted March 8, 2022 (edited) I have noticed something that might be related to that. It has to do with the syntax for relative paths. In earlier GZD builds, something like the following used to work in the ini: Path=././fixes/d1sprfx20.wad In latest GZD snapshots, these defs don't load the file any more. It would have to be: Path=../../fixes/d1sprfx20.wad (So, an additional dot for each dir that you are "going up" in the hierarchy.) Is this known/intended? Edited March 8, 2022 by NightFright 0 Quote Share this post Link to post
Graf Zahl Posted March 8, 2022 If the first one worked, it was surely not intentional. '.' means the current directory in most file systems, not the parent. 1 Quote Share this post Link to post
666shooter Posted March 8, 2022 On 3/5/2022 at 11:37 AM, Graf Zahl said: Hm. Looks like that one fell through the cracks. There is no path checks on it at all. Until this can be addressed, set the 'statfile' CVar to the full path of the file you want to save to. I must have entered this wrong, because I changed it from the zdoomstat.txt as it was set originally (as it functions in 4.6 according to the older pathing) to statfile=<C:\Users\x\Saved Games\GZDoom> and it is still not generating the statistics as expected? That folder contains the save files as you instructed? Did I enter something wrong? 0 Quote Share this post Link to post
666shooter Posted March 19, 2022 Bumping in hopes of receiving more assistance? I'm willing to keep trying if anyone has any further suggestions? 0 Quote Share this post Link to post
Graf Zahl Posted March 20, 2022 You didn't really add those '<>' characters, did you? 0 Quote Share this post Link to post
666shooter Posted March 20, 2022 (edited) 7 hours ago, Graf Zahl said: You didn't really add those '<>' characters, did you? I have tried it with and without, and have not seen a difference. Edit: I also added the zdoomstat.txt to the end C:\Users\x\Saved Games\GZDoom\zdoomstat.txt, but this does not appear to be correct either. What should I try now? Edited March 20, 2022 by 666shooter 0 Quote Share this post Link to post
Graf Zahl Posted March 20, 2022 Try some other paths. This looks correct and should work 0 Quote Share this post Link to post
666shooter Posted March 20, 2022 12 minutes ago, Graf Zahl said: Try some other paths. This looks correct and should work I don't understand; I thought you needed me to direct it to the located of the Saved Games in order for it to locate the statistics readout for Doom Launcher? Unless this is also an issue on Doom Launcher's end, but Hobomaster said he didn't experience the same problem. 0 Quote Share this post Link to post
Graf Zahl Posted March 20, 2022 I have no idea what's going wrong, so the next thing to try should be to save the file to a different location. 1 Quote Share this post Link to post
666shooter Posted March 20, 2022 16 minutes ago, Graf Zahl said: I have no idea what's going wrong, so the next thing to try should be to save the file to a different location. At this point, I think it might be best for me to wait until the next version, as I'm not sure how to redirect the saves back to the Program Files and the GZDoom folder. I'm not sure if DL would read from there as it has with 4.6? 0 Quote Share this post Link to post
666shooter Posted March 26, 2022 On 3/20/2022 at 5:43 PM, Graf Zahl said: I have no idea what's going wrong, so the next thing to try should be to save the file to a different location. I just wanted to say thank you for that advice. I did a clean install and created a "Saves" folder within the GZDoom 4.7.1 base to mimic earlier versions and updated the save_dir with that path in the ini file. STATS ARE BACK! I know it's not what you had intended with the update, but for now that seems to be my best and simplest fix. Thank you again for your all of your patience and advice in helping me troubleshoot this frustration. I know we are an independent community, but it is always humbling to see a software developer so willing to work with their users to ensure their product works as well as possible. 0 Quote Share this post Link to post
Fornax Posted July 22, 2023 (edited) I've encountered this complication as well. Happens after reimaging your Windows machine or buying a new computer. Source of the inconvenience is the location of the game saves in the file system. Today, GZDoom's default location for save files is: "$env:UserProfile\Saved Games\GZDoom\doom.id.doom2.commercial" Which is better than $env:ProgramFiles or ${env:ProgramFiles(x86)}, but still leaves the uninformed player at risk of losing their data in the event their PC is stolen / destroyed / sold / etc. Ideally GZDoom should save these files to a directory that's automatically backed up a cloud service like DropBox, iCloud Drive, or OneDrive. Knocking out the prerequisites in order and cutting & pasting the lines of PowerShell below will fix OP's problem. Prerequisites: 1. Get OneDrive working on your Windows PC. 2. Sign into OneDrive with a Microsoft Account. 3. Enable backups in OneDrive. See lines of PowerShell code for URL with instructions. 4. Fire up GZDoom and hammer out 'whereisini' at the console. Record the output to notepad or write it down. Close GZDoom. 5. Verify the output obtained in Step 4 ends in 'OneDrive\Documents\My Games\GZDoom\gzdoom.ini'. If not, save & close everthing you have open, log off your computer, and log back on. Rebooting shouldn't be necessary. Now execute the block of PowerShell below by holding down the Windows key on the keyboard and tapping the letter R. Input powershell.exe and click the OK button. No need to run as admin. Copy & paste this code into the blue window and hit the Enter key. New-Variable -Name 'explorer.exe Process' -Value (Get-CimInstance Win32_Process -Filter "Name = 'explorer.exe'" | Sort-Object ProcessId | Select-Object -First 1) New-Variable -Name 'explorer.exe Owner' -Value ((Invoke-CimMethod -InputObject ${explorer.exe Process} -MethodName GetOwner).User) ${Location of .ini file} = "C:\Users\${explorer.exe Owner}\OneDrive\Documents\My Games\GZDoom\gzdoom.ini" if(Test-Path ${Location of .ini file}){ ${In-cloud directory} = "C:\Users\${explorer.exe Owner}\OneDrive\Saved Games\GZDoom" ${Contents of .ini file} = Get-Content -Path ${Location of .ini file} for($i = 0;$i -lt ${Contents of .ini file}.Count; $i++){ if(${Contents of .ini file}[$i] -cmatch '^save_dir=$'){${Contents of .ini file}[$i] = ${Contents of .ini file}[$i] + ${In-cloud directory}} } ${Contents of .ini file} | Out-File ${Location of .ini file} try{Get-Item -Path "${In-cloud directory}\Save files from original location" -ErrorAction Stop}catch{New-Item -ItemType Directory -Path "${In-cloud directory}\Save files from original location" | Out-Null} (Get-ChildItem "$env:UserProfile\Saved Games\GZDoom\doom.id.doom2.commercial" -Recurse).FullName | %{Copy-Item -Path $_ -Destination "${In-cloud directory}\Save files from original location"} ${shell 1} = New-Object -ComObject Shell.Application ${shell 1}.Explore("${In-cloud directory}\Save files from original location") ${shell 2} = New-Object -ComObject Shell.Application ${shell 2}.Explore("${In-cloud directory}\doom.id.doom2.commercial") } else{write "Sign into OneDrive with a Microsoft Account, establish redirection of Windows known folders to OneDrive, and reattempt these lines of PowerShell code.`r`nInstructions: https://support.microsoft.com/en-au/office/back-up-your-folders-with-onedrive-d61a7930-a6fb-4b95-b28a-6552e77c3057"} Remove-Variable -Name 'explorer.exe Process','explorer.exe Owner' Feel free to close PowerShell. Copy those save files you want to keep from the first File Explorer window that into the 2nd File Explorer window. Finally, launch GZDoom and your saves should be visible. Edited July 22, 2023 by Fornax 1 Quote Share this post Link to post
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.