Specify where savefiles/datafiles are stored

60 views
Skip to first unread message

Dannii Willis

unread,
Apr 22, 2012, 10:30:21 PM4/22/12
to garglk-dev
Is it possible to specify that savefiles/datafiles should be stored in
another directory than that of the story file?

Ben Cressey

unread,
Apr 23, 2012, 2:46:17 AM4/23/12
to curiou...@gmail.com, garglk-dev
On Sun, Apr 22, 2012 at 7:30 PM, Dannii Willis <curiou...@gmail.com> wrote:
Is it possible to specify that savefiles/datafiles should be stored in
another directory than that of the story file?

Not if you are calling glk_fileref_create_by_name, although glk_fileref_create_by_prompt will allow the player to store the file in other locations.

I still need to incorporate the 0.7.4 API recommendations for files, but I don't anticipate that anything there will change this behavior.

I suppose you might mean whether the player can configure Gargoyle to save files in a specific location. That's not possible now but if you can give me a general overview of what that feature should look like, I will consider it. It's problematic because game authors can distribute a custom configuration with their story files; Gargoyle would need to ignore those directives or else they would provide an easy way out of the sandbox.

Dannii

unread,
Apr 23, 2012, 9:32:20 AM4/23/12
to garglk-dev
Sorry, yes I meant as a player/administrator. I am thinking of a system with multiple users who share their IF stories folder, but I think I'll be able to use union mounts to separate out their savefiles.

If you wanted to support this, I imagine it as a config variable which would simply set which folder where they would be written to. Set to ~/IFSaves/ for example. If the security concerns would make this infeasible then don't worry - I wasn't actually thinking of them at all.

(sorry for the direct reply Ben!)

Ben Cressey

unread,
Apr 23, 2012, 11:07:05 AM4/23/12
to curiou...@gmail.com, garglk-dev
It would be straightforward to leverage environment variables for this. I do something similar already to allow players to configure the default games directory under Gtk, which doesn't or didn't support remembering the last opened directory on most platforms.

The main advantage to this approach is that it's extremely quick to implement; the main disadvantage is that it's not discoverable short of reading this thread, the commit messages, or the source code. But it's in good company there, unfortunately, so if the plan seems workable to you I can add the feature.

I am thinking of three variables - GLKDATA, GLKSAVE, GLKTEXT - which if set will provide the base directory for files with the corresponding usage mode. If that's too much, I can merge it into a single variable.

Does that seem worthwhile or does it just substitute one configuration challenge for another?


--
You received this message because you are subscribed to the Google Groups "garglk-dev" group.
To post to this group, send email to gargl...@googlegroups.com.
To unsubscribe from this group, send email to garglk-dev+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/garglk-dev?hl=en.

Dannii Willis

unread,
Apr 23, 2012, 9:55:31 PM4/23/12
to gargl...@googlegroups.com
I think just one environment variable would be enough for all file types.

And as to discoverability, what about a readme file and/or a page on the wiki? I already thought it was a bit strange there was no readme. I'd offer to help put one together, but I've never dug into the innards of gargoyle. I will say that the ini file is very helpfully commented though!

Ben Cressey

unread,
Apr 25, 2012, 11:13:07 AM4/25/12
to curiou...@gmail.com, gargl...@googlegroups.com
OK, I'll collapse it down to one variable (likely GLKDATA).

More documentation is a great idea. Even if no one else steps forward to write it, I would very much appreciate input on what content would be most valuable. The .ini comments are nice but I think probably unsatisfying to many players.

Apart from the .ini settings and the environment variables, I'm not sure what other aspects of the runtime behavior people would want to customize. Any thoughts?


--
You received this message because you are subscribed to the Google Groups "garglk-dev" group.
To view this discussion on the web visit https://groups.google.com/d/msg/garglk-dev/-/nJjmmXVG3i0J.

Dannii

unread,
May 4, 2012, 8:48:27 PM5/4/12
to gargl...@googlegroups.com
I had another look at the ini file and it's actually very well documented.

One thing I couldn't understand is what the fifth letter of propr, propi etc means. Obviously prop means proportional and mono means monospaced, but I don't get what the last letter is.

It might be good to clarify that colours are RGB hex (like CSS but without the #).

You use monoaspect in the terp specific section, but don't explain it in the text settings above.

Jesse McGrew

unread,
May 4, 2012, 10:26:32 PM5/4/12
to curiou...@gmail.com, gargl...@googlegroups.com

(r)oman, (i)talic, etc.?

Dannii

unread,
May 4, 2012, 10:29:28 PM5/4/12
to gargl...@googlegroups.com
Ahh, yes of course. And z is bold italic. Still, could be hinted better.

Dannii Willis

unread,
Feb 18, 2013, 7:14:12 AM2/18/13
to gargl...@googlegroups.com
Okay. So I just set up a windows installer for Kerkerkruip, using Gargoyle. Works great.

In fact it works so well that it is even managing to store its data files in a mystery location. I've searched the whole drive and I can't find them!

I guess that's a good thing, I don't need to worry about the user being able to write to Program Files. But I'm still mystified as to where they are!

Dannii Willis

unread,
Feb 18, 2013, 7:46:48 AM2/18/13
to gargl...@googlegroups.com
Remko solved the mystery: they get placed in C:\Users\Remko\AppData\Local\VirtualStore\Program Files (x86)\Kerkerkruip
Reply all
Reply to author
Forward
0 new messages