Talk:Save File Notes (Papyrus)

Active discussions

Removing Scripts from ObjectsEdit

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 (talkcontribs) Cipscis

ESP and Script deactivation tests - OnUpdate () Event, Variables and Properties ()Edit

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:

  1. A Quest with a RegisterForUpdate (1) in its OnInit ()
  2. An OnUpdate () with a Debug.Notification () and a Debug.Trace ().
  3. 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)

Save File WeirdnessEdit

Ah, the joys of modding. Being the optimist that I am, I created a follower with two scripts. I've been using this follower for a while now with no problems. Then I decided to improve one of the scripts, so I wrote a new script, deleted the first script from the actor (bumping the second script up to the top of the list) and added the new script. Everything worked perfectly on a save from before taking on the companion, but when I try to play the game with my current save, my companion no longer works (obviously). The game still thinks that the deleted script is script #1, but now when it runs the real #1 script (formerly #2) it can't find the functions...obviously because the pointer is pointing to a different script. And, of course, my new script #2 isn't running at all.

  • am I correct in assuming that the order of the scripts on an actor/object has to stay the same to avoid corrupting the save file? ie. no deleting, only adding new to the end of the list
  • is there any way to fix this? ie. will restoring the original script and re-adding the scripts and resetting the properties on my actor fix the save file issue, and if so, how the heck do we update scripts without breaking everything?

--TheMagician 14:57, 14 March 2012 (EDT)

Edit: On further reflection, it occurs to me that it might not be finding the methods because the scripts extend different object types. It still shouldn't be trying to make function calls from script #2 on the object type of script #1, though. ie. Why is the game trying to use methods from object type #1 on object type #2? The script itself is correct (works perfectly on a clean save without errors or warnings) but for some reason thinks it's extending a different object. The new scripting engine makes my brain hurt. :(
--TheMagician 11:05, 16 March 2012 (EDT)
Return to "Save File Notes (Papyrus)" page.