Amineri Posted April 2, 2016 Share Posted April 2, 2016 The Issue One current issue with XCOM 2 (which it really inherited directly from Unreal Engine 3) is how config file merging is done. When the game launches, the Default*.ini files in the XCOM 2 root game config folder ( \Steam\SteamApps\common\XCOM 2\XComGame\Config ) get merged with all DLC and mod XCom*.ini files (located in the DLC and Mods folder, also in XComGame). The result of the merge named as XCom*.ini is put into a writeable folder (on Windows, \Documents\My Games\XCOM2\XComGame\Config). Firaxis has modified this slightly so that for some config files, the result isn't cached, but is regenerated each time. The logic for the merging has an optimization that checks file time-stamps to determine if merging is necessary. I believe the way that it works is that if the time-stamp on either the merged XCom*.ini or the Default*.ini file is later than the time-stamp on the DLC / mod config file, then the merge does not occur, because it "must be up to date". This can fail in one of two ways that I know of, but only for particular config files :The user starts the game with a mod disabled. Disabling doesn't change the time-stamp on any config file, so merging may not occur Firaxis releases an update, with config files with a later date than a mod's config files. Since the mod's config file is older, merging may not occur.Config files in particular that I've observed this behavior with :*Engine.ini*ClassData.iniThere may be others ... I don't claim this list is complete. Issues with these two config files can result in particularly nasty bugs. Engine.ini holds class-overrides, so a failure to merge can result in class-overrides not taking effect, which definitely can lead to buggy operation. ClassData.ini hold classes and ability data, so this file not updating can result in extra classes/ability info hanging around, or not being present when it should. A (Partial) Solution One current way to handle the issue is to delete all of the cached XCom*.ini files in the My Games (or equivalent on Mac/*nix). This has been part of the standard set of "Troubleshooting Tools" for Long War for Enemy Within for a long time. Deleting these files forces the game to regenerate them on the next game launch. Another solution is to add the commandline option -REGENERATEINIS. This has the same effect, forcing a regeneration of all config files when the game is launched. More info about the commandline parameter can be found here : https://udn.epicgames.com/Three/CommandLineArguments.html#INI/Config Files So why is this a partial solution? Because forcing regeneration of the config files has some undesirable side-effects. In particular, graphics settings are stored in the cached version of XComEngine.ini, so forcing them to be regenerated will reset your graphics settings to default each time it is done. There are a lot of other changes to this file as well ... just do a diff of the XComEngine.ini in the My Games folder against the DefaultEngine.ini in the XCOM 2 game config folder, and you'll see that there are a lot of changes. To avoid the headache of constantly re-setting my graphics settings each time I launch, I've copied some of these settings that get created in the XComEngine.ini to the default version, so that the game always starts with a (to me) more preferable set of graphics settings. These settings are found under : [SystemSettings] The steps I took were :Launch the game, using -REGENERATEINIS command-line argument In-game, change the graphic settings to those I want Exit the game Use a text editor to open both XComEngine.ini from My Games and DefaultEngine.ini from XCOM 2 game config folder Copy settings under [systemSettings] from XCom to Default version Launch the game, using -REGENERATEINIS command-line argument Observe that the new default system settings are used for graphicsThis still isn't perfect, since there are other settings that would be nice to preserve. For example, the history of console commands used is wiped out by -REGENERATEINIS. However, for me, the benefit of always getting the correct config file merging every time is outweigh the negative side effects that come from always re-merging. Link to comment Share on other sites More sharing options...
davidlallen Posted April 2, 2016 Share Posted April 2, 2016 This is a good tip. You may already know about these projects, or you may be interested to learn:https://www.reddit.com/r/xcom2mods/comments/4c6qrr/new_way_to_loadsave_ini_configs/http://forums.nexusmods.com/index.php?/topic/3943255-rfc-mod-options-menu/https://www.reddit.com/r/xcom2mods/comments/4c0pah/rfc_mod_options_menu/ Link to comment Share on other sites More sharing options...
Recommended Posts