Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug Report - Other: Switching profiles does not update save game directory #4956

Closed
VortexFeedback opened this issue Jun 25, 2019 · 20 comments
Closed
Labels

Comments

@VortexFeedback
Copy link
Collaborator

Vortex Version: 0.18.9
Memory: 31.92 GB
System: win32 x64 (10.0.17763)
This happens often enough I figure I better report it.
On the support forum, I always tell people to manually Deploy after switching profiles.
I had a Skyrim SE profile active, and switched to Fallout NV.
Vortex Saves page shows the correct list of saves.
Start Fallout NV. The list of saves is not correct. It has access to either Default or Global.
Exiting and using Deploy fixes it.

Reported by: rmm200

@TanninOne
Copy link
Contributor

I can't reproduce the issue.
When you switch the profile of a game (e.g. say from a Fallout NV profile to another Fallout NV profile) it should always force deployment as you switch and thereby update the ini file.
When you switch between games you're switching to the profile that was active last time you managed that game so the ini for that game didn't change.

In your example you say you switch from SSE to Fallout NV - but you're thereby switching to the Fallout NV profile you used last with NV. The ini file doesn't have to be updated at that point because it would have had to be wrong before.

I don't think I'm explaining this well. Even when you're managing SSE in Vortex you should be able to start Fallout NV (e.g. through steam) and it should play right. The fact that you're managing SSE shouldn't matter for Fallout NV. Switching to/from SSE shouldn't affect Fallout NV.
The Fallout NV ini file should be correct (or vortex should be signaling that you need to deploy) when you're managing NV, no matter what other games you switch to/from.

So there are two possibilities here
a) The last time you managed NV in Vortex you did something that affected the save directory (like changing the profile or changing the profile settings) and Vortex didn't auto-deploy and didn't notify it needs deployment. That would be a bug but I'd need to know in detail what it was you were doing
b) You were modifying/reverting the ini file outside Vortex. In this case there is nothing for us to do. Yes, if you change ini files, delete mod files or whatever outside Vortex you have to know that you have to deploy to ensure Vortex sets up everything correctly.

@rmm200
Copy link

rmm200 commented Jun 30, 2019

Just make a mark on the wall then.
I don't modify ini files manually, so that is not an issue.
All games are set to local ini and save files.
The error case arises when all memory of the local save file is lost. Broken hard link?
The game reverts back to the global saves. Deploy fixes this local link.
This sort of goes along with my recommendation to users - when you switch to a different Profile - Deploy before running the game.

@TanninOne
Copy link
Contributor

There are no hardlinks involved with the savegames.

The important part of my post is this: When you switch profiles within a game (e.g. from one New Vegas profile to another New Vegas profiles), Vortex should deploy automatically!
If that deployment doesn't happen, that's a bug to report. If that deployment does happen but doesn't update the relevant parameter in the ini file (SLocalSavePath) - that's a bug.

But if Vortex does deploy on profile switch and does update the parameter then the only remaining explanation is that the ini was changed outside Vortex. Whether you did it yourself or through a different tool (bethini, wrye bash, MO, the game launcher, ...) doesn't matter.

@S-p-Ace
Copy link

S-p-Ace commented Jul 15, 2019

If that deployment does happen but doesn't update the relevant parameter in the ini file (SLocalSavePath) - that's a bug.

I have this in Skyrim Vr
Vortex does change the setting but in the wrong file. The setting needs to be set in "SkyrimVR.ini" not "Skyrim.ini" or the setting will be ignored by the game.

@TanninOne
Copy link
Contributor

Yeah, SkrimVR we were writing to the wrong savegame. Not sure why, whether this was changed in a patch or whether I were completely blind in testing.
Anyway, this should be fixed in 0.19.0 but it doesn't explain this problem on Fallout NV.

@TanninOne TanninOne added the waiting for reply Highlights that the development team is currently waiting for a response on the labeled issue label Jul 19, 2019
@Rattledagger
Copy link

Just tested in v1.0.0, steps to replicate bug, using Skyrim as test-setup:
1: Create a new profile using "This profile has its own game settings".
2: Switch to this new profile, check %appdata%\vortex\skyrim\profiles(profile_specific)\Skyrim.ini and see this file does not have any "sLocalPathSave" as it should have. The file "…\Documents\My Games\Skyrim\Skyrim.ini" on the other hand does include "sLocalPathSave" as it should.
3: Regardless of what you do, example changing resolution, enabling sub-titles in-game etc., neither Skyrim.ini or SkyrimPrefs.ini under %appdata%\vortex\skyrim\profiles(profile_specific)\ is ever updated.
4: Every time you switches to this new profile, Skyrim.ini and SkyrimPrefs.ini from %appdata%\vortex\skyrim\profiles(profile_specific)\ is copied over to …\Documents\…

Meaning in step 4, the file that does NOT include "sLocalPathSave" is now used as ini-file for the game and you'll either have no save-games at all or you'll have save-games for the wrong profile.

If you now Deploy, the ini-file in Documents does get correct "sLocalPathSave", but since none of the changes ever makes it back to %appdata%\vortex\skyrim\profiles(profile_specifc)\ next time you switches between games or between profile and back again, you'll have the wrong save-games until you Deploy.

Note, tested with Documents under OneDrive, in case this has any effects.

@rmm200
Copy link

rmm200 commented Jul 30, 2019 via email

@TanninOne
Copy link
Contributor

TanninOne commented Sep 6, 2019

The steps you described are the intended behavior. The ini files in profiles are supposed to reflect the ini edits you (the user) made to the ini file excluding the ini settings Vortex does based on its configuration.
So the sLocalPathSave setting isn't supposed to be stored there, Vortex is supposed to apply it when the game is being "prepared".

The issue here is that the settings are tied to the deploy step and the deploy doesn't get run after you switched to the game. At some point I guess we thought it was a smart move to skip the deployment for performance reasons if no mods had been changed and forgot that this also meant ini settings wouldn't be updated.
So yeah, basically you have to deploy when you switch to a game and the bug is that that should be automatic.

EDIT: Wait, how -
If you switch from one skyrim profile to another it should always cause deployment for the new profile so that should always set the sLocalPathSave setting when you switch to a profile that has local savegames.
If you switch from one game to another, the ini files for the old games don't get changed at all so switching to a different game and back shouldn't change the ini at all.

So where does the ini file get reset to a version with sLocalPathSave set to default when the profile has local save games enabled?

@Rattledagger
Copy link

If you switch from one skyrim profile to another it should always cause deployment for the new profile so that should always set the sLocalPathSave setting when you switch to a profile that has local savegames.

Doing a few tests, this actually seems to be correct, so no idea why got a different result before.

The Vortex.log also includes a few lines like

Sun, 08 Sep 2019 12:25:17 GMT - debug: apply savegame settings filePath=C:\Users\XXX\Documents\My Games\Skyrim\Skyrim.ini, gameId=skyrim

If you switch from one game to another, the ini files for the old games don't get changed at all so switching to a different game and back shouldn't change the ini at all.

This very clearly isn't correct, and a quick look in Vortex.log shows:

Sun, 08 Sep 2019 12:08:47 GMT - info: activating game gameId=skyrim
Sun, 08 Sep 2019 12:08:47 GMT - info: using last active profile profileId=mgFllg7W6
Sun, 08 Sep 2019 12:08:47 GMT - debug: refresh profile gameId=witcher3, id=Gr4AgGZSB, lastActivated=1567944512484, name=Default
Sun, 08 Sep 2019 12:08:47 GMT - debug: copying profile inis destination=C:\Users\XXX\AppData\Roaming\Vortex\skyrim\Skyrim.ini, source=C:\Users\XXX\Documents\My Games\skyrim\Skyrim.ini.base
Sun, 08 Sep 2019 12:08:47 GMT - debug: copying profile inis destination=C:\Users\XXX\AppData\Roaming\Vortex\skyrim\SkyrimPrefs.ini, source=C:\Users\XXX\Documents\My Games\skyrim\SkyrimPrefs.ini.base
Sun, 08 Sep 2019 12:08:47 GMT - debug: copying profile inis destination=C:\Users\XXX\Documents\My Games\skyrim\Skyrim.ini.base, source=C:\Users\XXX\AppData\Roaming\Vortex\skyrim\profiles\mgFllg7W6\Skyrim.ini
Sun, 08 Sep 2019 12:08:47 GMT - debug: copying profile inis destination=C:\Users\XXX\Documents\My Games\skyrim\SkyrimPrefs.ini.base, source=C:\Users\XXX\AppData\Roaming\Vortex\skyrim\profiles\mgFllg7W6\SkyrimPrefs.ini
etc.

With switching between games where's no accompanying "apply savegame settings", as it should have been.

The steps you described are the intended behavior. The ini files in profiles are supposed to reflect the ini edits you (the user) made to the ini file excluding the ini settings Vortex does based on its configuration.

Ok, so the part with Vortex-specific settings not working as it should is solved by Deploy. But, this doesn't fix the other problem, the fact the ini-files does not reflect the edits you've done in-game or manually to the files. Taking a quick look on the log, Vortex on Deploy doesn't seem to do anything at all to the ini-files, except update save-path and while it isn't mentioned it does seem to copy contents of *.ini to *.ini.base.

On switching between profiles you do have the logic:

Sun, 08 Sep 2019 12:51:40 GMT - debug: refresh profile local_game_settings=true, local_saves=true, gameId=skyrim, id=9bC8ddX-F, lastActivated=1567946446388, enabled=true, enabled=true, enabled=true, enabled=true, enabled=true, enabled=true, name=just_for_testing
Sun, 08 Sep 2019 12:51:40 GMT - debug: copying profile inis destination=C:\Users\XXX\AppData\Roaming\Vortex\skyrim\Skyrim.ini, source=C:\Users\XXX\Documents\My Games\skyrim\Skyrim.ini.base
Sun, 08 Sep 2019 12:51:40 GMT - debug: copying profile inis destination=C:\Users\XXX\AppData\Roaming\Vortex\skyrim\SkyrimPrefs.ini, source=C:\Users\XXX\My Games\skyrim\SkyrimPrefs.ini.base
Sun, 08 Sep 2019 12:51:40 GMT - debug: sync to profile profilePath=C:\Users\XXX\AppData\Roaming\Vortex\skyrim\profiles\9bC8ddX-F, sourceFiles=[C:\Users\XXX\AppData\Local\Skyrim\plugins.txt, C:\Users\XXX\AppData\Local\Skyrim\loadorder.txt]
Sun, 08 Sep 2019 12:51:40 GMT - debug: copying profile inis destination=C:\Users\XXX\Documents\My Games\skyrim\Skyrim.ini.base, source=C:\Users\XXX\AppData\Roaming\Vortex\skyrim\profiles\dgvuOtr0u\Skyrim.ini
Sun, 08 Sep 2019 12:51:40 GMT - debug: copying profile inis destination=C:\Users\XXX\Documents\My Games\skyrim\SkyrimPrefs.ini.base, source=C:\Users\XXX\AppData\Roaming\Vortex\skyrim\profiles\dgvuOtr0u\SkyrimPrefs.ini
Sun, 08 Sep 2019 12:51:40 GMT - debug: sync to profile complete
Sun, 08 Sep 2019 12:51:40 GMT - debug: refresh profile local_game_settings=true, local_saves=true, gameId=skyrim, id=dgvuOtr0u, lastActivated=1563536377658, enabled=true, name=test_gigantic_number_of_files
Sun, 08 Sep 2019 12:51:40 GMT - debug: sync from profile profilePath=C:\Users\XXX\AppData\Roaming\Vortex\skyrim\profiles\dgvuOtr0u, sourceFiles=[C:\Users\XXX\AppData\Local\Skyrim\plugins.txt, C:\Users\XXX\AppData\Local\Skyrim\loadorder.txt]
Sun, 08 Sep 2019 12:51:40 GMT - debug: sync from profile complete
Sun, 08 Sep 2019 12:51:40 GMT - debug: deploying mods game=skyrim, method=Hardlink Deployment, profile=dgvuOtr0u

At least to me this seems very strange and broken logic, since for starters the actual files are called Skyrim.ini and SkyrimPrefs.ini, the files you've just edited by using the game launcher, in-game, or by manually editing the files. Very confusedly Vortex doesn't use these actual files, but instead copies two different files called *.ini.base, two files that does NOT include the edits you've done since last time you Deployed.

As an added bonus, the files that does not include the latest edits are copied to the profile-independent part by Vortex, while some profile-specific files are copied in the other direction.

So while you do keep the save-path for switching between profiles, where's still at least 3 bugs here:
1: Any edits to ini-files since last time you Deployed never makes it to the profile-independent ini-files saved by Vortex.
2: The profile-specific ini-files are never updated since Vortex only updates the profile-independent ini-files.
3: By switching to another game and back again you'll lose the profile-specific save-path until you Deploy.

Also see #5226

@VortexFeedback
Copy link
Collaborator Author

Vortex Version: 0.18.12
Memory: 7.89 GB
System: win32 x64 (10.0.17134)
Sometimes when the game is closed, when reopened, the game itself does not seem to be able to find the save folder for that profile and wants you to start a new game.
Saves are still in the profile save folder but are not loaded into the game unless pasted into the main save folder (D:\Documents\My Games\Skyrim Special Edition\Saves). Game no longer saves to profile folder but does save to main folder
There have been no changes to the mod list or mod order between closing and reopening. No changes to the profile save folder.
Have been unable to recreate since it seems to happen randomly.

Reported by: pndragon65

@VortexFeedback
Copy link
Collaborator Author

Vortex Version: 1.0.0
Memory: 15.82 GB
System: win32 x64 (10.0.17763)
I have 2 games, Skyrim SE for PC and a separate one for VR. I play on both games, but after the prior Vortex update if I play the VR when I go and log in to the PC version through Vortex and create a new game, when I come back to play the VR the game is not there. I only get the New option instead of Load Game when I get to the game menu. I ended up uninstalling both games, re-installed everything including Steam, but it still happens. I went ahead and deleted all saves that I had for the PC game and only then the VR game re-appears with all the saves that I have. I access the game only through Vortex. I looked at all the settings for both games and everything looks fine to me, but I'm no expert. This didn't happen before, I played both games with no problems.

Reported by: Flyingunicorn47

@VortexFeedback
Copy link
Collaborator Author

Vortex Version: 1.1.5
Memory: 16.00 GB
System: win32 x64 (10.0.18363)
If I switch game to SkyrimSE and go to the dasboard to launch skse64, i find that no save games are recognised, I have to do a deploy first, my SkyrimSE profiles have their own ini as well as savegames. Presumably the deploy alters the games reference to the savegame path? Perhaps this should happen when changing games without further input?

Reported by: dizietemblesssma

@TanninOne
Copy link
Contributor

First of all: Forget about .ini.baked and .ini.base, these are Vortex internal files. Don't delete them, don't edit them. They are necessary for Vortex to operate correctly but you're not supposed to do anything with them. You use the regular .ini just like you would if you were modding the game without vortex.

For the internas, .ini.base is effectively a copy of the ini file containing your custom settings but none of the things vortex put in but this file is only getting updated when deployment happens, automatically or manually.

That's why we copy .ini.base to your profile: we "backup" your settings, we don't need to backup the stuff Vortex adds.

The "profile-independent ini-files" are basically the inis to be used when not using a profile with profile-local settings.

So the algorithm Vortex uses is perfectly sensible but surprising because during early development there was a change to how profiles work and the ini handling wasn't updated accordingly. Initially we wanted to disable the profile if you switch away from it. So when you switch from, say, Skyrim to Witcher 3, it would effectively revert the Skyrim game directory to vanilla and reset everything (including ini files) to the state without Vortex.

We moved away from that, leaving the in its last modded state except for the ini files.
So now when you have a profile active with profile-local settings and then switch to a different game, Vortex will (1) copy your "active" ini files to the profile directory (because they do belong to the profile that was active when you edited those ini files) and reinstate the "global" ini files (the ones used with "local gamesettings: no").
When you'd reactivate the profile it would do the reverse (2), create a backup of your global ini and reinstate the profile ini.
So the algorithm didn't break anything, there is no logical flaw here.
Unfortunately there is an ordinary bug: (1) would fail, acting as if you're activating a profile for the first time. (2) however would happen and thus whenever you switched to a profile, its ini files get "restored" even though they weren't "saved" in the first place.

As far as I can tell the issue was introduced here: Nexus-Mods/extension-local-gamesettings@88cfd41

It should be fixed in this commit: Nexus-Mods/extension-local-gamesettings@519837a

And then I changed the behavior in general to be more consistent, meaning that Vortex will no longer swap the ini files when switching to a different game like I described in my earlier comment:
Nexus-Mods/extension-local-gamesettings@d52e159

I think this will fix this issue but I'll leave it open until you had time to test.

@dizietsma
Copy link

Is it at all useful to note that while I stll have the issue I reported above, I also found that while changing langauge in steam to test an MCM translation file, I then found no saves present and had to quit, deploy in Vortex and restart SkyrimSE?

@Rattledagger
Copy link

Testing v1.1.8, games tested original Skyrim and SSE.

The good, switching between profiles for same game seems to keep all changes to settings, at least if "game settings" == "yes" (not tested with choice "no").

More good, if switches from game1, profile1 to game2 and back to game1 but profile2, everything is ok in game1, including using correct save-game-location.

The bad, if switches from game1 to game2, plays game1 and in-game edit some of game1 settings, then switches back to game1 all changes to settings are replaced with the settings from before switched away from game1.

The ugly, if switches from game1, profile1, to game2 and back to game1, profile1, the save-game-location is missing, until you hit "Deploy".

@TanninOne
Copy link
Contributor

Thanks for the testing, I'll look into these.
I agree with your "bad" and "ugly" rating of these issues though the "ugly" is kind of expected as we only "backup" your custom settings, not the settings vortex applies itself - and that only happens during deployment. Problem is that deployment is only automated/warned about if there were changes to the list of enabled mods.

@TanninOne
Copy link
Contributor

@Rattledagger 1.1.9 is out, could you test again please?

@Rattledagger
Copy link

First result, starting with completely vanilla state in original Skyrim and SSE, and starting with completely new %appdata%\vortex, after first adding original Skyrim followed by SSE I got this error-message:
TypeError: Cannot read property 'gameId' of undefined at m (C:\Program Files\Black Tree Gaming Ltd\Vortex\resources\app.asar.unpacked\bundledPlugins\local-gamesettings\index.js:1:3366) at m.then.tap (C:\Program Files\Black Tree Gaming Ltd\Vortex\resources\app.asar.unpacked\bundledPlugins\local-gamesettings\index.js:1:4800) at PassThroughHandlerContext.finallyHandler (C:\Program Files\Black Tree Gaming Ltd\Vortex\resources\app.asar\node_modules\bluebird\js\release\finally.js:57:23) at PassThroughHandlerContext.tryCatcher (C:\Program Files\Black Tree Gaming Ltd\Vortex\resources\app.asar\node_modules\bluebird\js\release\util.js:16:23) at Promise._settlePromiseFromHandler (C:\Program Files\Black Tree Gaming Ltd\Vortex\resources\app.asar\node_modules\bluebird\js\release\promise.js:547:31) at Promise._settlePromise (C:\Program Files\Black Tree Gaming Ltd\Vortex\resources\app.asar\node_modules\bluebird\js\release\promise.js:604:18) at Promise._settlePromise0 (C:\Program Files\Black Tree Gaming Ltd\Vortex\resources\app.asar\node_modules\bluebird\js\release\promise.js:649:10) at Promise._settlePromises (C:\Program Files\Black Tree Gaming Ltd\Vortex\resources\app.asar\node_modules\bluebird\js\release\promise.js:729:18) at Promise._fulfill (C:\Program Files\Black Tree Gaming Ltd\Vortex\resources\app.asar\node_modules\bluebird\js\release\promise.js:673:18) at Promise._resolveCallback (C:\Program Files\Black Tree Gaming Ltd\Vortex\resources\app.asar\node_modules\bluebird\js\release\promise.js:466:57) at Promise._settlePromiseFromHandler (C:\Program Files\Black Tree Gaming Ltd\Vortex\resources\app.asar\node_modules\bluebird\js\release\promise.js:559:17) at Promise._settlePromise (C:\Program Files\Black Tree Gaming Ltd\Vortex\resources\app.asar\node_modules\bluebird\js\release\promise.js:604:18) at Promise._settlePromise0 (C:\Program Files\Black Tree Gaming Ltd\Vortex\resources\app.asar\node_modules\bluebird\js\release\promise.js:649:10) at Promise._settlePromises (C:\Program Files\Black Tree Gaming Ltd\Vortex\resources\app.asar\node_modules\bluebird\js\release\promise.js:729:18) at Promise._fulfill (C:\Program Files\Black Tree Gaming Ltd\Vortex\resources\app.asar\node_modules\bluebird\js\release\promise.js:673:18) at Promise._resolveCallback (C:\Program Files\Black Tree Gaming Ltd\Vortex\resources\app.asar\node_modules\bluebird\js\release\promise.js:466:57)

@Rattledagger
Copy link

More tests with v1.1.9, it seems the "bad" and the "ugly" from 3 days ago is finally working, with save-game path surviving switching between games, and changes made while running another game is still kept then switches back to the other game.
Tests done:
1: Switching between profiles or games, save-game and changes to ini-files seems to be working as they should..
2: Cloning profile, also clones the ini-files and uses the correct save-game.
3: Create new profile, based on the current "Game Settings == 'no'" ini-files is used for the new profile, as would expect.
4: Purge, losing save-game path shouldn't be a problem, since with no mods you can't use the save-games anyway.
5: Purge + switch game ==> forced deploy before switching... The ini-files are ok, the forced deploy isn't always wanted...

So, unless has overlooked something, the multiple bugs with ini-files seems to have been fixed, with the possible exception of the new warning-message that seems to pop-up for each newly added game.

@TanninOne
Copy link
Contributor

Ok, the exception you got is fixed in 1.1.10 so I'm assuming this is finally fixed. Thank you for your patience and the testing!
Please feel free to create a new issue if you encounter a similar error. I can't promise I will see it if you comment on this issue after I've closed it.

@TanninOne TanninOne removed the waiting for reply Highlights that the development team is currently waiting for a response on the labeled issue label Jan 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants