XCOM 2
27 ratings
[WOTC] Fix Save Bloat
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
86.776 KB
29 Sep, 2024 @ 2:10pm
1 Oct, 2024 @ 6:26pm
4 Change Notes ( view )
You need DLC to use this item.

Subscribe to download
[WOTC] Fix Save Bloat

In 1 collection by Zelfana
Actually Utilities
106 items
Description
Overview
Adds a highly experimental console command Zelf_SquashGameState that can be used to force gamestate history to be compressed to a single history frame. This makes the save file size smaller which can help with saves becoming unloadable due to their size.

This is similar to what the game does when transferring between the strategy and tactical layers. It is not exactly the same and causes some angry logging but from testing seems to be working fine anyway.

If you are able to go on a mission you should just do that instead of using this command. This is effectively a workaround when you've been on the strategy layer for too long.

Only works in strategy (on the Avenger/geoscape)!

How to use
1. Make a manual save normally first
2. Use the console command Zelf_SquashGameState
3. Make another save to a different file
4. Load your first save and keep playing if the game didn't crash
5. You can load the second save to keep your progress if you crashed trying to load the first save

Compatibility
Has special handling for Covert Infiltration. It is not guaranteed to work because CI does some things unconventionally. The mod jumps through a lot of hoops to support it.

Notes
Due to the experimental nature of how this mod works I will not be automating its functionality.

I can't guarantee squashed saves working correctly so try to avoid relying on them. You can keep playing after using the console command but it's only meant as a backup in case a save made before using it won't work.
31 Comments
Nitsah 5 Apr @ 6:53am 
Yeah eventually there stuff that just builds up and it doesn't get cleared.
DaViper 29 Jan @ 9:22pm 
@[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 29 Jan @ 3:03pm 
@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 28 Jan @ 11:01pm 
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 28 Jan @ 10:59pm 
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 28 Jan @ 7:44pm 
Oh, Thank you so much for you information, Kahuna.
Zelfana  [author] 28 Jan @ 2:13pm 
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 28 Jan @ 12:57pm 
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 5 Jan @ 7:48pm 
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 24 Dec, 2024 @ 1:51pm 
Pardon me, is anyone using this mod with covert infiltration?