XCOM 2
48 ratings
[WOTC] Too Many Mods
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
715.190 KB
18 May @ 1:05pm
22 May @ 11:14am
4 Change Notes ( view )

Subscribe to download
[WOTC] Too Many Mods

Description
A rough project that seeks to solve XCOM 2's 16 bit integer limit on the combined length of the names of all mods you have installed + the name of your save file, by cheating. Basically, if you get that red "Save out of date" error when you try to load old saves, chances are that the names of all of your mods + the save name itself combined to a value greater than 65535.

Note that you should only download this if you've already reached that limit, as this mod will likely remove way more than you would otherwise need removed, and you should just use Remove Missing Mods for WotC instead.

Usage
Functionally, you use it the same way as Remove Missing Mods. It adds a button to your save screen labeled "Unbind Mods and Save." If you've over the 16 bit limit, you have to use this button to save from now on, which also means you'll be unable to actually name your saves.

It does this by only adding "Active Mods" from a manually curated list of Mods that do things on OnLoadedSaveGame and then not adding the rest, since these are the mods that likely do things on "first installation." This doesn't actually "remove" the mods from your save, it just removes their names, so in theory it shouldn't break too much...

However, we suspect that many mods, upon seeing themselves not in the save file, won't play nice, and thus, potentially break things. I'm making this as a proof of concept to see if it works, and if it does, I'd like to add some way to better curate this list down the line so I don't have to manually add mods to exclude, or hope someone more experienced can come up with a more elegant way of doing this that isn't just "pretend those mods don't exist." There's a script in the modding Discord[discord.com] you can use to see which mods do stuff on OnLoadedSaveGame, if you want to help me out.

I've shamelessly reused the code from sq_paradox's Remove Missing Mods for WotC mod, I hope you don't mind...

Like sq_paradox mentions in their original mod, I don't recommend using this mod UNLESS you've run into this problem, since this does directly modify how your game saves itself. Likewise, I've included the same config options, but I've enabled cleaning your save while in tactical. I still do not recommend running this in tactical, but if you absolutely need to, I figured it's better to have the option there than to force you to restart the game. As a matter of fact, as long as you don't exit to menu, your should be able to load your save even if it's over 65535 characters long while in game anyways, but as soon as you menu out, the saves will become unloadable.

Use with caution, back up your saves, pretty much just the same warnings sq_paradox gave.
Popular Discussions View All (1)
6
22 May @ 11:18am
PINNED: List of mods that do NOT get removed
N.C.V.
19 Comments
Papistman 11 Jul @ 3:02pm 
This comment is awaiting analysis by our automated content check system. It will be temporarily hidden until we verify that it does not contain harmful content (e.g. links to websites that attempt to steal information).
XpanD 11 Jul @ 1:35pm 
I created a new mod project in the SDK with a short name, and then (co-)wrote a Powershell script to clone it thousands of times, giving each clone its own number. Great for testing, but unfortunately not something that would scale up to actual mods that do things. Recompiling those is technically possible, but would be way too much work to do for a large mod set. (and would mess with things like automatic updates and load order)

The closest thing you /can/ realistically do is probably to merge simple mods like config tweaks into one big local mod. I've also seen people merge asset mods like voice packs, but that's a bit more involved.
Papistman 11 Jul @ 12:38pm 
@XpanD
You mention doing this earlier:

"I successfully had the game saving and loading over 2000 testing mods, with a limit somewhere around the 2160 mod mark. This was purely due to it overflowing the data block responsible for storing mod names and save metadata, and I could shift that point around by just making my mod names (or even just the save name itself) shorter or longer."

How did you make the mod names shorter? Was it by editing the mod names in the Alternative Mod Launcher?
XpanD 14 Jun @ 2:16am 
@LightenedDark: If you're curious enough, I added details on what to look for to the modding wiki: https://www.reddit.com/r/xcom2mods/wiki/mod_troubleshooting/#wiki_what_is_the_maximum_number_of_mods_i_can_play_with.3F
LightenedDark 13 Jun @ 8:29pm 
I wonder what an normal/average amount of mods would have to be added to a modlist before this issue pops up. I've run about a thousand and not seen it, but that doesn't mean I'm not right around the limit...
N.C.V.  [author] 27 May @ 2:37pm 
Note: It did not fix the Old War Hero bug. I guess just dismiss the extra one you get on load in, since I'm not quite sure why it's not counting as added.
N.C.V.  [author] 22 May @ 11:14am 
Alright there we go, should stop giving you an Old War Hero every time you load in now.
N.C.V.  [author] 21 May @ 5:05pm 
New bug I found. Since this technically removes Resistance Warrior Pack, it'll keep giving you a new Old War Hero every time you load in, so I'll add all the XCOM 2 DLCs to the list in the next update. They won't actually do anything if you don't have them installed, but it should fix that problem.
XpanD 21 May @ 8:42am 
Yep, some mods behave poorly in some situations (MOCX was a recent big find with its Geoscape bloat), and doing a tactical <> strategy transition cleans up a bunch of old stuff from the history.

I've done some limited digging into saves affected by various bloat issues, but I don't /think/ the data blocks that are getting bloated have the same hard character limits. (saw blocks with >80k characters on working saves, though I'm not sure if my search filters were set up properly -- big files are awkward to work with!)
Zedonova Nova 21 May @ 8:36am 
@XpanD I noticed that when I loaded a save after opening the barracks the save files sizes would increase dramatically from 5-8k save sizes to roughly ten times that size 80k. The 80k file sizes were unloadable and would crash my game outright while loading. However, I did some testing. After recruiting new soldiers this would cause the same issue. The increased file save size to 55-80k file sizes. This I believe could be a secondary cause of saves not working correctly.

I did further testing and found out that saving in mission reduces the size back down to 5k which means the barracks details are being saved with the game instance causing the bloating file save size. Then immediately after finishing a mission without recruiting the save file size is reduced down to about 6-7k which loads back fine with no issues.