Persisent object references in GECK

Post » Sun Oct 25, 2009 4:30 pm

http://www.cipscis.com/fallout/tutorials/beginners.aspx
Cipscis glosses over this on his page. He says that reference functions can only be used on "editor reference IDs" (the human readable names that are optionally entered in the cell window) and that those objects with editor reference IDs have to be marked as persistent.

Which leads me to think that calling ".Enable" or ".Disable" on a EditorRefID (like wrRSGGoodspringsGlobe01) should not compile if I didn't mark wrRSGGoodspringsGlobe01 in the cell window as persistent. Except that it doesn't seem to make a difference. My mod that moves the snow globes around is functioning just fine, without the individual globes being marked as persistent and I'm able to reference their EditorRefID in my scripts.

Thinking about this, the way I understand things is that the "persistent" flag means that it will remember its state across cell resets. So if you move an object with the persistent flag to a different shelf, it will remain there even after the cell resets?
User avatar
Miss Hayley
 
Posts: 3414
Joined: Tue Jun 27, 2006 2:31 am

Post » Sun Oct 25, 2009 5:27 pm

That's odd. Persistent items are supposed to be those available from outside the cell- they're kept in a table of persistent refs constantly, rather than loaded in along with other temporary references when the cell they're in's loaded.
Is your script working properly when you're not in the cell and it's not loaded (the last 2-3 cells you've visited often remain loaded)? They might have changed things in NV so you can pass functions nonpersistent references on the understanding you'll only try to use them when they're loaded.
User avatar
Markie Mark
 
Posts: 3420
Joined: Tue Dec 04, 2007 7:24 am

Post » Sun Oct 25, 2009 6:45 pm

My mod that moves the snow globes around is functioning just fine, without the individual globes being marked as persistent and I'm able to reference their EditorRefID in my scripts.


FO3's GECK compiler used to [censored] at me if I tried to run a script command against a REF that I had not checked off as persistant.

This seems new, if it is indeed what is happening.
User avatar
lucile
 
Posts: 3371
Joined: Thu Mar 22, 2007 4:37 pm

Post » Sun Oct 25, 2009 5:47 pm

Pretty sure that it's all working properly - I'm just now a bit paranoid about not having the persistent flag set on those 70 snow globe objects. I've done quite a bit of testing, and the globes have been ending up where I'd expect them to be, even in cells that I had not yet visited. Without the persistent flag.

The only thing I can think of is that I have them set to be disabled at start, then the script picks a single one to enable.

I can also think of one weird situation I may have encountered, and the persistent flag may be why. NellisTeddyBear (the original in Hangar1 cell) is not set as persistent in the base game. I had been inside that cell prior to hooking that particular object up to my randomization script. So, logically, that bear should have already been spawned in and enabled. But my mod overrode that to be initially disabled, and since it wasn't a persistent reference, I think it worked because the script (which told me via debug messages) was enabling one of the other bear spawns that I had added since NellisTeddyBear was returning false when I queried whether it existed.

So, I'm thinking I should probably go flag all those as persistent, just to be safe. But it's working... so maybe not.

The other possibility is that since these are flagged as "quest" items in the base definition, they may be persistent by default.
User avatar
Annick Charron
 
Posts: 3367
Joined: Fri Dec 29, 2006 3:03 pm

Post » Sun Oct 25, 2009 8:19 pm

FO3's GECK compiler used to [censored] at me if I tried to run a script command against a REF that I had not checked off as persistant.

This seems new, if it is indeed what is happening.

The FNV GECK (w/ debug error fix) seems plenty happy to complain at me when I try to use a non-persistent reference in my scripts, so I'm not sure what's going on here.
User avatar
Lavender Brown
 
Posts: 3448
Joined: Tue Jul 25, 2006 9:37 am

Post » Sun Oct 25, 2009 11:45 pm

I'm leaning towards "quest flagged base items are persistent by default", even if not flagged as such in the cell's object window.
User avatar
Daddy Cool!
 
Posts: 3381
Joined: Tue Aug 21, 2007 5:34 pm

Post » Sun Oct 25, 2009 5:06 pm

The other possibility is that since these are flagged as "quest" items in the base definition, they may be persistent by default.
Ah, that'd be the reason. It's the only way to spawn persistent refs ingame too (used it for RobCo).
User avatar
Beth Belcher
 
Posts: 3393
Joined: Tue Jun 13, 2006 1:39 pm


Return to Fallout: New Vegas