I recently made a Skyrim mod to fix an annoying bug with Serana, one of the Dawnguard DLC’s characters. She’s a rather complex entity, using her own AI to help quests in Dawnguard manipulate her follower status and “lock” her to the player when needed. Unfortunately, this AI also clashes with mods like Extensible Follower Framework, which enable you to have more than one follower at a time. Skyrim was coded with the assumption that the player would only have one follower at a time. Because of this, Serana, unlike most NPCs in the game, will basically tell you to go fuck yourself if you ask her to come with you when you already have a follower. My mod fixes this by having a plugin remove the problematic dialogue entries.
However, there’s another problem: Sometimes, Serana’s AI decides to override her follower status and will force her to walk to wherever her “home” is. Even if forced to become a follower again, she will continue to walk home instead of following you. To fix this, I made a plugin in EFF that connects to her AI and tells her to become a follower. It also translates EFF commands (follow, wait, relax, etc.) to the appropriate AI commands, so the AI is always synchronized with her stock follower behavior.
Unfortunately, in v0.0.1 of my mod, I broke the script and it left a dead copy of itself in saves, which can cause crashes and other nasty behaviour. I am told I am pretty good at save cleaning, so I will leave you with this guide on how to clean your saves.
Why Clean Saves?
Skyrim uses a game engine called Gamebryo that is probably more than a decade old, starting with the release of Morrowind in 2002. Unfortunately, it hasn’t aged well, and it appears that the developers at Bethesda are afraid to touch the save-game system, since it hasn’t changed much and has numerous problems. Foremost among these problems is the fact that Gamebryo is completely and utterly useless when it comes to garbage collection (the process of cleaning up dead references and objects in an environment). The most common causes of crashes when loading a save in the engine is when it finds a broken reference or object and can’t fix it. Similarly, regular cleaning can result in better performance, as there won’t be as much flotsam floating around. The best way to fix this problem is to fix it yourself.
The best tool for cleaning a Skyrim save is called Save Game Script Cleaner. Most cleaning and diagnostics can be done with this tool, and it is fast and simple to operate.
- Download SGSC and install it to a useful, accessible location. You will be using it plenty. You may also wish to add it to Mod Organizer.
- Start it up and open your save.
- We’re now going to work the first four buttons in the top row, from left to right:
- Fix Script Instances
- Delete All #
- Clean Other
- Delete Broken Actives
- Clean Formlists
- Save WITH BACKUP.
Now, open Skyrim and test whether your save works. If it does not, continue with the following guide.
- Open your save, again.
- Select Advanced.
- Select Remove Scripts attached to nonexsistent[sic] created forms.
- Click on Remove a[sic] scripts having invalid variables and continue clicking until it shows no scripts were removed.
- Repeat the Basic Cleaning guide to fix any broken references.
- Save WITH BACKUP.