Accessing config.ini from a mod

Place to get help with not working mods / modding interface.
Vulcan
Long Handed Inserter
Long Handed Inserter
Posts: 52
Joined: Sat Aug 02, 2014 12:34 pm
Contact:

Accessing config.ini from a mod

Post 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
User avatar
prg
Filter Inserter
Filter Inserter
Posts: 947
Joined: Mon Jan 19, 2015 12:39 am
Contact:

Re: Accessing config.ini from a mod

Post by prg »

You can't read arbitrary files from a user's system, even if you knew the path.
Automatic Belt (and pipe) Planner—Automate yet another aspect of constructing your factory!
Vulcan
Long Handed Inserter
Long Handed Inserter
Posts: 52
Joined: Sat Aug 02, 2014 12:34 pm
Contact:

Re: Accessing config.ini from a mod

Post 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
Post Reply

Return to “Modding help”