Page 1 of 1

Accessing config.ini from a mod

Posted: Fri Jul 08, 2016 9:49 am
by Vulcan
I want to access config.ini in Factorio's user data directory. I have a Lua library that reads the .ini file, but I don't know what file path to use to get to config, as this requires going up two levels to the user data directory and then to config/config.ini.
How would I achieve this? I use Windows, but I would like a solution that's cross-platform if at all possible.

Thanks in advance

Re: Accessing config.ini from a mod

Posted: Fri Jul 08, 2016 9:57 am
by prg
You can't read arbitrary files from a user's system, even if you knew the path.

Re: Accessing config.ini from a mod

Posted: Fri Jul 08, 2016 10:39 am
by Vulcan
That's disappointing. Why is this not possible?
The next step would be to ask how to access key binding information in game, presumably the data is there somewhere