Skyrim Saves: CTD on Load - What does it mean?

Those playthroughs you've had where you'll be playing fine, saving away, and then all of a sudden you can't load the save without a CTD? The cause of that has finally been discovered.

I would recommend everyone to read this thread but it's a little technical so I'll summarise...

The Issue

There is a limit of 65,535 bits of variable data that a Skyrim save can store (kinda makes sense there would be a finite limit if you think about it, but now we know what it is). Each bit of data that a mod needs to store will take one of the 65,535 available slots, and once your save reaches that limit it will go into that nasty 'CTD on load' state.

Unfortunately what I would consider a base Skyrim installation (Vanilla Skyrim + Dawnguard + Hearthfires + Dragonborn + Unofficial Legendary Patch + SkyUI + Live Another Life) will chew through 28,619 of these variables before you even start adding mods. So you have a space of just 36,916 (almost half the original space) to play with.

Now there are two ways mods will store data. At the point the mod is loaded (base allocation), or when you encounter certain events while playing (dynamic allocation). The first is easy to test, the second is much more difficult to guess at. Since it's virtually impossible to know how much overhead you need to support long-term play, the bottom line is that you will want to concentrate on keeping the base allocation as low as possible to allow for dynamic allocation during play.

The guys that discovered this are working on testing the base allocation of various mods, and the results may surprise you. I'll list out a few of the really heavy hitters discovered so far:

DynDOLOD - 3714
Legacy of the Dragonborn - 3463
Interesting NPCs - 3273
SexLab - 1805 (plus an additional 12 per added animation)
Immersive Amazing Follower Tweaks - 1636
Anna's NPCs - 1479
Rigmor of Bruma - 1373
Vilja in Skyrim - 1334
Helgen Reborn - 1313
Immersive Armors - 1027
Molag Bal's Inferno - 983
Morskom Estate - 803
iNeed - 730
Frostfall - 641
Campfire - 576
Convenient Horses - 535

Testing is ongoing, and has obviously started with the more popular mods, so many of the mods we use may not yet have been tested (you can find a more full list here under "String count spreadsheets".

You can see that just using this small list of mods would leave you with just 12,237 variables to be allocated during gameplay before reaching a dead save - 82% of the original space eaten up before you even leave the LAL starting cell! Not a playthrough destined for a long life :(

Now the good news

Many mod authors are beginning to re-code their mods to avoid this over-allocation of variables. There is a beta version of DynDOLOD that allocates just 61 variables, and a beta version of SexLab that uses just 99. I'm told that both Frostfall and Campfire will have new versions coming that reduce their impact.

Equally, if you encounter the dead save issue, and have removed some of the worst offenders from your mod list, my save cleaning tutorial should resurrect your save (or at least the save just before the 'CTD on load' set in).

Also, if you would like to know the state of your current playthrough or mod setup, you can test your save using the following steps:

1. Download TESV ESS Files Editor by fubrus
2. Open your suspect save
3. Expand "Global data table 3"
4. Click on Papyrus (don't need to expand)
5. If you receive a pop up error "Range check error" your save is almost definitely screwed, and you'll need to try an earlier save
6. Note the "Strings" entry.
7. 65,535 - (the number of strings from step 6) = the cushion you have from having corrupt saves.

Conclusion

As a mod user you should:

  1. View this as choosing where to spend your resources in an informed way, just like with scripts, and not see it as a list of mods that shouldn't be used by anyone 
  2. Be aware of those mods that have not yet been updated but that add huge amounts of variables to your saves, and decide if they're really worth the chance of a dead save later on (Interesting NPCs, Frostfall and Campfire for instance, I would argue IS worth this risk, but many of the others aren't for me - your choices may differ)
  3. Update your mods as fixes for this issue are released. Get involved in the Beta programs if you like, but be aware that they'll come with their own set of risks to your playthrough
  4. Be aware that this is not an unrecoverable situation, and that you can clean your save after removing the variable heavy mods to get a bit more life from your playthrough
  5. Spread awareness to other mod users, and if you have the ear of any mod authors, impress on them the need to check their mods for this issue.

Above all please, please, PLEASE do NOT go on a witch hunt against mod authors for this issue.

It's only just come to light and it is going to take time to get understanding out there, and even longer for them to redevelop mods that have this issue - it is not an easy problem for mod authors to fix and any that do should be loudly applauded for taking the time and effort to do so.