Adventure Game Studio | Forums

AGS Support => Beginners' Technical Questions => Topic started by: SilverSpook on 10 Apr 2017, 02:27

Title: Where are the Savegame files in the latest version of AGS?
Post by: SilverSpook on 10 Apr 2017, 02:27
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 10 Apr 2017, 07:42
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 13 Sep 2019, 23:11
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 13 Sep 2019, 23:21
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 14 Sep 2019, 10:10
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 14 Sep 2019, 13:12
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 09 Oct 2019, 11:39
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 09 Oct 2019, 14:01
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 09 Oct 2019, 18:50
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 09 Oct 2019, 21:00
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 09 Oct 2019, 22:58
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: Adventure Game Studio
  1. [graphics]
  2. render_at_screenres=0
  3. windowed=1
  4. [language]
  5. 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 09 Oct 2019, 23:17
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 10 Oct 2019, 21:52
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 11 Oct 2019, 08:33
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 12 Oct 2019, 20:37
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 13 Oct 2019, 09:28
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 13 Oct 2019, 12:55
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 13 Oct 2019, 13:00
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 13 Oct 2019, 13:14
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.