Talk:Persistence (Papyrus)
What does NOT make reference persistent, that you may expect like me it does:
- adding references to a FromList doesn't make them persistent even if you keep a reference to the FormList in your script. Doing this may endup with GetAt(index) returning None from the list when changing cell and returning again the correct value when going back where you was when you added them. This was tested with Actor (dead actors) references but I expect it to be valid for any reference, yet I don't have time to test that now, I'm also curious how it works if you add the reference to an array.LukeH 05:19, 21 March 2012 (EDT)
An object CAN unload while a function is running on it.
If an object persists when it has a running function on it, then how do you explain an error such as this:
[08/15/2012 - 11:10:58PM] error: (FF000DFE): has no 3d, and so cannot have its motion type changed.
stack:
[ (FF000DFE)].critterMoth.SetMotionType() - "<native>" Line ?
[ (FF000DFE)].critterMoth.BellShapeTranslateToRefAtSpeed() - "Critter.psc" Line 556
[ (FF000DFE)].critterMoth.BellShapeTranslateToRefNodeAtSpeedAndGotoState() - "Critter.psc" Line 639
[ (FF000DFE)].critterMoth.GoToNewPlant() - "CritterMoth.psc" Line 273
[ (FF000DFE)].critterMoth.OnUpdate() - "CritterMoth.psc" Line 138
This error occurred because the critter unloaded while a function was running on it.
-- Threedee 06:57, 16 August 2012 (EDT)
- I think persistent references can still have their 3D unloaded, which would explain this error. See Is3DLoaded - ObjectReference
- Have a look at the Khajiit caravans and how they work: the caravan folks are all force filled in specific reference aliases on quest start, which makes them all permanently persistent. Now have a look at the caravan script: to check whether the player is around before the camp site is enabled (in order to prevent it from popping up out of nowhere), the script waits for the caravan leader's 3D to unload. Needless to say that there would never be a caravan camp site enabled or disabled in the game if his 3D would not unload only because his reference is permanently persistent.--Sclerocephalus (talk) 2013-08-20T20:31:20 (EDT)
I'm about a year late. The caravan NPCs are filled via Unique Actor, though it is still not clear rather filling with this option makes NPCs permanently persistent. --Terra Nova2 (talk) 2014-09-02T06:56:39 (EDT)
What happens with persistent references used in crafting or sold and merchant chest reset?
As title says. Will they bloat your save? Any "how to" take care of such items if needed? LukeH (talk) 2013-03-01T02:30:15 (EST)