Adventure Game Studio

AGS Development => Engine Development => Topic started by: Monsieur OUXX on Thu 28/03/2019 18:31:20

Title: A way to display APPDATADIR and the gang
Post by: Monsieur OUXX on Thu 28/03/2019 18:31:20
Suggestion: Add a static function String File.ResolveFile(String fileName) that resolves the full path just like File.Open would, with the possibility of using $APPDATADIR$, $SAVEGAMEDIR$, etc in the file name.
Because I'm frustrated of spending 15 minutes every time I start a new game just to find the right folder where I should place my files. I literally resolve it through trial and error every time.
Title: Re: A way to display APPDATADIR and the gang
Post by: Crimson Wizard on Thu 28/03/2019 19:23:51
Okay, that may be useful for debugging, but regarding paths, default locations are:

$APPDATADIR$ - C:/ProgramData/Adventure Game Studio/your game name
$SAVEGAMEDIR$ - %USERPROFILE%/Saved Games/your game name
$INSTALLDIR$ - in normal mode: where your game exe is in Compiled/Windows; in test mode it checks both project root and Compiled/Windows.
Title: Re: A way to display APPDATADIR and the gang
Post by: Monsieur OUXX on Thu 28/03/2019 19:52:50
Quote from: Crimson Wizard on Thu 28/03/2019 19:23:51
Okay, that may be useful for debugging, but regarding paths, default locations are:

$APPDATADIR$ - C:/ProgramData/Adventure Game Studio/your game name
$SAVEGAMEDIR$ - %USERPROFILE%/Saved Games/your game name
$INSTALLDIR$ - in normal mode: where your game exe is in Compiled/Windows; in test mode it checks both project root and Compiled/Windows.

Thanks.
Inbetween I remembered FillDirList that can help.
Title: Re: A way to display APPDATADIR and the gang
Post by: Crimson Wizard on Thu 10/12/2020 05:26:11
This was never implemented in script, but since 3.5.0 engine now supports "--tell" command line option that prints various information. For example, "--tell-configpath" prints locations of all the configs (default, user's), "--tell-data" prints location of game data + game name etc.

Unfortunately it seems we missed information requested here, but it should be trivial to add this as another option in next release.

Whether to expose this information into script is a separate question imo, as above method should be enough for developer and player to find out where the game searches for its files.