About this mod
A collection of all my vanilla game script fixes in a single, easy to install package.
- Permissions and credits
- Changelogs
- Donations
This mod is an all-in-one version of all my current and future vanilla script fix mods for the base game in a single place for simplicity and convenience. It does NOT include fixes for creation club mods - only the vanilla game and its 3 DLCs - Dawnguard, Hearthfire and Dragonborn.
If you don't know what the mods below are doing - in short, they are fixing various issues with some vanilla scripts, including performance problems, general bugs and/or save bloat issues. Click on the spoiler tags below if you wish to know specific details about each one. Future updates will include this information about any new scripts added to this mod in the changelog or stickied post.
The standalone mods that are included are the following:
dunFolgunthurBossBattle Script Fix
Unfortunately the way this battle is scripted can cause it to get stuck in an infinite loop. For example if Mikrul dies too quickly or in any way that causes his health to not reach 0 (for example, from a killmove, or killing him with the console). Furthermore, Bethesda's failsaves to shut down the fight don't actually work, so it's not uncommon that it will stay active in your save forever if the above ends up happening.
This mod prevents the fight from getting stuck in the first place and restores and improves Bethesda's failsaves, allowing it to get paused (not stuck) if you decide to leave the area and resumed once you return without stopping the thrall support system.
Shroud Hearth Barrow Script Fix
The problem with this is that there is a very small chance that this script can get stuck in a loop - if one of the doors gets opened again before the locked version of the door can get swapped in. The most common way for this to happen is if the door you entered from gets shut closed on a follower and they immediately open it back up again. Chances are, you will miss when that happened and now the script is stuck in your save file.
This mod is a slight tweak to the script that prevents that from happening by closing the door again if one of them happens to get opened before the script can continue. Side effect of this - you can now play useless box with the doors if you're fast enough.
Soul Cairn Script Tweaks

The issue here are 2 separate scripts, 1 more than the other: DLC1CrystalDrainHealthCheckScript and DLC1RandomLightningStrikeTrigSCRIPT. The first one was a mess - spamming itself with no chill, spamming errors with no chill, getting stuck on dead NPCs, multiplying itself, the whole package. The second one was better, only it was constantly active while you're in the Soul Cairn.
I decided to rework the crystal script to something working and tweak the lightnings while I'm at it. I replaced the while loops in both scripts with scheduled periodic updates through RegisterForSingleUpdate, which greatly reduces the stress on the scripting engine and makes the scripts update only when they need to. Other issues with the crystal script listed above have also been fixed.
The Taste of Death Improved Shutdown
Originally I thought about making the shutdown occur reliably after the player leaves, as intended, but then a different issue comes up - the Markarth residents teleport away if you leave and then come back immediately. You were gone for 1 minute and half the guests already left you, sadge :(
Thus, I decided to rework the post ending for more immersion. Now everyone will politely wait for you to leave the dinner first for some time before going home themselves. This will happen in the background when you've not been to the shrine for at least 12 hours after your feast. I've also made some small optimizations to the 2 scripts I'm changing.
No Priests of Arkay were harmed in the making of this mod.
DLC2TribalWerebearScript Fix
Furthermore the script is prone to getting stuck updating in some situations, if you happen to revisit the area the werebears are at. This includes random encounters with werebears and the game doesn't really care if they're alive or even despawned after the random encounter is done - the script will still run and update itself on werebears that literally don't exist anymore.
This mod fixes these issues by making the game only start updating the distance before the werebear has transformed, if one is actively searching for the player, or is in combat with them. If the werebear can't enter combat anymore or is despawned, the updates will stop or never start in the first place. Furthermore it retroactively stops all currently stuck instances of the script in your game, if any happen to be stuck updating.
DLC2dunNchardakDoorSeal Script Infinite Loop Fix
This mod fixes this issue by making the game additionally check if the object is currently disabled and if it is, stop the updates, so the script doesn't unnecessarily take up Papyrus resources. If you install this on an existing save, it will shut down any active instances of this script in the background if any are currently in such a stuck state. Objects that are initially disabled on purpose and are meant to reenable again at some point are also supported.
DLC2dunSeekerInvisScript Fix
This script controls the Seekers' ability to go invisible when they detect you, quickly close the distance and reappear right in front of you when you least expect them. The issue with this script is that as soon as the Seeker goes invisible, it will start spamming itself as quickly as the game will allow it and if the creature happens to not have a direct path to you, which is not uncommon for Apocrypha, it can unnecessarily highjack a lot of the game's scripting resources and slow it down to a crawl.
This mod optimizes the original implementation for better performance by replacing the inefficient while loop with periodic updates through RegisterForSingleUpdate, which will greatly reduce the stress on the system and not tank your FPS.
DLC2MiraakScript Fix
After meeting Miraak for the first time during the Dragonborn DLC's main quest, he will start to randomly steal dragon souls from you, with the first one being guaranteed, until you kill him at the end of the main quest. Under the hood this is done through a series of scripted events, one which is the script which controls Miraak's arrival and disappearance after the robbery.
Unfortunately this script has a rather severe flaw in the implementation of something, at first glance, completely harmless, which can have game breaking consequences - the visual effect that appears and stays around while you're near Miraak. This effect is controlled by a while loop without any leeway, which will execute itself as quickly as the game will allow it. In vanilla this issue is not that severe, but if you're using a mod which improves script execution and throughput (like Papyrus Tweaks), this script will literally take up all of the game's scripting resources almost immediately after it starts and not allow it to process basically anything else - so much so that the scene itself gets stuck and is unable to proceed.
This mod adds a small delay to the problematic while loop so that it won't run as quickly as possible and also adds an extra internal failsave that will shut it down after 2 minutes if something further goes wrong with it.
DLC2dunFrostmoonTriggerScript Optimization
This mod optimizes this script by replacing the OnTrigger event with RegisterForSingleUpdateGameTime to achieve the same behaviour while only running updates if the player is too close to the camp and is currently being warned to leave. Furthermore it fixes a bug with Rakel's warnings, which can cause her to keep warning you to leave, even if you've been accepted by the camp's leader if you went there before turning into a werewolf and then return as one.
DLC2PillarBuilderActorScript Tweak
Unfortunately this script is very inefficient and buggy in its implementation. First of all, it has no checks whatsoever if the standing stone is cleansed or if Miraak is defeated and as a result will keep updating itself in the background for no reason long after the DLC's main quest is completed. Furthermore, it doesn't check if the NPC currently is assigned the faction it's trying to remove, causing the NPC to be given the faction again if it's removed when they don't have it, but with a negative rank.
This mod is a complete rewrite of the script from scratch for better performance and scenario handling. It now utilizes states to determine when it should update itself and when to get shut down for now (the player hasn't been in the area for a while) or for good (the stone has been cleansed and/or the main quest is completed). It also improves the faction handling in some situations that the vanilla script never considers (e.g. cleansing the stone when the NPC isn't around, which means the faction can't be removed at the time). And lastly, it reduces the amount of unnecessary external calls for things that can be handled more quickly locally instead.
DLC2AudioRepeaterActivator01Script Tweak
Initially I was annoyed by the fact that this script is always in the active scripts of my saves when I'm in the area of the sound effect. Nothing wrong with that by itself as the script is not really doing anything at those times, just waiting for time to pass. However I started finding issues with its implementation as I was looking at it - possibilities to get stuck running in the background for a while and potentially causing errors in the logs, reactivating itself in rare cases and even exiting too early and causing the sound effect to not play at all when going through loading screens.
As such I decided to rework this script to fix its bugs. The while loop it used to have has been replaced by RegisterForSingleUpdate, so it will no longer bloat your active scripts in ReSaver and steps were taken to ensure the the sound effects will play at all times when they should and stop playing when they no longer need to. Nothing glamorous with this one, just gave it a bit more polish.
MQ105SprintTriggerScript Fix
However the implementation of this script has an oversight which will usually cause it to duplicate itself and stick around your save forever if you happen to enter and leave the invisible box multiple times in a row, which is not uncommon if you're trying to position yourself for the trial. The reason this is happening is because every time you enter or leave the trigger box, the game creates an active version of the script which does some work on the quest script, which itself doesn't check if work is being done on it. This is a problem, because multiple versions of the script then try to manipulate the same set of data and end up competing for it. And because the quest script doesn't have data integrity checks, things quickly get messy when conflicting operations from multiple sources get executed out of order or in unintended ways and the script gets stuck running forever.
This mod reworks the quest implementation to suppress multiple versions of the script from trying to run at the same time and prevent it from duplicating itself and getting stuck, as well as doing further optimizations on it to run better.
If you already have any of these mods installed, you can either leave them in or replace them with this mod, as they are identical.
Install with your favourite mod manager. Pick either the BSA version version or the loose files, not both.
Not compatible with anything that changes the same scripts. USSEP and Vanilla Script (micro)Optimizations changes have been forwarded when applicable and are compatible with this mod. Let me know of any mods that are not compatible and I will see about making a patch to accommodate them.
Compatible with everything else, including other script optimization mods like Vanilla Script (micro)Optimizations, Vanilla Scripting Enhancements and OnMagicEffectApply Replacer. The individual mods packed in this one, that are listed above, are already included in Unofficial Skyrim Modder's Patch, but it could be a good idea to keep this one installed if you're using USMP, as this mod will keep being updated with new files that most likely won't have individual releases.
If you're using the BSA version, it should load towards the top of the load order by default and any mods that need to overwrite it should do so already. The loose files version will take priority over any conflicting files from other mods if they're in a BSA, so keep this in mind for your particular load order.
Bethesda for Skyrim and the Creation Kit
ElminsterAU for xEdit
markdf for ReSaver
Borgut1337 for the amazing Papyrus Profiler
Unofficial Patch Project Team for USSEP
subhuman0100 for Vanilla Script (micro)Optimizations