Problem with script running after I've disabled all plugins

Post » Thu Jun 21, 2012 11:54 am

So I had a script that would change clothes on an NPC when they went through a particular door. Long story short, I merged my esp with another using TESVSNIP, something I have done before without problem. Played the game for a while and then ended up back at Breezehome and the door that triggers the change of clothes. Well there was some kind of bug introduced and suddenly it wasn't working so I went into the script and added some debug.notification's to see if it was firing. The messages come up no problem. While looking further into the problem I disabled the esp that fire off the script, went back to the game and even though the esp was disabled, the script was still firing. I don't have that script tied to any other esp files and in fact, disabled all plugins and the script is still firing. Can someone please help me understand that?
User avatar
Batricia Alele
 
Posts: 3360
Joined: Mon Jan 22, 2007 8:12 am

Post » Thu Jun 21, 2012 8:43 am

Disabling plugins is no longer enough to remove executing scripts. You have to uninstall the entire mod in order to get rid of them. Script state is embedded in the save game, and it will continue to execute as long as the script files remain installed.

Keep in mind though that this WILL NOT get rid of script data from the save that's been set up to use a RegisterForUpdate() event. Those will continue to attempt to execute EVEN WHEN THE SCRIPTS ARE GONE. The way Bethesda handles scripts with Skyrim leaves a lot to be desires and you'll note in your debug logs that it will endlessly complain on each load about missing script data that should be long gone.
User avatar
carly mcdonough
 
Posts: 3402
Joined: Fri Jul 28, 2006 3:23 am

Post » Thu Jun 21, 2012 5:03 am

The script is attached to the door in your save file. so, the engine will continue running the script when the door is activated. It's like if a mod adds a letuce. If you disable to mod, the letuce will not disappear, as it's reference is in the save.

I suppose it will be activated by an event and it's not running all the time. So, if you delete the script from your scripts folder it won't continue running. If there is a function running when you save your game, the function will be saved in your game and will continue working even if you delete the script from your folder. So, don't save just after you use the door (the function should remain in memory only untill executed, but depending on the function, maybe it lacks the needed data to finish it's execution).
User avatar
Michael Korkia
 
Posts: 3498
Joined: Mon Jul 23, 2007 7:58 pm

Post » Thu Jun 21, 2012 3:46 pm

Yeah.. I had to delete the script from the scripts folder, then go back into game with it gone, save, then go back out and compile the script again then it started to act correctly. Thanks, lesson learned.
User avatar
lydia nekongo
 
Posts: 3403
Joined: Wed Jul 19, 2006 1:04 pm


Return to V - Skyrim