qsniyg / ksp_stuff

GNU General Public License v3.0
9 stars 4 forks source link

Implement configuration file #11

Closed qsniyg closed 5 years ago

qsniyg commented 5 years ago

This implements #9, using a configuration file beside the script (config.ini), which is automatically generated based off your WINEPREFIX. You can also generate it again for other WINEPREFIXes (through --generate_config), which will append whatever new games it finds to config.ini.

All of the options that were previously available in the code are still available through the configuration system, as well as a few more (such as where you want the movfs4l_log.json to be located, it defaults to the game directory).

If you run it in a game directory, it will automatically choose that game (unless you specify another using --game [gamename]). Otherwise, you will have to specify the game manually (currently not documented, will add that later).

The default profile can be modified through the default_profile, which defaults to "Default". You can of course change the actual profile at runtime, via --profile [profilename].

In fact, any of the options can be modified at runtime, either via -- options, or through environmental variables (MO_option=value).

It also links loadorder.txt for Fallout 4 and Skyrim SE (following MO's actual behavior for the titles), and allows for a relatively flexible (although hardcoded) system to add custom support for new games.

I also fixed #10 and #6 while I was at it.

I have tested this with Skyrim, without any issues, but I haven't tested this with Fallout 4 yet.