What is persisted when a reference is not referencedpersiste

Post » Mon Nov 19, 2012 7:23 pm

Well, I know the title is puzzling, so let me explain.
* The wiki uses "persistence" for objects that are not yet garbage collected and continue to receive events and such because they still have references to them and can therefore still be reached by papyrus code.
* The persistence I am interested in is the data (factions, items, spells, etc, added to an actor) that are stored once the object has been garbage collected and that will be restored the next time the reference is loaded.

So let's say I add, through script, at runtime, an ability to Whiterun's blacksmith (no script attached). I move to another city, all scripts gently forget about it and the blacksmith is no longer "persisted". I save my game, quit, restart. Then I come back to Whiterun, will she still have this ability?
* What about factions added to her?
* What about items added to her inventory? What if she was not a merchant?
* What about keywords added to her?
* Etcetera...

Any informations would be greatly appreciated. :smile:
User avatar
Emmanuel Morales
 
Posts: 3433
Joined: Sat Oct 06, 2007 2:03 pm

Post » Mon Nov 19, 2012 9:48 pm

So let's say I add, through script, at runtime, an ability to Whiterun's blacksmith (no script attached). I move to another city, all scripts gently forget about it and the blacksmith is no longer "persisted". I save my game, quit, restart. Then I come back to Whiterun, will she still have this ability?
Are we to assume that the script fires once only? Or after restart the script is no longer in \Data\Scripts?
User avatar
Rachael Williams
 
Posts: 3373
Joined: Tue Aug 01, 2006 6:43 pm

Post » Mon Nov 19, 2012 10:15 pm

Nigh invariably, actors are already marked in Skyrim.ESM as "Persistent", so you shouldn't have to worry.
User avatar
Queen
 
Posts: 3480
Joined: Fri Dec 29, 2006 1:00 pm

Post » Tue Nov 20, 2012 4:29 am

Are we to assume that the script fires once only? Or after restart the script is no longer in \Data\Scripts?
We should assume the script is ran once. It would still be there on restart.

Nigh invariably, actors are already marked in Skyrim.ESM as "Persistent", so you shouldn't have to worry.
So all actors (or only unique actors) would be persistent? That would be surprising, isn't it? I wonder if this persistent flag in the ESM structure really matches persistence in the wiki sense.
User avatar
Karen anwyn Green
 
Posts: 3448
Joined: Thu Jun 15, 2006 4:26 pm

Post » Mon Nov 19, 2012 10:08 pm

All actors are persistent, but that doesn't mean everything you change or store will still be there later.

Changes through SKSE functions that modify Base form information that the game doesn't support changing may not get stored into a savegame file but other changes are saved.

The problem is that there are situations where those changes might get erased or overwritten. Some (especially the non-unique actors) can be reset by cell resets. Most actors level with the player, so there are certain triggers that will reset the NPC level and potentially recalculate various things (including inventory).

One of the great bugs for Oblivion followers was related to the cell resets. Any followers you took into an Oblivion gate would get reset to their defaults when you closed the gate (at least part of the time). I don't know if there are any situations in Skyrim that would do that.
User avatar
Jinx Sykes
 
Posts: 3501
Joined: Sat Jan 20, 2007 11:12 pm

Post » Mon Nov 19, 2012 6:44 pm

Thank you very much for those informations, Cdcooley. So I guess I need to systematically run extensive tests for unique actors and remember that other actors are likely to be reset.
User avatar
Sarah Evason
 
Posts: 3507
Joined: Mon Nov 13, 2006 10:47 pm

Post » Tue Nov 20, 2012 5:56 am

Am I right in saying that it depends on the "persist location" of the actor's ref? There's a "persistAll" (or named similar) location that you can pick.

- Hypno

EDIT:
Persist Location
For Actors, the Location where this object is Persistent. Defaults to the current cell's location, which is usually correct.

So i presume if you pick the PersistAll location then the game will keep track of your Actor no matter what location the player's in
User avatar
Penny Flame
 
Posts: 3336
Joined: Sat Aug 12, 2006 1:53 am


Return to V - Skyrim