A way to display APPDATADIR and the gang

Started by Monsieur OUXX, Thu 28/03/2019 18:31:20

Previous topic - Next topic

Monsieur OUXX

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.
 

Crimson Wizard

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.

Monsieur OUXX

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.
 

Crimson Wizard

#3
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.

SMF spam blocked by CleanTalk