Adventure Game Studio | Forums

AGS Support => Beginners' Technical Questions => Topic started by: SilverSpook on Mon 10/04/2017 02:27:47

Title: Where are the Savegame files in the latest version of AGS?
Post by: SilverSpook on Mon 10/04/2017 02:27:47
Hi, I'm trying to find the savegame files in the latest version of AGS but I'm having some trouble.  I've checked the AGS folder, user folder, documents, etc...  Where are the savegame files located exactly?  Thanks.
Title: Re: Where are the Savegame files in the latest version of AGS?
Post by: Crimson Wizard on Mon 10/04/2017 07:42:10
Default location is

%USERPROFILE%/Saved Games/

You may use this string directly in Windows explorer, regardless of Windows version. Then find folder named after your game.

Alternatively, a user may set up custom location in winsetup's advanced settings. If they do, it may be anything.
Title: Re: Where are the Savegame files in the latest version of AGS?
Post by: bugmenot on Fri 13/09/2019 23:11:15
Quote from: Crimson Wizard on Mon 10/04/2017 07:42:10
Alternatively, a user may set up custom location in winsetup's advanced settings.
I know it's an old topic, but I'd like to continue it further - what if the game has no such setting?
Is there any command line parameter that can control it instead (e.g. game.exe - savedpath="c:\test\")?

(https://i.ibb.co/mBvP6nk/gui1.png)(https://i.ibb.co/qYszs2K/gui2.png)
Title: Re: Where are the Savegame files in the latest version of AGS?
Post by: Crimson Wizard on Fri 13/09/2019 23:21:28
bugmenot, this does not only depend on a game but also on the version of AGS it was made with.

Judging on your screenshot the game was made with AGS 3.3.0 when custom savegame path was not supported.

The only thing that can control savegame location in this situation is game own setting, but it is still restricted to "%USERPROFILE%/Saved Games/", and may only change the subfolder.

Are you looking to find where saves are stored or trying to change their location?
Title: Re: Where are the Savegame files in the latest version of AGS?
Post by: bugmenot on Sat 14/09/2019 10:10:31
Quote from: Crimson Wizard on Fri 13/09/2019 23:21:28
Judging on your screenshot the game was made with AGS 3.3.0 when custom savegame path was not supported.
But in newer versions, is there a command line parameter for this?
Quote
Are you looking to find where saves are stored or trying to change their location?
The latter.
Title: Re: Where are the Savegame files in the latest version of AGS?
Post by: Crimson Wizard on Sat 14/09/2019 13:12:04
Quote from: bugmenot on Sat 14/09/2019 10:10:31
But in newer versions, is there a command line parameter for this?

Not a command line parameter, but a setting in config, which you may change either from winsetup or by hand in acsetup.cfg.

If you want to run someone else's game with a newer engine you may copy acwin.exe from the recent stable AGS version (3.4.3 now) into the game's folder and run "acwin.exe --setup" from command line. That will launch new setup program. Afterwards just run acwin.exe instead of the game's own exe.
Title: Re: Where are the Savegame files in the latest version of AGS?
Post by: bugmenot on Wed 09/10/2019 11:39:41
Quote from: Crimson Wizard on Sat 14/09/2019 13:12:04
If you want to run someone else's game with a newer engine you may copy acwin.exe from the recent stable AGS version (3.4.3 now) into the game's folder and run "acwin.exe --setup" from command line. That will launch new setup program. Afterwards just run acwin.exe instead of the game's own exe.
It worked!

However, it still saves %USERPROFILE%\Saved Games\[game's name]\acsetup.cfg - doesn't it kind of defeat the whole purpose?
Title: Re: Where are the Savegame files in the latest version of AGS?
Post by: Crimson Wizard on Wed 09/10/2019 14:01:01
Quote from: bugmenot on Wed 09/10/2019 11:39:41
However, it still saves %USERPROFILE%\Saved Games\[game's name]\acsetup.cfg - doesn't it kind of defeat the whole purpose?

The reasons are complicated but maybe this will be corrected in future versions. In short, ags simply does not know where to look for user's acsetup.cfg if it's not there. And since custom save location is written in acsetup.cfg, it needs to find it first...

I don't know if that defeats the purpose, depends on what the purpose is.
Title: Re: Where are the Savegame files in the latest version of AGS?
Post by: bugmenot on Wed 09/10/2019 18:50:02
I think it should look in the game's folder before everything else.

It seems like it's the only thing keeping the games from being portable, so that's the purpose. :-)
Title: Re: Where are the Savegame files in the latest version of AGS?
Post by: Crimson Wizard on Wed 09/10/2019 21:00:06
Quote from: bugmenot on Wed 09/10/2019 18:50:02
I think it should look in the game's folder before everything else.

It seems like it's the only thing keeping the games from being portable, so that's the purpose. :-)

It does look in the game's folder first when reading config. But it's not always safe to write in the game's own folder because it may be a read-only location, this is why starting with AGS 3.3.5 user config is now saved separately in a safe writeable location. I doubt it will ever be changed back (the location itself may be changed to something more appropriate than "Saved Games" though).

The configuration is read in two steps:
1) the default config found in game folder
2) the user config currently found in the standard save location.
They are then merged, and user config options override default ones when possible.

If by "portable game" you mean keeping config settings when you move your game to another place, then you may copy acsetup.cfg to the game's folder, or edit that one by hand, and game will read same options from there.
For the reference, there's a list of options for acsetup.cfg: https://github.com/adventuregamestudio/ags/blob/ags3/OPTIONS.md
Title: Re: Where are the Savegame files in the latest version of AGS?
Post by: bugmenot on Wed 09/10/2019 22:58:54
Actually, I've tried that.
By simply launching the game (by launching acwin.exe as previously suggested) it does read and use the local acsetup.cfg...and then saves a minimal one at the standard save location.
By minimal I mean this:
Code (ags) Select
[graphics]
render_at_screenres=0
windowed=1
[language]
translation=

All of which are settings that already exist at local acsetup.cfg.

Just to clarify, I ran acwin.exe --setup, then moved the resulting acsetup.cfg into the local path, then ran acwin.exe to run the game.
The result was having 2 acsetup.cfg files - a full one locally and a minimal one at the standard save location.
Title: Re: Where are the Savegame files in the latest version of AGS?
Post by: Crimson Wizard on Wed 09/10/2019 23:17:19
Well, yes, to clarify, it will still write few options that may be changed from the game's script there, there's nothing that can be done with that at the moment.
Title: Re: Where are the Savegame files in the latest version of AGS?
Post by: bugmenot on Thu 10/10/2019 21:52:25
The weird thing is those settings are 100% identical to what's already inside the original acsetup.cfg, so why duplicating them and just them?
Title: Re: Where are the Savegame files in the latest version of AGS?
Post by: Crimson Wizard on Fri 11/10/2019 08:33:21
Quote from: bugmenot on Thu 10/10/2019 21:52:25
The weird thing is those settings are 100% identical to what's already inside the original acsetup.cfg, so why duplicating them and just them?

The engine simply saves last values of particular options that may be changed during the game by a script command, regardless of whether they are in default config or not, that's all.

Ofcourse it could be forced to check default config to see if they are matching, but that was extra work to code, and since this user config usually contains more and edited by winsetup, I did not see a point to do so at that time.

Is this an actual problem? I could open a ticket in the issue tracker to let developers discuss this.
Title: Re: Where are the Savegame files in the latest version of AGS?
Post by: bugmenot on Sat 12/10/2019 20:37:00
Quote from: Crimson Wizard on Fri 11/10/2019 08:33:21
Is this an actual problem? I could open a ticket in the issue tracker to let developers discuss this.
It's just the only thing that stands between AGS games being considered as portable programs.
It's nicer when everything happens inside the game's folder and nowhere else.
Title: Re: Where are the Savegame files in the latest version of AGS?
Post by: Crimson Wizard on Sun 13/10/2019 09:28:50
Quote from: bugmenot on Sat 12/10/2019 20:37:00
Quote from: Crimson Wizard on Fri 11/10/2019 08:33:21
Is this an actual problem? I could open a ticket in the issue tracker to let developers discuss this.
It's just the only thing that stands between AGS games being considered as portable programs.
It's nicer when everything happens inside the game's folder and nowhere else.

The thing is, we were moving away from that all the time in past years. AGS started having everything in game's folder, config, saves, etc. Later it was found to be causing trouble under number of circumstances, or conflicting with recommended program behavior on newer operating systems. There are edge cases too, when the game folder cannot be written in at all, for example when a player runs games from a compressed hard drive. This is why AGS now saves files somewhere else by default.

I will open a ticket for consideration about having user config  in a game folder, and maybe everything else at once, as an optional mode.
Title: Re: Where are the Savegame files in the latest version of AGS?
Post by: Cassiebsg on Sun 13/10/2019 12:55:13
That would be awesome. I hate how windows structure pollutes the HD.  :-X
I have a ton of AGS savegames folders, games that I played and have deleted long ago... and deleting those "leftovers" is just annoying and time consuming.

I would suggest a drop down where one could choose: default, game folder or other location (and then have a box under it to type)
This would make it fast to change the save games folder, or a "little more work" by entering a custom location.
Title: Re: Where are the Savegame files in the latest version of AGS?
Post by: eri0o on Sun 13/10/2019 13:00:40
Just a note that the way it's, is the better way for commercial games on platforms like Steam, GOG, ... Where the game directory (updated per version) and savegames (which is clound synced) and configs (system dependant, but GOG and Steam are cross platform) have to be in different locations.

So I would be in favor to keep as is. This also makes possible to run games from read-only filesystems.
Title: Re: Where are the Savegame files in the latest version of AGS?
Post by: Crimson Wizard on Sun 13/10/2019 13:14:26
Quote from: eri0o on Sun 13/10/2019 13:00:40
So I would be in favor to keep as is. This also makes possible to run games from read-only filesystems.

To underline again just in case, this is assumed to be an OPTION.
Title: Re: Where are the Savegame files in the latest version of AGS?
Post by: bugmenot on Sat 15/02/2020 07:20:27
Quote from: Crimson Wizard on Sun 13/10/2019 09:28:50
I will open a ticket for consideration about having user config  in a game folder, and maybe everything else at once, as an optional mode.
Did you end up opening it? Is there a link you can share?

Thanks!
Title: Re: Where are the Savegame files in the latest version of AGS?
Post by: Crimson Wizard on Sat 15/02/2020 10:37:40
https://github.com/adventuregamestudio/ags/issues/961

It's suggested for the next minor update (3.5.1, if it happens).
Title: Re: Where are the Savegame files in the latest version of AGS?
Post by: bugmenot on Fri 03/12/2021 16:36:21
Quote from: Crimson Wizard on Sat 15/02/2020 10:37:40
https://github.com/adventuregamestudio/ags/issues/961

It's suggested for the next minor update (3.5.1, if it happens).
Glad to say 3.5.1 did get out and fixed this issue!

The solution is to:
Not sure if it was automatic or manual by my CFG file has it as relative folder:
Code (ags) Select
user_data_dir=.\conf

(https://i.ibb.co/2gr6KDg/image.png) (https://ibb.co/D5FbKx5)