Talk:Save File Notes (Papyrus)
Removing Scripts from Objects
As it stands, removing a script from an object in a plugin file will not be sufficient to remove the script from an object in a saved game. His could make uninstalling mods that attach scripts to vanilla items very painful indeed, and I have a few questions that I think should be answered about this.
I may answer them myself when I can test them, but more importantly I want others to be aware of these issues, and ideally to foster a bit of discussion.
- Is there a functional difference between removing a script from an object in an active plugin file and deactivating a plugin file that added a script to an object?
- If two conflicting mods in a load order attach different scripts to the same object, can changing load order result in both scripts being attached simultaneously?
- What "oddities" may result from deleting a script entirely?
- If detaching scripts or removing a plugin doesn't remove scripts from saves, and removing scripts entirely produces "oddities", would replacing compiled scripts with empty compiled scripts by the same name be an appropriate uninstallation method?
- Is this something that could or should be implemented by mod managers?
- Are there any good methods for removing a script from only a subset of objects to which it is attached?
- Is the only good way to "nullify" that script and attach a copy of it to the objects to which it should remain attached?
- Would it be appropriate, if such a change is made to a mod between versions, to include such nullified scripts in the package for users upgrading from previous versions?
—The preceding unsigned comment was added by 21:05, 16 February 2012 (talk • contribs) Cipscis
ESP and Script deactivation tests - OnUpdate () Event, Variables and Properties ()
The Bethesda forum thread for this problem is here: http://forums.bethsoft.com/topic/1348833-old-versions-of-mods-conflicting-with-newer-ones
Here's a conclusive test. It is free from gameplay features nor objects in the base ESM. All it contains are:
- A Quest with a RegisterForUpdate (1) in its OnInit ()
- An OnUpdate () with a Debug.Notification () and a Debug.Trace ().
- Both Debugs trace out a custom FormList and a custom Armor.
With the mod active, both Debug.Notification () and Debug.Trace () worked on screen and in the log every 1 second.
I then save then quit the game.
Then I deactivated and deleted the ESP and the Script.
Mod managers will delete both the ESP and the Script. So I'm mirroring this behaviour.
The log detected that kuFLQS was missing. I highlighted these lines in the log below.
And the Debug.Notification () nor Debug.Trace () did not show on screen nor in the log.
So, it looks like the OnUpdate () was terminated.
[03/01/2012 - 07:13:13PM] Papyrus log opened (PC) [03/01/2012 - 07:13:13PM] Update budget: 1.200000ms (Extra tasklet budget: 1.200000ms, Load screen budget: 500.000000ms) [03/01/2012 - 07:13:13PM] Memory page: 128 (min) 512 (max) 76800 (max total) [03/01/2012 - 07:13:26PM] VM is freezing... [03/01/2012 - 07:13:26PM] VM is frozen [03/01/2012 - 07:13:26PM] Reverting game... [03/01/2012 - 07:13:30PM] Loading game... [03/01/2012 - 07:13:31PM] Cannot open store for class "kuFLQS", missing file? [03/01/2012 - 07:13:31PM] warning: Unable to get type kuFLQS referenced by the save game. Objects of this type will not be loaded. [03/01/2012 - 07:13:31PM] warning: Could not find type kuFLQS in the type table in save [03/01/2012 - 07:13:31PM] VM is thawing... [03/01/2012 - 07:13:38PM] VM is freezing... [03/01/2012 - 07:13:38PM] VM is frozen [03/01/2012 - 07:13:39PM] Saving game... [03/01/2012 - 07:13:39PM] VM is thawing... [03/01/2012 - 07:13:47PM] VM is freezing... [03/01/2012 - 07:13:47PM] VM is frozen [03/01/2012 - 07:13:47PM] Log closed
So, I save the game again at this point - a 2nd clean save.
In normal play-time, this 2nd clean save will naturally as you play the game after deactivating the mod.
I quit the game.
Then reloaded it with the mod STILL deactivated (i.e. no ESP nor Script in the file system).
Unfortunately, the reference to kuFLQS is still in the game as shown with the highlighted errors in the log.
So, the references to the ESP still exist after 2 clean saves.
But again, Debugs from the registered OnUpdate (). A good sign that the event is not firing.
This, I think, is acceptable.
In Oblivion, some objects from deactivated mods persisted as NULL objects.
[03/01/2012 - 07:13:56PM] Papyrus log opened (PC) [03/01/2012 - 07:13:56PM] Update budget: 1.200000ms (Extra tasklet budget: 1.200000ms, Load screen budget: 500.000000ms) [03/01/2012 - 07:13:56PM] Memory page: 128 (min) 512 (max) 76800 (max total) [03/01/2012 - 07:14:09PM] VM is freezing... [03/01/2012 - 07:14:09PM] VM is frozen [03/01/2012 - 07:14:09PM] Reverting game... [03/01/2012 - 07:14:13PM] Loading game... [03/01/2012 - 07:14:14PM] Cannot open store for class "kuFLQS", missing file? [03/01/2012 - 07:14:14PM] warning: Unable to get type kuFLQS referenced by the save game. Objects of this type will not be loaded. [03/01/2012 - 07:14:14PM] warning: Could not find type kuFLQS in the type table in save[/color] [code][03/01/2012 - 07:14:14PM] VM is thawing... [03/01/2012 - 07:14:26PM] VM is freezing... [03/01/2012 - 07:14:26PM] VM is frozen [03/01/2012 - 07:14:27PM] Log closed
So, I then changed the mod: removed a Property and so removed that Property's reference from my Debugs.
I returned the mod to the file system but I DID NOT activate it. I.e. the ESP and Script exist but the ESP is not active.
This is to test if the OnUpdate () event was still firing from the time I deactivated the mod.
I.e. removed the ESP and the Script from the file system.
Remember that there were no indications of the OnUpdate () running from previous logs.
This is the log after I loaded the game.
[03/01/2012 - 07:22:42PM] Papyrus log opened (PC) [03/01/2012 - 07:22:42PM] Update budget: 1.200000ms (Extra tasklet budget: 1.200000ms, Load screen budget: 500.000000ms) [03/01/2012 - 07:22:42PM] Memory page: 128 (min) 512 (max) 76800 (max total) [03/01/2012 - 07:22:57PM] VM is freezing... [03/01/2012 - 07:22:57PM] VM is frozen [03/01/2012 - 07:22:58PM] Reverting game... [03/01/2012 - 07:23:01PM] Loading game... [03/01/2012 - 07:23:02PM] VM is thawing... [03/01/2012 - 07:23:03PM] OnUpdate None [03/01/2012 - 07:23:04PM] OnUpdate None [03/01/2012 - 07:23:05PM] OnUpdate None
[03/01/2012 - 07:23:12PM] OnUpdate None [03/01/2012 - 07:23:13PM] OnUpdate None [03/01/2012 - 07:23:14PM] OnUpdate None [03/01/2012 - 07:23:15PM] OnUpdate None [03/01/2012 - 07:23:20PM] VM is freezing... [03/01/2012 - 07:23:20PM] VM is frozen [03/01/2012 - 07:23:20PM] Log closed
"None" in the OnUpdate () Debug.Trace () tells me that the variables were truly discarded at the save AFTER first deactivation.
However, the Onupdate () Event is still firing!
What this tells me is that the Event manager pings the Script even if it doesn't exist in the file system.
-- Kuertee 07:40, 1 March 2012 (EST)