XCOM 2
31 ratings
How to Preserve Mods' Configurations in a Local Mod
By TeslaRage
This guide describes step-by-step on how to create a local mod for XCOM 2: War of the Chosen to preserve workshop mods' configuration changes so that you don't lose them when mods are automatically updated by Steam.
   
Award
Favorite
Favorited
Unfavorite
Tools and Assumptions
All you need to make this happen is a text editor. The simplest one is Notepad but I highly recommend using Notepad++. All the files mentioned in this guide can be edited with any text editor.

This guide also assumes that you are already using the community's favorite Alternative Mod Launcher for XCOM 2. If you are not familiar with it then I highly suggest to start using it for the best XCOM 2 modding experience.
Setting up Alternative Mod Launcher (AML) to Read Local Mods
  1. Create "mods" folder in the following directory
    ..\SteamLibrary\steamapps\common\XCOM 2\XCom2-WarOfTheChosen\XComGame
  2. Add above path to AML > Settings > Mod Directories. Make sure it is below the workshop directory.
  3. Done. Now AML is ready to read local mods.
Creating a Local Mod
  1. In the "Mods" folder that was created in previous section, create a new folder called "ZZZLocalTweaks". So you will end up with this directory.
    ..\SteamLibrary\steamapps\common\XCOM 2\XCom2-WarOfTheChosen\XComGame\Mods\ZZZLocalTweaks
    The name of the folder starts with "ZZZ" ensuring that this folder is the last one to be read if you have more than 1 local mods.
  2. In the new "ZZZLocalTweaks", we will now make the game recognize this folder as a mod. Create a new file called "ZZZLocalTweaks.XComMod". Yes, the name of the file must match the folder name.
  3. Copy paste the following content into the XComMod file.
    [mod] publishedFileId=0 Title=MyTweaks Description=Description of My XCOM 2 Mod. RequiresXPACK=true
  4. At this point, you should be able to see this local mod in AML though it does nothing. The next section describes how to create configuration files.
Creating Configuration Files
  1. Before you start creating your configuration files, it is important to understand how to "operate" or "handle" configuration entries. The best resource for that is this article[robojumper.github.io] written by robojumper. I suggest you read everything and pay special attention to "Config files". Done? Okay you can now move on to the next step.
  2. In the local mod folder, you will create another folder named "Config". Yes, it must be "Config". You will now end up in this directory.
    ..\SteamLibrary\steamapps\common\XCOM 2\XCom2-WarOfTheChosen\XComGame\Mods\ZZZLocalTweaks\Config
  3. In the "Config" folder is where you can start creating your configuration files. Configuration files are of file type "ini" and the name of the files is dependent on the mod configs' that you are trying to preserve.
  4. You could start creating your files here but to keep things organised; considering that many of us run hundreds of mods; you can and should organise your files into folders. Suggested naming convention for the sub folder is <STEAMID>_<MODNAME>. We do not have to be super strict about this. The idea is to keep things organised.
  5. As an example, we will use TeslaRage's Loot Mod (TLM) as it contains a lot of configuration entries that would be perfect to preserve. Now create a new folder called "2814111896_TeslaRage Loot Mod". At this point, your directory should look something like this.
    ..\SteamLibrary\steamapps\common\XCOM 2\XCom2-WarOfTheChosen\XComGame\Mods\ZZZLocalTweaks\Config\2814111896_TeslaRage Loot Mod
  6. Let's say you always play with Iridar's Five Tier Weapon Overhaul, and you want to save yourself the hassle of having to reconfigure TLM whenever the mod is updated. You can preserve the setup by creating "XComTLM.ini" file in the folder created in the previous step.
  7. In that file, you can start to create configuration entries that will override the mod's original configurations. This guide assumes that you already know what needs to be configured. Please ask the mod's authors if you are not sure.
  8. Continuing on with the configuration entries, here is what is needed in your XComTLM.ini file to preserve your setup for Iridar's 5TWO.
    [TeslaLootMod.X2BaseWeaponDeckSet] ; Uncomment if 5TWO or LWotC is used +BaseWeaponDecks = "TLM_CG_BaseWeapons" +BaseWeaponDecks = "TLM_LS_BaseWeapons" [TLM_MG_BaseWeapons X2BaseWeaponDeckTemplate] ; Uncomment if 5TWO is used Requirements = (RequiredTechs = ("CoilGunTech_LW")) [TLM_CG_BaseWeapons X2BaseWeaponDeckTemplate] ; Uncomment if 5TWO is used Tier = 2 Requirements = (RequiredTechs = ("MagnetizedWeapons")) [TLM_LS_BaseWeapons X2BaseWeaponDeckTemplate] ; Uncomment if 5TWO is used Tier = 3 Requirements = (RequiredTechs = ("LaserWeaponsTech_LW")) [TLM_BM_BaseWeapons X2BaseWeaponDeckTemplate] ; Uncomment if 5TWO or LWotC is used Tier = 4
  9. Save the file and that's it! Your setup is now safe from mod updates.
  10. You can do this with any mod, though there are some knowledge of configuration entries needed.
Final Steps
Now that you have the local mod created, you need to make sure that it does indeed work as expected.

  • If you have been creating the local mod while AML is running in the background, you need to force AML to search for new mods. To do this, go to File > Search for new mods.
  • If AML is not running, launch AML and your new local mod should appear as a new mod.

In AML, ensure that the mod is selected and go to "Config" tab. Click on "Select INI to edit". Your local configuration file should appear and if not, you need to re-read the previous steps and ensure that everything has been correctly set up.

Before launching the game, ensure that the local mod is enabled and validate that the local config is working as expected.
Final Notes
Now that you have a local mod to store other mods' (or even base game's) configurations, you need to be aware of a few things.

  • Whenever a mod is updated, your configurations are safe BUT you still need to make sure that the mod is still using the same configuration variables. If not, your "saved" configurations will not take effect because the mod no longer recognises the configuration variables.
  • Whenever you are setting up your modlist for a new campaign, it is good to review your local configurations to ensure that either they are still what you want them to be, or whether they need to be removed entirely because you will not be running the mod. There is no harm to leave them there, but if you don't housekeep, you will end up with a very messy local configurations mod.

I hope this has been helpful. Thank you for reading!
3 Comments
RustyDios Sep 23, 2023 @ 10:17am 
It needs to match filenames :)
Montressor Sep 23, 2023 @ 6:35am 
Does it always have to be XComTLM.ini ? or do i need to match the file name with the name of the file where the value i want to change is located?
ExitSign Jul 26, 2023 @ 4:26am 
Just what I needed, thank you!