What happens to a persistent reference placed in a respawnin

Post » Tue Jan 19, 2010 7:16 pm

in general to a non dynamic reference - but I am interested in persistent ones I use in scripts
stays in savegame? cause if not the reference should return to original location
what would getisreference (or in general a function that accepts a reference) return if I use such a reference as parameter ? if the ref is "destroyed" in some sense how do I check it ?
what would be the effect of functions like moveto or disable on such items ?
User avatar
Philip Lyon
 
Posts: 3297
Joined: Tue Aug 14, 2007 6:08 am

Post » Wed Jan 20, 2010 4:17 am

I don't believe persistent references can exist outside of the game world; upon entering an inventory that reference becomes invalid.
User avatar
Ymani Hood
 
Posts: 3514
Joined: Fri Oct 26, 2007 3:22 am

Post » Tue Jan 19, 2010 6:45 pm

I don't believe persistent references can exist outside of the game world; upon entering an inventory that reference becomes invalid.
http://www.gamesas.com/index.php?/topic/1084262-add-a-persistent-reference-to-the-player-inventory/ :nono:
http://cs.elderscrolls.com/constwiki/index.php/Modding_Terminology <- click

So what happens in the scenario I discuss ?
User avatar
lydia nekongo
 
Posts: 3403
Joined: Wed Jul 19, 2006 1:04 pm

Post » Tue Jan 19, 2010 7:22 pm

Use isFormValid to check validity. On the matter of persistence and cell resets, I'd think you'll loose your formID if the reset removed the item from the container. Why not test it out and enlighten the masses ?
User avatar
Ridhwan Hemsome
 
Posts: 3501
Joined: Sun May 06, 2007 2:13 pm

Post » Tue Jan 19, 2010 5:04 pm

Use isFormValid to check validity. On the matter of persistence and cell resets, I'd think you'll loose your formID if the reset removed the item from the container. Why not test it out and enlighten the masses ?
Thanks ShadeMe.
I will be testing it ASAP (need new PC) and post back.
See, all non-dynamic references are in the esm/esp - so if it gets deleted from the save game should snap back to its esm/esp position. This is rather improbable. I do wander what isFormValid will return.
User avatar
Quick Draw III
 
Posts: 3372
Joined: Sat Oct 20, 2007 6:27 am

Post » Tue Jan 19, 2010 11:51 pm

See, all non-dynamic references are in the esm/esp - so if it gets deleted from the save game should snap back to its esm/esp position. This is rather improbable. I do wander what isFormValid will return.
Not so - That only happens when you create a clean save. The game looks up loaded forms on the save game's form map and checks if it has a valid entry. If it does, it uses that instead.
User avatar
FLYBOYLEAK
 
Posts: 3440
Joined: Tue Oct 30, 2007 6:41 am

Post » Wed Jan 20, 2010 2:43 am

Not so - That only happens when you create a clean save. The game looks up loaded forms on the save game's form map and checks if it has a valid entry. If it does, it uses that instead.
Not sure I get this : clean save == disable mod and save without it - then the formids of that mod disappear for good (no snap back). I was saying that if it disappears from ess while mod still loaded snaps back. Doesn't seem to disappear easily though, started testing :
Checked with remove all items. Had only oblivion.esm (1.2.0.416), OOO.esm (1.34 RC 5) and my mod active, darnified dark ui, some texture replacers etc - also conScribe :) - right out of the sewers, Bendu Olo as high elf
EDIT: scrap this - the item I use (a book) cannot be low level processed - so probably it gets moved and the quest script's variable is not changed - but still using player.moveto I go to the test cell I had the reference originally - when in the test cell the script on the book keeps reporting its conatiner as the aforementioned clams :shrug:

quest script :
ref tomeAppr	;set to a persistent refref container	;set in tomeAppr's object script gameMode block- I think setting it from the quest is not possible (see below);references setprintc "container : %i" container;...IF isFormValid tomeAppr == 0	PRINTC "stopped !"	stopquest UDUNconjurationTomeQUESTELSE	;...	if conditionMadeTrue		; set container to UDUNTomeApprenticeREF.GetContainer ;doesn't work !!!!!!!!!!!		; set container to tomeAppr.GetContainer ;doesn'T work !!!!!!!!!!!!!!!!!!!!!!!!		printc "containerRRRRRRRRRRRRRRR : %i" container		if container == 0			;...		else			container.removeitemNS UDUNconjurationTomeAPPRENTICE 1			UDUNjourneymanTomeContainerREF.removeallitems container		endifENDIF


console (thanks to your nifty utility) :
container : 00000000container : 00000000container : 00000000container : 00000014	; ref added to playercontainer : 000C08E1	; player puts it in container	; clams right out of the sewersremoveallitems			; while 000C08E1 selected in consoleGetStage >> 20.00		; dunno what is this, an OOO thing ? pops up right after removeallitemscontainer : 000C08E1	; as you see the ref is still thought to be in the container !container : 000C08E1;... reload>	; <> is optionalbat mm					; condition made truecontainer : 000C08E1containerRRRRRRRRRRRRRRR : 000C08E1	; never isFormValid fails - all the commands for the case container != 0 are executedcontainer : 000C08E1container : 000C08E1container : 000C08E1

So the persistent ref stays in savegame and its container also.
ToDo :
place in chest in interior
resetInterior
set gameday to gameday + 3
make a super clean install of TES4
User avatar
Bethany Short
 
Posts: 3450
Joined: Fri Jul 14, 2006 11:47 am

Post » Tue Jan 19, 2010 8:56 pm

Another interesting result - placed the persistentRef in a dead, dynamically spawned creature (form id : ff000897) in an interior. Reset the interior and lo and behold : the persistent ref snapped back to original (esp) location (in the sense of player.moveto myPersistentRef gets me there). Great.
I wonder what happens to a non persistent ref - now probaly persistence matters ? I also wonder what happens in exteriors. Dead bodies do not seem to disappear easily in the open air.
http://www.gamesas.com/index.php?/topic/1084591-what-happens-to-a-persistent-reference-placed-in-a-respawning-chest/page__view__findpost__p__15878195
So it is the last seen spot in the game world...
User avatar
Tamara Dost
 
Posts: 3445
Joined: Mon Mar 12, 2007 12:20 pm

Post » Wed Jan 20, 2010 2:50 am

Another interesting result - placed the persistentRef in a dead, dynamically spawned creature (form id : ff000897) in an interior. Reset the interior and lo and behold : the persistent ref snapped back to original (esp) location (in the sense of player.moveto myPersistentRef gets me there). Great.
I wonder what happens to a non persistent ref - now probaly persistence matters ? I also wonder what happens in exteriors. Dead bodies do not seem to disappear easily in the open air.
http://www.gamesas.com/index.php?/topic/1084591-what-happens-to-a-persistent-reference-placed-in-a-respawning-chest/page__view__findpost__p__15878195
So it is the last seen spot in the game world...

same thing with 2 marker rats (disabled) placed in an OblivionWorld - one in interior one in exterior. Back to dummy cell when I closed the gate
User avatar
Enie van Bied
 
Posts: 3350
Joined: Sun Apr 22, 2007 11:47 pm

Post » Tue Jan 19, 2010 11:05 pm

Used getparentCell (from the quest script) - apparently the location of a persistent reference (which starts its life in the esp outside of a container) is its last dropped location (or the original esp location if the player takes it and never drops it again in the world but only places it in containers). So when placed in a respawning chest and the chest respawns, player.moveto persRef moves me to that location. Of course the ref is nowhere to be seen - enable does not do anything.
So how the heck one tests if the ref is still available ??

EDIT : with getitemcount hopefully (edit : nope)
EDIT2: getparentCell gives different results when run from the reference -- it gives the parent cell of the container
User avatar
Flash
 
Posts: 3541
Joined: Fri Oct 13, 2006 3:24 pm


Return to IV - Oblivion