[SOLVED]Generate a text file to desktop

Started by Stranga, Wed 02/11/2016 12:06:42

Previous topic - Next topic

Stranga

Hello everyone!

I was wondering, is there a way to generate a text file through code to the desktop instead of the games folder?

Thank you and hope this makes sense

Crimson Wizard

#1
AGS itself does not allow to create files anywhere except
- game installation folder (only before AGS 3.3.5);
- game's savegame folder (using %SAVEGAMEDIR% path tag in script);
- game's shared data folder (using %APPDATADIR% path tag in script).

This was done with purpose to make AGS a safe enviroment and prevent game developers from damaging user's (player's) system by mistake (or intent).
The only two workarounds are to either create your own custom version of the engine, that allows doing what you want, or writing custom plugin (in which case you take responsibility for outcome).

Stranga

Quote from: Crimson Wizard on Wed 02/11/2016 12:13:31
AGS itself does not allow to create files anywhere except
- game installation folder (only before AGS 3.3.5);
- game's savegame folder (using %SAVEGAMEDIR% path tag in script);
- game's shared data folder (using %APPDATADIR% path tag in script).

This was done with purpose to make AGS a safe enviroment and prevent game developers from damaging user's (player's) system by mistake (or intent).
The only two workarounds are to either create your own custom version of the engine, that allows doing what you want, or writing custom plugin (in which case you take responsibility for outcome).

That's no problem and thanks for replying!

I actually wanted a way to track and update my cutscene numbering because they are all in numerical order. I found a work-a-round by using the alarm clock in my game....its quite nifty!

Crimson Wizard

Actually, I forgot to mention the easy way you can make it save to desktop... well, sort of.
Since AGS 3.3.5 you can setup custom save location in the setup program (on advanced tab). If you do, then all the files game saves will be "rerouted" there. But the script still have to reference special folders (%SAVEGAMEDIR% or %APPDATADIR%).

Stranga

Quote from: Crimson Wizard on Wed 02/11/2016 23:17:03
Actually, I forgot to mention the easy way you can make it save to desktop... well, sort of.
Since AGS 3.3.5 you can setup custom save location in the setup program (on advanced tab). If you do, then all the files game saves will be "rerouted" there. But the script still have to reference special folders (%SAVEGAMEDIR% or %APPDATADIR%).

No problem and thank you for your assistance! I will certainly look into this!

SMF spam blocked by CleanTalk