How to change the Saved folder location?

A game packaged in Shipping configuration saves its stuff to C:\Users\UserName\AppData\Local\GameName.

How do I change it to, say, Documents\My Games\GameName?

4 Likes

Bump…

1 Like

Bump…

1 Like

I want to know that one too

1 Like

Waiting for answer…

1 Like

Having the same issue with Windows Shipping Builds, but figured it out.

I followed it back to the function where the UserSettingsDir is set for shipping games.

On Windows, it calls UserSettingsDir() in WindowsPlatformProcess.cpp.

If you change the following at around line 785:

HRESULT Ret = SHGetFolderPath(NULL, CSIDL_LOCAL_APPDATA, NULL, SHGFP_TYPE_CURRENT, UserPath);

to:

HRESULT Ret = SHGetFolderPath(NULL, CSIDL_MYDOCUMENTS, NULL, SHGFP_TYPE_CURRENT, UserPath);

and add a ā€˜My Games’ folder to the final string at around line 789:

WindowsUserSettingsDir = FString(UserPath).Replace(TEXT("\\"), TEXT("/")) + TEXT("/") + TEXT("My Games/");

It will create the Saved folder in My Documents/My Games/GameName/Saved/, which is similar behaviour to a number of UE titles. In there right now alongside our game on my machine is /SpecOps-TheLine/ and /The Vanishing of Ethan Carter/.

What’s weird is this comment above the line that sets the user folder in appdata, which says to me this is either an oversight or a change of plan:

// get the My Documents directory

You can also look into Paths.cpp, in the functions ShouldSaveToUserDir() and GameUserDir() if you don’t want to modify the WindowsPlatformProcess.cpp, but modifying just the windows one will stop anything weird happening with other platforms.

Hope this helps!

  • aguycalleddave
2 Likes

Is there any official way of doing this I wonder? Any Epic dev care to comment?

3 Likes

Bumping this… Curious about this situation for windows 10… since My Documents have now changed to just ā€œDocumentsā€ Using this method, it wouldn’t work if you distributed to a user who isn’t using one or the other. I might end up using APPDATA to store save games because of this problem.

Bump…

Bump. But how about solution that uses blueprints instead? Please? Why hasn’t Epic staff chimed in on this question?

I also would like to here is there any proper way to do this.

I also would like to know if there is any proper way to do this.

Yup yup, would love to see a blue print node or console command that lets us set this.

Bumping this too. Would love a Blueprint or Packaging option to do this.

bumping …

1 Like

bump, it’s crazy that there is no configuration option to change this!

2 Likes

Buuuuump. Can’t believe still no Epic staff answering this.
And I don’t want to build the engine from source.

Bump…

Bump! Bump! Bump! Config option please.

Just ran into this issue when I have a saved game but deleted the packaged folder and remade it to find that same save game still there. Now I’m sure Epic has good reason to place it inside the appdata but being able to change it with blueprints or an options menu would be helpful.

1 Like