XCOM 2
[WOTC] Fix Save Bloat
41 条留言
Zelfana  [作者] 9 月 26 日 下午 4:18 
It does work for Ironman but you won't have backup saves so use with extreme caution.
IFIO 9 月 26 日 下午 3:06 
This may be a rather redundant question, but i take it that with ironman saves this does nothing?
DaViper 9 月 10 日 上午 5:58 
I have had zero issues with the way I do things @oniwabanshu.

Modding IS a risk all by itself. :steamhappy:

The issue is rooted in how strat layer saves are done VS. tactical saves. I have a 12+meg tactical save I tested a few minutes ago with zero problems.

( The last time I had a failed Strat save, it was 9meg in size. 7-8 are pushing it on my system with 30sec-1min black screen to normal transition screen.)
Oniwabanshu 9 月 9 日 下午 11:27 
@DaViper unfortunately, loading a save is like a roulette, there is always a chance they don't load, it has happened to me, a lot, usually with longer missions like facility assaults, but often you can tell something bad might happen when the autosaves stops at like turn 3, in a 17 turn mission.
DaViper 9 月 7 日 上午 6:16 
@XpanD...you were running MocX. I should have caveated my post below yours with "MocX is NOT worth the mess!".:steamhappy:
I've never had a tactical turn save larger than 12meg...and those loaded fine. <shrugs>
XpanD 9 月 7 日 上午 3:48 
I've had a good few tactical saves bloat too large to load, so that's unfortunately not 100% reliable either. Always on longer missions, and often involving the Lost. (and seemingly sped up if Hive is also present)

Going to try without MOCX next run, see what that changes in my case.
DaViper 9 月 7 日 上午 3:16 
I have had this happen (as you can see from my posts here below) over the years, and I don't even sweat it any longer.

My rule of thumb (with 400+mods loaded for a baseline) is roughly 65-70% of the way through a campaign for the bloat to hit. (On my system, no matter the troubleshooting steps, this will happen ONLY to the Strategic saves. Tactical saves, no matter the size load normally.)

The strange bit? On my Arch system (running proton) I am monitoring disk/cpu activity during this black screen to cut screne timeout and there is ZERO activity on either. It is almost as if a 'sleep timer' has been set and increases the bigger the save.

My personal solution after that rough estimate I mentioned, is to always, ALWAYS end my session on the final tactical turn. Make sure that turn is saved, quit the game. Next session start that turn and finish the mission. ZERO issues with tac saves (even larger ones such as Lost missions).:steamhappy:
Oniwabanshu 9 月 6 日 下午 8:48 
@XpanD I am using both of those =S
And you are right, it goes back to normal right after returning to the avenger after a mission.
But I have lost a chunk of progression a few times when i forget to check the folder to see if the file save is too large and run the command and save, cause missions tend to bug out egregiously often T-T
XpanD 9 月 5 日 下午 1:28 
MOCX without MOCX Customizer+ is known to do this, only one that I'm aware of. (think it still happens with the Customizer, just more slowly? and with that issue transitioning to tactical cleaned up most of it)
Oniwabanshu 9 月 5 日 下午 1:24 
Do you know of a mod that makes this situation worse? I have been having to use this constantly... my saves are ballooning over 10 MB the longer i stay at the geoscape. I am playing LWoTC with TedJam right now.
Nitsah 4 月 5 日 上午 6:53 
Yeah eventually there stuff that just builds up and it doesn't get cleared.
DaViper 1 月 29 日 下午 9:22 
@[BofG]DaBigKahuna
Really not sure what the tactical issue is for you. The ONLY issues over the last couple years (other than the strat bloat + my described 'soft-lock' on initial load) have been maps. Tactical hasn't been issue at all through the last...4 CI campaigns. The last one was the largest mod count I'd done at 501, and no problems...oh wait. MoCX. I'm sooo over that mod. :steamhappy:
[BofG]DaBigKahuna 1 月 29 日 下午 3:03 
@Zelfana, thanks for all you have done. This utility is on the right track and I hope you'll crack the CI incompatibility soon.

@DaViper, I noticed the same thing, when you just return to strategic from tactical, your saves are at the smallest. It just goes up from there, until the next tactical mission. The way I was managing save sizes before was to equip the squad on assault missions only, then cancel, switch to infiltration / ops, and immediately deploy without any changes. This keeps the save growth to only 0.5 MBs per CI mission, vs equipping and deploying from ops grows 1.5 MB per mission and infiltration grows 4 - 5 MBs. Sounds weird, but this was my tried and tested method. What eventually ends game for me though is the tactical layer just crashes trying to load. No matter what kind of strategic save management I do, eventually I reach a point where the game crashes switching over to tactical. Usually around FL 13 - 15.
DaViper 1 月 28 日 下午 11:01 
part 2
Late game really busy tactical saves can also be large, but I have never seen one past 10meg or so, and have had no issues with tactical save/restores.
-------caveat: this specifically excludes issues with new-mod/maps.

My biggest 'grrrr' with strategic restores is the lag time that happens between selecting the game load on the main screen to the time it takes to get to the cut screen that prefaces the return to the avenger screen.

After the 1/2 way point in a campaign this soft lock gets longer and longer. I'm on a decently speccd box, and I've seen that 'lock' take up to 40 seconds to clear.

This is specific to strat saves. Tactical saves do not exhibit this lag-lock when restoring.

I appreciate the work you're doing with this one.
DaViper 1 月 28 日 下午 10:59 
I follow this mod/thread as it does interest me.

I am a dedicated CI player though, and right now just not willing to futz that up. (500 mods + troubleshooting + curating is enough to mess with, heh heh.)

That said, there is a CI trick that works for me. I monitor the save file size when the game auto saves (i don't ironman). When the save file starts to balloon (more than 5-6mb), I do this:

a. I make sure to finish a tactical mission, return to the avenger.

b. Immediately move to the geoscape and then right back to the avenger screen.
This forces a strategic save and it will always be back to 'normal' (2.5-4.5meg for mid to late campaigns).


After that first save, subsequent geoscape to Avenger screens will start that balloon process up again.
Fortunately, this only needs to be done a couple times after the mid-point of the campaign thru the finish.

-part 2 next----->
RakkoHug~<3 1 月 28 日 下午 7:44 
Oh, Thank you so much for you information, Kahuna.
Zelfana  [作者] 1 月 28 日 下午 2:13 
Yeah I tried my best to make Covert Infiltration work correctly with this but it's still very janky because of how CI did those chain things. All chains would break completely without the extra handling I put in. Honestly CI would need an overhaul on that system because it's partly at fault for bloating the saves.

I may look into improving the handling later but I already did all I could at the time and may not be able to do any more so no real promises.
[BofG]DaBigKahuna 1 月 28 日 下午 12:57 
Thanks for trying to address save bloat. This mod worked pretty well for a while, dropping saves from 13 mb down to 5 mb. However, I think I found an infrequent bug where infiltration and assault missions get wiped. For example, sometimes, after deployment, the infiltration of rescuing a person or capturing a collaborator gets wiped when using the command. When the infiltration timer hits, the mission doesn't occur and the troops are sent back with a will hit.

The infiltration mission wipe is an annoyance, but the game breaker are assault mission wipes. I used the command during month start to drop the save sizes. But now all my dark event counter missions have their mission wiped, so they never trigger on the map. They are still listed on the pending mission list, but without their actual missions.

I am running odds season 9 collection, so CI is enabled. Please let me know if this is expected behavior for CI + this mod.
Nitsah 1 月 5 日 下午 7:48 
Sadly the first time I enter the command it actually increases my file size and doing it again just freezes my game. Using lwotc+ted jam.
RakkoHug~<3 2024 年 12 月 24 日 下午 1:51 
Pardon me, is anyone using this mod with covert infiltration?
Just a Nobody 2024 年 11 月 29 日 下午 9:43 
I just started experiencing the bloated crashes. Amazing mod! Thank you
Oniwabanshu 2024 年 11 月 22 日 下午 7:40 
My game was crashing to desktop when trying to load certain saves and i had no idea it was related to this.
FifiLaFleur 2024 年 11 月 9 日 下午 8:20 
I just wanted to thank the developer of this mod for actually addressing the problem in a very practical way. I don't know how no one else could come up with this work-around until now. As a software developer myself, I want to recognize Zelfana for doing the community a great service, and did it with such a practical and pragmatic approach, with relatively small amount of code. Cheers :)
Zelfana  [作者] 2024 年 11 月 5 日 下午 4:01 
Tactical is likely impossible to fix in this manner. The only real fix there is for mods to submit less GameStates and each mod needs to do that themselves.
airpirata 2024 年 11 月 5 日 下午 2:01 
Thanks for the mod, could you make the same mod, but for the tactical part of the game? And it's not the first time I've come across that if a very long mission, then I can't load the late saves, I have to play with the working save until the end of the mission
Mr.Nuke 2024 年 10 月 5 日 下午 7:41 
You guys are awesome! Just now reading this. Thanks for shedding much light on this for me. XPanD is def the homie!
LeyShade 2024 年 10 月 1 日 上午 6:28 
@Zelfana - Thank you for confirming, and please extend thanks to XpanD for confirming the root cause of the issue, as this aligns with our own experiences, and would explain the numerical hard limit.
Zelfana  [作者] 2024 年 10 月 1 日 上午 6:18 
The name lengths issue for save files was confirmed by XpanD on the modding Discord using hundreds of literally empty mods and changing save name and mod name lengths. It doesn't prevent the game from launching and running correctly or even making the save file but when you try to load one of these saves it can't read the data from it due to the data field that contains the list of enabled mods saved to the file being too long.
LeyShade 2024 年 10 月 1 日 上午 6:03 
@Zelfana - Regarding your response to Mr.Nuke, is that clarified that the hard number can be circumvented by changing the mod and save names, because in our own testing this has made no difference to the hard limit of additional modules that the engine can handle before destabilisation?
LeyShade 2024 年 10 月 1 日 上午 6:01 
@Fenrira - These extensive load times are mostly caused by use of unnecessary '//' line breaks in configuration files, which produce hidden redscreens as the game has to process them every single time it so much as looks at a file containing them, drastically increasing processing loops which can cause memory leaks and contribute to extraneous save file size.

Zelfana's mod here does a great job of dealing with how that effects some of the strategy lair by essentially mimicing the way the cleanup process works, but the true root to fixing it is simply content creators adhering to a universal, updated set of formatting guidelines to prevent the issue from even occuring.

Do note however that this is a functioning issue stemming from Unreal Engine itself, and updating millions of lines of code across thousands of mods would be practically impossible for most people.
Zelfana  [作者] 2024 年 10 月 1 日 上午 5:43 
@Mr.Nuke

No, that's a separate issue. It is entirely caused by combined mod name and save name lengths becoming too long for the field that data is stored in. The only fix for that is to have less mods, move config only mods to a single local mod, etc.
Mr.Nuke 2024 年 10 月 1 日 上午 1:53 
This is interesting. I recently tested the limits of mods enable before saves get corrupted. I found that I can load 1337 mods and still save+load but 1292 is the sweet spot as I still had freezes and weird glitches at 1337. The save name decreases the blocks available so I used a single digit name "1" etc. I wonder if your mod has a side effect of allowing more mods to be loaded without corruption? That would be clutch af.
DaViper 2024 年 9 月 29 日 下午 9:04 
@Fenrira I can't speak to the Mac (I'm on PChardware with Arch/Proton_GE). IIRC isn't there problems with the AML on mac?

The load times DO increase with save size as the campaign progresses (with larger saves).
It feels like a softlock on the main game menu with up to 30 seconds before hitting the load animation cutscene.

On BROKEN saves (that will CTD) I've seen a load soft lock that lasted 5-7 minutes on my old hardware, and on the newer rig, up to 30 seconds in that 'hung' state before going through.

Close to the campaign completion, even with smaller (3-5meg) saves, I've never seen that take longer than 20-30 seconds...even that is annoying...but ten minutes, I would have done a Parks/n/Rec and tossed the computer in the dumpster. :steamhappy:
Fenrira 2024 年 9 月 29 日 下午 8:56 
@DaViper
It’s about 5-10 seconds for newer playthroughs and it gets progressively longer, and the campaigns which run past year 2039 take 10 minutes to load. I play on an MacBook Pro. Any suggestions?
DaViper 2024 年 9 月 29 日 下午 8:32 
@Fenrira
On my old rig (FX8300 cpu) RX580 gpu, load times (at their worst) were a minute or two tops WITH a heavy mod load.
The current Ryzen 5 5600x /RX6600 is 15-20 seconds at most. (450 mods running.)
--and I'm running via Arch Linux+ Proton_GE as well.

What sort of potato are you trying to run? Because if it isn't a potato, there be other issues going on.
Zelfana  [作者] 2024 年 9 月 29 日 下午 5:05 
Won't really do anything about loading times.

I'm recommending doing the two saves just in case the command breaks something. I'm confident enough to publish this but I still can't guarantee it working flawlessly.
Fenrira 2024 年 9 月 29 日 下午 4:58 
It usually takes me 10 minutes to load into missions. Would this mod help reduce the time?

Also, after I enter the console command and load the first save, should the loading time be reduced? Or will it still take 10 minutes to load? Also, why is the second save (the save made after the console command is entered) considered the “backup?”
DaViper 2024 年 9 月 29 日 下午 3:49 
The odd thing that kept throwing me is that UNDER that 8meg limit, the load time increases, BUT it does succeed to load in.
I KNOW I'm in trouble when the load seems to softlock from the main menu up to 30 seconds BEFORE getting to the load screen banners.
Zelfana  [作者] 2024 年 9 月 29 日 下午 3:47 
Ah yes, should mention in description this is similar to the strategy/tactical transfer but not exactly.
DaViper 2024 年 9 月 29 日 下午 3:46 
As the comments are limited, this is part deux:

I just wanted to thank you for the work you've been doing! Keep it up.:steamhappy:
DaViper 2024 年 9 月 29 日 下午 3:43 
I'm on CI as my primary set of mods. (I couldn't go back to vanilla if I tried after using CI.)

I've been wondering about 'bloat on strat saves for quite awhile and have been trying different approaches to keep the problem 'minimal'. On my system, once the save file hits 8meg, it is a 45 second load...crash. (This is applicable ONLY to the strategy layer saves. Tactical can get big and doesn't have an issue on the turns it is saving.)

The solution for me has been finish a tactical mission, return to the avenger, go to the geoscape and then IMMEDIATELY return to the Avenger. For whatever reason, the save goes back to a normal 2-3 meg size (later in the campaign.) --I use the game's default save setup while doing this. (I play honestman as ironman is just asking for heartburn. Heh.)

As the game is doing strategy saves every time you return to the Avenger from the Geoscape, I think it is duplicating stuff behind the scenes. The tactical > geoscape > avenger seems to clear it.