Problems with Ghost Quest Scripts and Load Order

Post » Thu Jun 21, 2012 7:14 pm

I've been having a problem that I'm seeing crop up in my largest mod that uses a Quest script to manage vampirism much like the Bethesda Player Vampire Quest. It seems that you can get duplicate copies of the script running if people remove the mod incorrectly and then add the mod back in but in a different load order. Is there any way to protect against that?

I am implementing a versioning system to make sure that older revs of scripts definitely stop running if the versions are updated, but need to protect against this. Is there a good thread that discusses the topic of ghost scripts running and how best to protect your players from having this happen to them with your mod? I've read the wiki on Save File Notes and some of the discusison but no real solutions about how to approach it. Also read http://www.gamesas.com/topic/1370574-development-process-threads-save-games-auto-start-quests/page__p__20811966__hl__quest%20scripts__fromsearch__1#entry20811966thread, but not entirely relavent to this problem.

Thanks,

MM
User avatar
Theodore Walling
 
Posts: 3420
Joined: Sat Jun 02, 2007 12:48 pm

Post » Thu Jun 21, 2012 8:55 am

From my experience, and from reading the Save File Notes, I think ghost scripts only occur if they happen to be in the middle of function calls when the save is made and the mod is removed. Even then, as soon as the script finishes with the function call, the new version of the script will be used.

The only reason I can think of for the script to be a problem would be if you have some sort of while loop that is running in the old version when it was saved. I suppose it could also happen if you use a new script (new name) each version and remove the old one, and when updating, the mod user doesn't perform a clean save.

http://www.gamesas.com/topic/1348833-old-versions-of-mods-conflicting-with-newer-ones/ http://www.gamesas.com/topic/1362474-compatibility-with-other-mods-tips/ http://www.gamesas.com/topic/1370110-impact-of-system-stress-scripting-errors-on-game-performance/ http://www.gamesas.com/topic/1361933-modding-best-practices-and-changes-persisting-in-saved-games/.
User avatar
Multi Multi
 
Posts: 3382
Joined: Mon Sep 18, 2006 4:07 pm

Post » Thu Jun 21, 2012 6:12 pm

Thanks for the reply. I'll take a look at these threads. I've tightened up the calls and making sure that certain other functions that use latent calls disable the update registration before executing and a few other optimizations. There are three event handlers in my script, OnUpdateGameTime, OnSleepStart, OnSleepStop. It's possible that I've been unlucky at times, saving the game during updates and catching it in the OnUpdateGameTime. I can tell users to make sure they wait 1 hour and for my satiation message to appear before saving and exiting if they plan on updating.

Thanks!
User avatar
Toby Green
 
Posts: 3365
Joined: Sun May 27, 2007 5:27 pm


Return to V - Skyrim