Jump to content

Scripts being saved in your savegame in 1.5?


varx

Recommended Posts

I've heard from another modder that as of 1.5, changes to pex scripts are no longer being picked up automatically as they were prior. Instead, they are being saved in your save file, and it does not look as if there is a way to force them to update.

 

The guy who told me about it is convinced there is no way to force them to update, but that can't be true. Even if Bethesda ninja changed this behaviour in some way, it would be crazy if there wasn't a way for mod makers to force an update.

 

Even if this is true, I expect the worst case scenario is that you would force an update by uninstalling a mod, saving, then reinstalling it, as that should clear any assets connected to the removed mod.

 

If true, this should be pretty huge news for modders. Does anyone have information about it?

Edited by varx
Link to comment
Share on other sites

It turns out he was just running into a papyrus feature.

 

http://www.creationkit.com/fallout4/index.php?title=Save_File_Notes_%28Papyrus%29#Adding_2

 

 

If you add a script to an object in the save game after a save was made, that script will exist on the object when the save is loaded, but will be completely untouched (all of it's properties will be set to their masterfile values, and its OnInit block will be run as soon as the save finishes loading).

 

This does have some implications for long running scripts which are attached to the player character, for instance. I wonder what the workaround is in that situation.

 

 

Tangential, but also on that page:

 

Removing mods and continuing to use the same save game is not supported by the game. (For anything, not just scripts)

If you remove a mod you must go back to a save made before the mod was installed.

 

This seems odd, since gamebryo games generally handle savegames with mods being removed quite well, and clearly a lot of work has gone into that since the Morrowind days.

Link to comment
Share on other sites

 

Tangential, but also on that page:

 

Removing mods and continuing to use the same save game is not supported by the game. (For anything, not just scripts)

If you remove a mod you must go back to a save made before the mod was installed.

 

This seems odd, since gamebryo games generally handle savegames with mods being removed quite well, and clearly a lot of work has gone into that since the Morrowind days.

 

"Not supported" here just means "use at your own risk." With script heavy mods, there is quite a bit of risk. With script-free mods, there's very little.

Link to comment
Share on other sites

This is old news. Papyrus has been this way at least since Skyrim, more than 3 years ago.

Scripts DO update, except for events/functions that are currently running at the time the game was saved. Those will also update as soon as they finish running the old code.

Edited by steve40
Link to comment
Share on other sites

Script properties and variables are stored in the savegame. If you want to change a property after its value is already in the save, you can make it a const property. Const properties will be set to the CK value on load, but cannot be overwritten within the script.
Link to comment
Share on other sites

Just for the sake of completeness and posterity, it's confirmed that by removing a mod, saving, and reloading, you can remove longrunning infinite-loop scripts that would otherwise not be updated by simply installing a new version of the mod.

 

In this way, scripts that would otherwise not immediately pick up pex updates can be fully updated. I'll bet the interaction of non-updated longrunning scripts and updated event scripts has caused a few hard-to-identify bugs for mod authors over the years.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...