Jump to content

Creation Kit - Persistence


Saerileth

Recommended Posts

When I open the mod I am currently working on in TES5Edit and check the cell entries, there are a lot of references listed under "persistent". I'm having a hard time making sense of what that actually means, or when and why references are flagged as persistent.

 

The documentation on the Creation Kit Wiki is pretty sparse, but I gather persistence is a very bad thing, since it keeps the references in memory permanently. The rest of the information seems to be incomplete at best. References are flagged as persistent if they are a property of a script, but it also seems to happen if they are a LinkedRef or have an EnableParent set. I have even found persistent boulders and wall elements in my files, I have no idea how that happened.

 

Is there some way to avoid this or remove persistence from references? How evil is having a few persistent references in terms of performance? If my findings are correct, then the LinkedRef and EnableParent features should not be used at all, but I find that hard to believe. How on earth am I supposed to link references to my scripts if I'm not allowed to use properties or links?

Link to comment
Share on other sites

  • 1 year later...
  • 1 year later...

random semi-related search landed me here lol.

 

Persistence basically means that the objectreference is referred to by another form in some manner or another as Saeri implies, when it's linked, or parent enabled, has a script or is referred to in a script, is utilized in a quest in some way, all containers with leveled lists, etc, etc.

 

They aren't inherently bad per say but they do lead to larger save files the more you have of them, but it takes A LOT and by a LOT I mean more than most modders can do in a mod before it becomes a problem. I have over 300 persistent objects just in one of my galleries in my museum mod and probably several hundred more in several of the other cells as well and not to mentions the dozens of quests, AI packages, scene markers, etc (all persistent). All told I'm sure I easily have over 5000 persistent references or more and a fully loaded out museum of 2246 display is usually less than 30MB in size with a full load out of mods and all the supported mods that Legacy works with, so persistence is not really a problem. Save size is not really a concern until it gets over 40MB or more.

 

It DOES cause some hiccups when it comes to updating your mod though because you can't simply move an object in your mod and have it actually move when someone updates an existing playthrough. The object will be right where it was when they first loaded the mod (though console clicking and RECYCLEACTOR can fix that permanently), but it is a bit of a headache if you do any significant remodeling of anything that's persistent.

 

Hope that helps

Link to comment
Share on other sites

  • 1 year later...

"Persistence is the act of making an Object Reference stick around in the game and not be unloaded. This applies to all references in the game, including things like actor references. Because they continue to stick around, they consume processor time and memory when other references in the same area will have disappeared and unloaded."

 

Off the creation kit site.

 

Unique NPCs, usable bookshelves, display cases, player chests, anything really with a script linked to it.

Edited by Kareemisegyptian
Link to comment
Share on other sites

@"link references to my scripts if I'm not allowed to use properties or links"

 

I believe there's a trick for that, but I imagine the game engine internally will maintain references that are used (e.g. stored in scripts) pretty much the same way as those having an explicit persistence flag.

 

So I wouldn't hope it improve performance that much. The big picture, however - well, just look how many persistent references are in the base game.

 

However, it might be a nuisance for mod compatibility reasons, if your mod adds a persistence flag to a vanilla game reference and that's the only thing your mod changes in that form.

 

So if you really don't want to set the persistence flag, you could try making a quest with a quest alias "Find Matching Reference", with checkbox "In Loaded Area" - and you must make sure that this quest will get started when you are sure that your target reference is in the loaded area. And you must make some conditions for this quest alias to pinpoint your object. Try to pick your conditions vague enough so that they won't force Creation Kit to set the persistence flag every time you save the mod.

 

 

Link to comment
Share on other sites

Too little persistence can lead to as many or more problems as too much.

 

If you don't need to go back to it, don't make it persistent.

 

Some piece of information, such as the hit akTarget, in a Magic Effect script, are extremely difficult to give persistence to the target reference.

 

It can be done, but it is difficult. and a magic effect script and instance goes out of scope, and disappears in less than a tenth of a second.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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