Does anyone know if there is a way to confirm that an npc ha

Post » Fri May 27, 2011 12:03 pm

Hello (again.. :P)


I've been boggling over this for quite a few hours now.

I'm trying to find a way to discover when npc's are hidden while running the SetSceneIsComplex command. Reason, is to effectively disable them via script - and reason for that - a terrible bug with Oblivion has cropped up using this command. When you load a save which contains a bunch of these guys that were hidden while running SetSceneIsComplex .. oh wow talk about issues, from crashes, to bodies appearing and flying alover the place, to bodies showing up with abnormal visual anomalies (bodies look like stretch armstrong after he had been abused severely)..

I've tried GetDestyroyed, returns nothing. I'm about to try IsContainer, likely wont work either..

I really have no idea what the heck Oblivion is doing to these guys when they disappear, but I cant seem to find a way to detect when it happens.

Any ideas are welcome. I'm on the threshold of advising people not to load a save game during this 'scene', nor directly after it, and I seem to have no choice at this point. The command must be used, it drastically reduces the lag during a large scale battle.

(I've searched here on the forums, and even googled the command, no info regarding it apart from the general info on the wiki)

/edit -

Cannot use GetInCell, as the player may have led multitudes of the enemy into a different adjacent cell then where they started

IsContainer does not work on even dead npc's apparently.. Returns nothing either way.

Also had tried an onLoad script on all actors in the battle, which if dead, would force a disable on them. Seems the disable command will not work in an OnLoad script, and did nothing. This was an attempt to just make them not show at all on save game load during/after the battle scene. This also caused performance issues and some odd bugs having an OnLoad script on every character when moving into the battle scene, and had to be removed anyhow.

Again.. any ideas truly welcome.
User avatar
Bethany Watkin
 
Posts: 3445
Joined: Sun Jul 23, 2006 4:13 pm

Post » Fri May 27, 2011 6:31 pm

How are the actors being removed? If it's part of the native corpse removal of the setsceneiscomplex, there may not be any way to track it as the function is normally for cases when you have non-persistent actors who die.

You could try using
http://cs.elderscrolls.com/constwiki/index.php/GetDisabled
to detect it, but this function will not work with spawns created by the game (leveled lists) since those are wiped from the game rather soon after being removed, or the area changes, or or the game is reloaded.

If you're manually handling the removal, your better option might be to instead disable them, revive them, and move them to some holding cell before adding them back at base.
User avatar
Nadia Nad
 
Posts: 3391
Joined: Thu Aug 31, 2006 3:17 pm

Post » Fri May 27, 2011 10:45 pm

How are the actors being removed? If it's part of the native corpse removal of the setsceneiscomplex, there may not be any way to track it as the function is normally for cases when you have non-persistent actors who die.

You could try using
http://cs.elderscrolls.com/constwiki/index.php/GetDisabled
to detect it, but this function will not work with spawns created by the game (leveled lists) since those are wiped from the game rather soon after being removed, or the area changes, or or the game is reloaded.

If you're manually handling the removal, your better option might be to instead disable them, revive them, and move them to some holding cell before adding them back at base.



Thanks Vagrant

They are all persistent references, have to be because they are involved in the scripts.

No, I'm letting SetSceneIsComplex take care of them, and of course the function does an excellent job of making them fade away slowly. Either way, that function does alot more than just handle body removal, gotta have it running even if I wanted to attempt to manually disable them. Indeed, there is no desire to re-use these guys at all, it's just the problem that when coming back and trying to load a save while there are 'hidden' bodies due to the command, they all the sudden appear and cause major aforementioned issues, including crashes.

I'll try getDisabled, but I dont think they really are, because of the fact they show up again on loading a save.

I have seen there is a possible way to manually remove bodies and get the 'fade out' to work on them using the SetAlhpa function (something similar to that anyhow).. but in this case I would end up removing everyone (how would I know whom was hidden and not hidden by SetSceneIsComplex command), and further more with all the stuff going on during the fight, I'll bet working that body fade out script in will likely start causing even further issues and bugs - it's one approach I really need to avoid.

Might just come down to the player being advised due to an unfixable bug with Oblivion to carry on through the entire battle sequence and not load any save within it.. So if they fail, they have to try the battle sequence again from the start.. it's not really that bad. Hey at *least* this whole thing is even possible, and actually works, certainly better than not having the battle at all.

Thanks again :)
User avatar
Ice Fire
 
Posts: 3394
Joined: Fri Nov 16, 2007 3:27 am

Post » Fri May 27, 2011 1:47 pm

:ooo:

GetDisabled returned a message when running on the actors in the battle!

Wow.. never expected this to work..

Going to have to do a little bit more testing, but this could be the fix I've been looking for..

Thanks again Vagrant, excellent call on that command, might just pull it off after all. Being that they really are disabled at that time, haha I guess I can't disable them again.. but maybe teleporting them to another cell will work, and hopefully this will clear up the loading a save game issue.
User avatar
Ron
 
Posts: 3408
Joined: Tue Jan 16, 2007 4:34 am

Post » Fri May 27, 2011 10:22 pm

Looks like its working.. (of course there is always that chance of my tests just not showing the bug this round thru..)

Loaded a save right after the fight, after running moveToMarker on everyone that registered as disabled, and the save loaded fine, no bodies instantly appearing allover the place, no anomalies, no crash.

I thank you for the help there Vagrant, if you dont mind, just added you to the credits list :) (for this, and having helped a number of times in the past as well).

Not an easy task trying to figure out crazy bugs like this in such a big scene, and I appreciate the help greatly.

Later :)
User avatar
Joe Alvarado
 
Posts: 3467
Joined: Sat Nov 24, 2007 11:13 pm


Return to IV - Oblivion