WHAT IS SKYRIM SORCERY?
My previous mod, Dragon Combat Overhaul, is a freaking work of art. It's compatible with almost everything, entails little to no script lag, and whitens your teeth while you sleep. There are two major bugs left on it, one is fixable, one is not. So you can imagine my annoyance when people came to me with every manner of bug report, from soul absorption issues to faction issues(what?) to quest issues(again, what?) to random crashes. So what caused these bugs then, if I didn't?
The answer: Skyrim Sorcery. Skyrim Sorcery is my way of referring to the phenomenon where Skyrim will do things that it was not coded to do, either because a function was skipped(Script Hiccups) or because an unexpected value was inserted into the script(weird, one of a kind events, hard to describe). Script Hiccups and unexpected values have similar causes and effects, but are different. Below are their definitions.
Script Lag - This is the meta-meta bug. Script lag is the amount of time it takes for your game to start running a function. If the length of time is above a certain threshold, you can actually see and feel script lag occurring, for example if you activate an object, the amount of time it takes for that object to actually activate(ie. pick up an item, sit in a chair, sleep in a bed) IS your script lag, at least generally speaking. A certain amount of script lag is obviously acceptable, as the game has to do its thing and that takes time. However, after a certain threshold, Script Lag can cause errors when a script runs, but much later than the game expected it to run. If you have high enough script lag during a siege for example, the game will run the script telling you the battle is over, but it won't run the script to change the hold owner until ten minutes later. So if you were to fast travel in that time to your leader for a new hold assignment in that time, he would tell you to go back to the same hold, or somewhere weird. I bypass this specific error in CWO by not allowing the general to send you back to the same hold where you just were after a win has been registered, but even running that check takes time, and if you try to do something with the variables before they are properly set up, your game will break in some way. Script Lag can and will cause the below meta-errors, and will be merciless about it. Script Lag is Skyrim Cancer. If you have Script Lag, delete your character, check your mods and inis, and try again, because that character is toast.
Script Hiccup - when a game will simply not run a function within a script, probably due to timeout or stack overflow reasons if I had to guess. Script hiccups are what cause most Skyrim Sorcery, and they are caused by a plethora of reasons, though the usual culprits are uninstalling/installing mods mid play and script lag. Modders cannot do anything about this except run checks to make sure the game does what we tell it to do and try to do it again, which is INSANELY difficult given the complexity of what I'm working with(A siege is at least a thousand lines of code spread out over 5 scripts), you can imagine how difficult it is to dynamically find what line of code forgot to run out of the thousand that did. If a Hiccup hits CWO in the wrong spot then very often you will find yourself SOL. The good news is that the script rarely hiccups in the same spot twice, so a reload to before the script that forgot to run is told to run will usually fix the issue. The better news is that the predictive debugger added in V4 is VERY good at auto-detecting these issues, and will usually not even allow the quest to run until it is ready.
Unexpected Value - This CAN be caused by a Hiccup or by what causes Hiccups, but it can ALSO be caused by regular play. An unexpected value is when the game inserts a variable somewhere that developers, Bethesda or modder, did not intend. Sometimes this is just a simple bug caused by developer error, for example the issue where X's Last Battle could populate with Rikke or Galmar in CWO V3, BREAKING EVERYTHING. Other times this is simply a product of the way Skyrim works - everything is radiantly interconnected as variables, and emergent gameplay causes variables to be manipulated in millions fo different ways by you, the user. ONE unexpected value usually is meaningless - it's when TWO or more functions that use unexpected values collide that things really start to break and get weird. Again, normal gameplay WILL cause this. The longer you play a particular character, the more your save will be affected by the Unexpected Value meta-bug.