Item persistence

Post » Tue May 17, 2011 2:16 am

I'm in the process of updating a couple of mods that both have big, bulky miscellaneous objects that the player is likely to just leave parked in or around their home (a weber barbecue, and a couple of big recharging stations). Right now, as I said, they're just misc. objects that the player drops from their inventory. I got a complaint though (just one) that they disappeared. I was about to go through and add in the option to convert the misc. items to static activator objects spawned via placeatme, but then realized that I wasn't sure if the spawned objects would stay after cell resets.

According to the GECK wiki entry for placeatme:

Actor references created using this function are removed upon cell reset.
To avoid this problem, clean up unneeded references using MarkForDelete.


Which is it, are they removed upon cell reset, or do you need to mark them for deletion?

There was a thread a while back concerning this, but it ended up being resolved by just using moveto with a persistent reference added in the GECK, so I'm not sure what I should be doing for my application. Will the misc. items remain after a cell reset? (I got the impression from that thread the Feng Shui uses this method without issue.) Would a placeatme'd activator object remain as well?
User avatar
Karine laverre
 
Posts: 3439
Joined: Tue Mar 20, 2007 7:50 am

Post » Tue May 17, 2011 8:23 am

The full quote from the Caution section of http://geck.gamesas.com/index.php/PlaceAtMe reads:

  • Using the PlaceAtMe function in scripts without cleaning them up later is considered bad modding etiquette. This is because too many calls to PlaceAtMe leaves objects in the game and will lead to bloated save-games after a while, which impacts game performance and loading times.
  • Actor references created using this function are removed upon cell reset.
  • To avoid this problem, clean up unneeded references using MarkForDelete:
    placedObject.DisableplacedObject.MarkForDelete

To me it seems that the third pin refers to the first pin, and not the second (someone must have inserted it at a later date). So PlaceAtMe can cause savegame bloat, which can be avoided by cleaning up using MarkForDelete. However, it seems that actor references are "removed" when a cell resets.
User avatar
maya papps
 
Posts: 3468
Joined: Mon Aug 07, 2006 3:44 pm

Post » Tue May 17, 2011 2:51 pm

Misc objects are not actors. An actor would be an NPC or creature.

If your misc object has havoc, it could fall through the ground, be blasted into the stratesphere by a nearby explosion, get kicked into the next county or even get picked up by another NPC.
I suppose its also possible that a misc object can be cleaned up on cell reset. What you can do is set it as a 'Quest' object or 'Persistant Reference' and it should stick around forever.
User avatar
Enie van Bied
 
Posts: 3350
Joined: Sun Apr 22, 2007 11:47 pm

Post » Tue May 17, 2011 2:24 am

That description means "to avoid the problem of having your items removed at cell cleanup, remove them yourself first with disable, then MarkForDelete".
Like WillieSea says though, it shouldn't apply to Misc objects.
There is no 'persistant reference' on PlaceAtMe objects (unless you get tricky by using something else and switching models), but 'quest item' should be enough to keep it ingame.
User avatar
I’m my own
 
Posts: 3344
Joined: Tue Oct 10, 2006 2:55 am

Post » Tue May 17, 2011 10:07 am

Yeah, I assumed it had been kicked. But ticking the "quest object" flag on the activator object will keep it from disappearing? I guess I could just stop being lazy and test it out in game...

Edit - Yup, that seems to work. As a side note, implementing this was surprisingly easy, I didn't even have to alter the original object script, just apply it to the activator object and replace it with a new, shorter script to handle the conversion.
User avatar
Marquis T
 
Posts: 3425
Joined: Fri Aug 31, 2007 4:39 pm


Return to Fallout 3