I will ask my question first and then expand.
Is it possible to control scripts via quest stages? For example completely kill a script (including from the save game) when the final quest stage has been reached?
For example, setstage MintyQuest 100
Could this console command be used to un-install all scripts and leave no persistence in the save game?
Would this quest finished event also kill previously saved scripts in the save game that were originally spawned from previous versions of the MintyQuest?
Now to expand. I have been trying to research a fix for a user of my mod who is seeing errors reported in the old Papyrus.log following an upgrade.
I know about most of the issues with scripts persisting over save games and even after the mods have been completely removed, and this is kinda what I am seeing from the users feedback.
For example the mod is working perfectly fine with all the latest changes visible to the user - but they also have errors being reported in the papyrus.log against those same lines in my scripts!?
(Like there is a ghost script running!)
So I think I understand the problem but I don't have a solution that 'fits my mod model' without asking and playing.
Spent a bit of time tonight and found some really cool posts:-
http://www.gamesas.com/topic/1345542-getting-a-script-to-run-when-the-game-loads/
http://www.gamesas.com/topic/1349590-init-at-game-load-and-init-at-game-restart/
http://www.gamesas.com/topic/1386485-uninstalling-scripts-vs-leaving-them-in-but-replacing-with-blanks/
I need to go back and re-read all of those but any advice is appreciated or any more links.
Thanks