Difference between revisions of "Save Files Notes (Papyrus)"

Removed assertion that FormList entries for removed Forms will be relocated based on testing in 1.5.97.
imported>DavidJCobb
(→‎Removing: corrections)
(Removed assertion that FormList entries for removed Forms will be relocated based on testing in 1.5.97.)
 
(2 intermediate revisions by 2 users not shown)
Line 22: Line 22:
If you remove a property or variable after a save was made, that property or variable's value in the save game will be inaccessible to running scripts{{Verify|Are we sure that Papyrus scripts can't manually query the values of orphaned properties on other script instances?}}, and a warning will be printed to the script log detailing what happened.
If you remove a property or variable after a save was made, that property or variable's value in the save game will be inaccessible to running scripts{{Verify|Are we sure that Papyrus scripts can't manually query the values of orphaned properties on other script instances?}}, and a warning will be printed to the script log detailing what happened.


The property will never be removed from the saved data unless the form that the script is attached to gets deleted (which, in practice, will only happen with ObjectReferences that were created during gameplay). Papyrus warnings will be generated every time the save file (or any later saves from that playthrough) is loaded.
The property will be removed from the saved data the next time the user saves. Papyrus warnings should not be generated again after that initial save.


===Changing===
===Changing===
Line 266: Line 266:


===Missing Plugin===
===Missing Plugin===
If a form which is provided by some plugin is added to a FormList by a script, and that plugin is removed or disabled between saving and reloading the game, then the affected entries in the FormList will not be removed, but will instead be relocated to the beginning of the list and changed to None. If the game is saved again at this point and the missing plugin is restored, the FormList entries which became None will nonetheless remain None and will not be removed or regain their original values and positions in the list. A FormList's Revert() method will still remove these missing entries, however, just as it removes all script-added entries.
If a form which is provided by some plugin is added to a FormList by a script, and that plugin is removed or disabled between saving and reloading the game, then the affected entries in the FormList will not be removed, but will instead be changed to None and may be moved within the list. If the game is saved again at this point and the missing plugin is restored, the FormList entries which became None will nonetheless remain None and will not be removed. A FormList's Revert() method will still remove these missing entries, however, just as it removes all script-added entries.
<source lang="papyrus">
<source lang="papyrus">
; FormList Property fl Auto
; FormList Property fl Auto
6

edits