⚠ Cookies ⚠

By continuing to use this site you agree to the use of cookies. Please visit this page to see exactly how we use these.

Projects

AGS EngineCore-flags for alternative save game directories/configuration files
Tea23First of all let me be clear and apologise if necessary if this has already been requested or actually exists and I can't find it.

I'm helping to create a set of (unofficial) scripts for Arch Linux to install games from GOG, using native Linux binaries where possible. The standard of the project is to install the game to a read-only directory and draw save games and configurations from ~/.gog/$gamename. Ideally, therefore, acsetup.cfg and savegames should be there, but currently AGS expects everything to be in one directory.

So the easiest way I can think of to achieve this would be to add the --savedir and --conf flags (or something similar) to allow the user to specify the location of save games and configuration files where necessary. For example; 'ags /opt/gog/resonance --savedir=~/.gog/resonance/saves --conf ~/.gog/resonance/acsetup.cfg'.

Additionally, such a change would necessitate the addition of the --help flag to inform the user of available flags and how to use them.

This also allows for some reformation of per-user storage on other platforms; save games and configurations in Windows could potentially be moved to %APPDATA% by default, configurable via winsetup.exe or cmd/a desktop shortcut if the user wishes, in the long run making AGS more standards-compliant and more configurable for users and developers.

Overall, this would allow developers to create global launchers for their AGS games on Linux, and still use the main ags engine should they choose to officially support Linux. With our scripts, we include a 'binary' that is a simple shell script that calls the engine (see [url=https://github.com/Tea23/arch-gog/blob/master/products/brokensword/brokensword]the Broken Sword launcher[/url] as an example) that is placed in /usr/bin. This all means that the user has to do very little than just run the game, where currently one has to manually install and locate in all cases.
BigMcI agree that configuration and savegames should be handled more carefully, but I don't know if command line parameters are necessary for that.

Configuration files should be searched first at $XDG_CONFIG_HOME/ags/game and then at /etc/ags/game and maybe next to the game file.
Save games should be written to and read from $XDG_DATA_HOME/ags/game and maybe for compatibility copied at startup from next to the game to the correct location, if $XDG_DATA_HOME/ags/game does not exist yet.

What you describe in the last paragraph should be already possible. Let that shell script create a symlink to the gamefile in a writable folder and use that to start the game.
Tea23I believe ScummVM does the same kind of thing, but [i]also[/i] includes command line parameters. I believe that's how configurable paths were first implemented before ScummVM had a GUI. Since (I don't think) there's no global setup utility for AGS I figured it would make sense to start at the command line in this case as well. Parameters also seem to make sense because the command line is really the only way to launch games in Linux at the moment.

I suppose really the issue is that save games aren't configurable [i]at all[/i] at present and some kind of mechanism should be put in place to allow it. On Windows the option could be added to winsetup; perhaps if Linux ever gets an equivalent tool it could sit there, too. Ultimately it could simply be a value in acsetup.cfg. Maybe the title was poor choice of words on my part.
Crimson WizardSince BigMC started adding new options, I guess savegames destination is a valid candidate too. It just has to be done with big care: there's a bunch of tweaks made for paths in AGS at start, and we do not want to break anything there.
© Adventure Game Studio 2024. Page design by loominous and Darth Mandarb; coding by AGA.
Page generated on 06 May 2024 at 16:00:57