User:DragoonWraith/ThreadArchiveTest

From the Oblivion ConstructionSet Wiki
Jump to navigation Jump to search

Thread Archive Test

This is an archive of a thread on the Elder Scrolls Forums. Since it was automatically generated using the Forum software, it uses a great number of custom stylesheet rules. These rules have been emulated for testing purposes, but not yet pushed down into the general stylesheet.

To use these custom styles, go to your User Style Sheet and copy this into it:

 @import "/constwiki/index.php?title=Wiki_User_Style/Thread_Archive.css&action=raw&ctype=text/css";

Be aware that you will have to clear your cache before the changes to your User Style Sheet will take effect!

Troubleshooting, bugs and common mistakes that cause great misery #2

Click here to view this topic in its original format

Bethesda Game Studios Forums _ General TES Construction Set -- Oblivion _ Gotchas: Troubleshooting

Posted by: dev_akm Apr 30 2008, 08:06 AM

Gotchas: Troubleshooting

=========
http://www.bethsoft.com/bgsforums/index.php?showtopic=628331
=========

This thread is for continued discussion and peer review of suspected gotchas. The previous thread has proved extremely useful for this purpose.

All the issues described and confirmed in these threads are accumulated in the

http://cs.elderscrolls.com/constwiki/index.php/Category:Troubleshooting

category on the CS Wiki. There's already a ton of great info collected there, but plenty more suspects still need confirmation.

Please help this effort by reporting suspected gotchas, helping to test and confirm reported problems, etc., so we can further improve the knowledgebase.

<img src="http://www.bethsoft.com/bgsforums/style_emoticons/default/falloutop5.gif" style="vertical-align:middle" emoid=":tops:" border="0" alt="falloutop5.gif" />

Posted by: spookyfx.com Apr 30 2008, 10:02 AM

I ran into this last night. Is this already a known problem?

I made a container and ran this on it:

Object script

Scriptname DPtest

Begin on activate
If GetItemCount myitem <= 0
AddItem myitem 1
Endif
activate
End


This would run, however the frame rate plummeted down to about 1 per second


Then I changed it to this:


Object script

Scriptname DPtest

Ref me

Begin on activate

Set me to this

If GetItemCount myitem <= 0
Me.AddItem myitem 1
Endif
activate
End


This worked great, no noticeable frame rate drop

What the heck was happening?

043008

Posted by: kyoma Apr 30 2008, 10:05 AM

QUOTE(spookyfx.com @ Apr 30 2008, 07:02 PM) [snapback]12180755[/snapback]
I ran into this last night. Is this already a known problem?

I made a container and ran this on it:

Object script

Scriptname DPtest

Begin on activate
If GetItemCount myitem <= 0
AddItem myitem 1
Endif
End
This would run, however the frame rate plummeted down to about 1 per second
Then I changed it to this:
Object script

Scriptname DPtest

Ref me

Begin on activate

Set me to this

If GetItemCount myitem <= 0
Me.AddItem myitem 1
Endif
End
This worked great, no noticeable frame rate drop

What the heck was happening?

043008

Not sure why it would cause a fps hit but the first script adds an item to the activator (or atleast tries to). Perhaps this is the cause. But in both cases it checks the item count of the activator itself, not the person who activated it. <img src="http://www.bethsoft.com/bgsforums/style_emoticons/default/shrug.gif" style="vertical-align:middle" emoid=":shrug:" border="0" alt="shrug.gif" />


Posted by: spookyfx.com Apr 30 2008, 10:16 AM

It is a bottomless container.
A water bucket to haul water up from a well.

Everytime the player opens the container there is one unit of water in it.
It works great now as per my second attempt.

Maybe it was another unrelated issue in my PC causing the problem.

I will test this with an isolated mod with ONLY this script in it and see if the FR problem happens again.


sorry I left one command (activate) out: EDIT:


If GetItemCount myitem <= 0
Me.AddItem myitem 1
Endif
activate
End










QUOTE(kyoma @ Apr 30 2008, 01:05 PM) [snapback]12180767[/snapback]
Not sure why it would cause a fps hit but the first script adds an item to the activator (or atleast tries to). Perhaps this is the cause. But in both cases it checks the item count of the activator itself, not the person who activated it. <img src="http://www.bethsoft.com/bgsforums/style_emoticons/default/shrug.gif" style="vertical-align:middle" emoid=":shrug:" border="0" alt="shrug.gif" />


Posted by: bg2408 Apr 30 2008, 10:18 AM

One command for that script posted above: GetActionRef

BTW, I have a CTD on save gotcha to share: Don't have a script target actor (script not on the actor script himself, but from an outside script. Also a specific non dynamic reference) lying around dead if he's not a "Quest Item". When too many corpses are produced, the engine could clear him and therefore cause CTD on the next save.

(http://www.bethsoft.com/bgsforums/index.php?showtopic=835442&hl=)

Posted by: spookyfx.com Apr 30 2008, 10:26 AM

I am not sure what you mean, can you please elaborate?

You wrote:
One command for that script posted above: GetActionRef

Posted by: kyoma Apr 30 2008, 10:28 AM

QUOTE(spookyfx.com @ Apr 30 2008, 07:26 PM) [snapback]12180864[/snapback]
I am not sure what you mean, can you please elaborate?

You wrote:
One command for that script posted above: GetActionRef

When someone (or something) activates an object and the OnActivate block on that object runs you have to use GetActionRef to get a reference to whatever is activating it. Else if you do not use a reference for certain functions (like AddItem and GetItemCount for example), those functions will run on the activator itself. And that's probably not what you want. <img src="http://www.bethsoft.com/bgsforums/style_emoticons/default/shrug.gif" style="vertical-align:middle" emoid=":shrug:" border="0" alt="shrug.gif" />

::edit:: Well you can use simply a reference but only with GetActionRef would it be the thing that is activating it. Else it's just a guess as to what could be activating it or it would be static (aka always assumes that reference, even when something else actually activated it). In your case you set me to this, which means me=the activator. If you use set me to GetActionRef, then me=player (assuming the player activates it).


Posted by: bg2408 Apr 30 2008, 10:33 AM

QUOTE(spookyfx.com @ Apr 30 2008, 08:26 PM) [snapback]12180864[/snapback]
I am not sure what you mean, can you please elaborate?

You wrote:
One command for that script posted above: GetActionRef

It would be GetActionRef if you want to set it to the one activating the container. This would imho be more "immersive" - you would get the water directly, instead of a "chest menu" <img src="http://www.bethsoft.com/bgsforums/style_emoticons/default/wink.gif" style="vertical-align:middle" emoid=";)" border="0" alt="wink.gif" />.


Posted by: Phitt Apr 30 2008, 10:43 AM

I have one question about 'placeatme' that I always wanted to ask. How bad is it really? The Wiki says I can use it a couple of times. Is there an average that a new reference created this way adds to the savegame filesize? How many placeatmes does it need to get a 10mb+ savegame? Hundreds? Thousands? Thing is I'm making a trap that needs creatures to be created on the fly, similar to a summon spell. I could set the creatures inside a dummy cell and use moveto, but since I only want to use it a couple of times for a couple of creatures I'd rather use placeatme if possible. Would be much less work and if, let's say, ten creatures make a difference of one kilobyte only I'd use it.

Posted by: dev_akm Apr 30 2008, 10:43 AM

QUOTE(bg2408 @ Apr 30 2008, 01:18 PM) [snapback]12180835[/snapback]
... Don't have a script target actor (script not on the actor script himself, but from an outside script. Also a specific non dynamic reference) lying around dead if he's not a "Quest Item". When too many corpses are produced, the engine could clear him and therefore cause CTD on the next save.


I wonder if similar CTD problems could happen with persistent actor refs after a cell buffer purge?

In other words, if you're using token-based scripts like RenGuardOverhaul, Deadly Reflex, Extra Wounding, etc. and then have Streamline or something else purging cell buffer -- then if one of the actors tracked by these scripts happens to be a persistent ref, then your CTD chances greatly increase? If so, this might be the source of a lot of CTD frustration, but it's a pretty big if.


Posted by: bg2408 Apr 30 2008, 11:03 AM

QUOTE(Phitt @ Apr 30 2008, 08:43 PM) [snapback]12180930[/snapback]
Thing is I'm making a trap that needs creatures to be created on the fly, similar to a summon spell.
I made some extensive testings about that some time ago: Creatures placed with placeatme get cleaned up when they're dead and do not cause savegame bloating, unless they're "Quest Items".

My tests were: Creating a bunch of creatures in a cell. Kill them. Get a FormID from one of them.

Leave the room, wait respawntime, go back -> room cleared. Furthermore player.moveto FormID works until the cell is cleared, but then not anymore -> which means the thing is purged from the save.

Also for the testing described in the above linked thread I created some thousands of mudcrabs. Savegame size went up to 15+ MB, but after cell reset was down to 5 MB.

Nevertheless placeatme should not be used when MoveTo is possible! Cell reset is a strange thing sometimes. Also if they're not killed, they stick around forever...

QUOTE(dev_akm @ Apr 30 2008, 08:43 PM) [snapback]12180934[/snapback]
I wonder if similar CTD problems could happen with persistent actor refs after a cell buffer purge?

In other words, if you're using token-based scripts like RenGuardOverhaul, Deadly Reflex, Extra Wounding, etc. and then have Streamline or something else purging cell buffer -- then if one of the actors tracked by these scripts happens to be a persistent ref, then your CTD chances greatly increase? If so, this might be the source of a lot of CTD frustration, but it's a pretty big if.
Hm. A directly scripted actor shouldn't be a problem (there are many out there, like Shambles or other things). Totally independent scripts like in my gotcha do cause problems. How about these "local" token scripts? I don't know, and I don't even have an idea how to test it *. Although what I experienced was a CTD on save, not a "normal" CTD.

* = Hm, maybe I have an idea for testing. Maybe kill a "tokened" guard, do the mud crab trick to go over the maximum corpse number value and see what happens? Although I doubt that this will cause issues. My "gotcha" was a specific static reference, which was suddenly gone, not a dynamic "set me to getcontainer / getself / getactionref / placeatme / createfullactorcopy" thing usually used in scripts <img src="http://www.bethsoft.com/bgsforums/style_emoticons/default/blink.gif" style="vertical-align:middle" emoid=":blink:" border="0" alt="blink.gif" />.


Posted by: spookyfx.com Apr 30 2008, 11:47 AM

That will not work for what I am doing.
The water is stolen property. The bucket is assigned to the well owner.

I tested this already (the last one I posted with the activate command) it works the way I want it to.
And with the special sound effects I assigned to the bucket it is very immersive as well.

I just do not understand why the first way would suck up the FR.

But in the end it may not, it may be something else (most likely it was)
So I will test this as I mentioned before by putting the suspect script in its own mod and turning off all my other mods for the test.

QUOTE(bg2408 @ Apr 30 2008, 01:33 PM) [snapback]12180890[/snapback]
It would be GetActionRef if you want to set it to the one activating the container. This would imho be more "immersive" - you would get the water directly, instead of a "chest menu" <img src="http://www.bethsoft.com/bgsforums/style_emoticons/default/wink.gif" style="vertical-align:middle" emoid=";)" border="0" alt="wink.gif" />.


Posted by: dev_akm Apr 30 2008, 11:51 AM

QUOTE(Phitt @ Apr 30 2008, 01:43 PM) [snapback]12180930[/snapback]
I have one question about 'placeatme' that I always wanted to ask. How bad is it really? The Wiki says I can use it a couple of times. Is there an average that a new reference created this way adds to the savegame filesize? How many placeatmes does it need to get a 10mb+ savegame? Hundreds? Thousands? Thing is I'm making a trap that needs creatures to be created on the fly, similar to a summon spell. I could set the creatures inside a dummy cell and use moveto, but since I only want to use it a couple of times for a couple of creatures I'd rather use placeatme if possible. Would be much less work and if, let's say, ten creatures make a difference of one kilobyte only I'd use it.


Not sure exactly, but here's an anecdotal answer: I don't think it's very bad except in very extreme cases. When I had severe savegame bloat from the Reznod Mannequin item duplication bug, the bloat was drastic: 26Mb savegame. However, I think most of this bloat came from duplicate "created" items (something I enchanted and then placed on the mannequin). Somehow I got 56,285 created weapons, 97,250 book refs, and 120,000 object refs in my savegame that didn't point to any mod.

Removing mods like the old Get Wet (which used tons of placeatme activators) helped reduce my file size a bit, but it was insignificant compared to the duplicate items.

Also, I think that placeatme is fairly safe for actors that can be killed since the corpses get cleaned up after respawn, right? EDIT: what bg said! <img src="http://www.bethsoft.com/bgsforums/style_emoticons/default/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" />

You should be able to easily test whether it has much effect by using Wrye Bash to compare savegame stats before and after you go through the trap. Here's what the report looks like for mine:

http://devnull.sweetdanger.com/mods/character_stats_bash_aaryth.txt


Posted by: Phitt Apr 30 2008, 12:32 PM

QUOTE(bg2408 @ Apr 30 2008, 09:03 PM) [snapback]12180999[/snapback]
I made some extensive testings about that some time ago: Creatures placed with placeatme get cleaned up when they're dead and do not cause savegame bloating, unless they're "Quest Items".

[...]


Thanks, that's good to know. The trap works in a way that the creatures always get killed (or the player). And I'm only using it in two locations, so even if the player loots the dungeon ten times and always triggers the traps the placeatmes won't create more then twenty creatures.

QUOTE(dev_akm @ Apr 30 2008, 09:51 PM) [snapback]12181197[/snapback]
[...]

You should be able to easily test whether it has much effect by using Wrye Bash to compare savegame stats before and after you go through the trap.


Thanks, but I guess for the small number of creatures I'm placing it won't make a noticeable difference when I look at your stats.

Placeatme, I'm coming! <img src="http://www.bethsoft.com/bgsforums/style_emoticons/default/tongue.gif" style="vertical-align:middle" emoid=":P" border="0" alt="tongue.gif" />


Posted by: dev_akm Apr 30 2008, 12:44 PM

QUOTE(bg2408 @ Apr 30 2008, 02:03 PM) [snapback]12180999[/snapback]
Hm. A directly scripted actor shouldn't be a problem (there are many out there, like Shambles or other things).


Right. Every creature and NPC in MMM and OOO have scripts on them, so we know that's not an issue on its own.

QUOTE(bg2408 @ Apr 30 2008, 02:03 PM) [snapback]12180999[/snapback]
Totally independent scripts like in my gotcha do cause problems. How about these "local" token scripts? I don't know, and I don't even have an idea how to test it *. Although what I experienced was a CTD on save, not a "normal" CTD.

* = Hm, maybe I have an idea for testing. Maybe kill a "tokened" guard, do the mud crab trick to go over the maximum corpse number value and see what happens? Although I doubt that this will cause issues. My "gotcha" was a specific static reference, which was suddenly gone, not a dynamic "set me to getcontainer / getself / getactionref / placeatme / createfullactorcopy" thing usually used in scripts <img src="http://www.bethsoft.com/bgsforums/style_emoticons/default/blink.gif" style="vertical-align:middle" emoid=":blink:" border="0" alt="blink.gif" />.


Exactly. So, the question then is whether "dynamic" references (getcontainer / getself / getactionref) are any less problematic in situations like this. In other words, does the problem come from having a hardcoded reference to the actor in the script or from the fact that the reference itself is persistent.

Here's a http://www.bethsoft.com/bgsforums/index.php?act=findpost&hl=&pid=12179896 of a similar situation.

Also, way back during the beta testing for OOO 1.3 we ran into some similar rare CTDs with Oscuro summons. The particular example I remember was if you killed one of the Oscuro "corrupted" summons using a shock spell or shock weapon, then a few seconds later you got a CTD. Something to do with the actor being disabled while the shock membrane shader was still playing on it. Sotobrastos managed to fix this before release, but sadly I don't remember all of the details anymore. <img src="http://www.bethsoft.com/bgsforums/style_emoticons/default/sad.gif" style="vertical-align:middle" emoid=":(" border="0" alt="sad.gif" />


Posted by: kyoma Apr 30 2008, 11:56 PM

I would say that dynamic references gotten with GetSelf and GetContainer aren't a problem. Cause should that reference be deleted/removed from the game, so would the token with the script on it.

Maybe GetActionRef could have a similar problem since the reference could disappear while the (activator) script is still running.

Posted by: mrflippy May 19 2008, 10:48 PM

I know this is really old, but I stumbled across this and wanted to clarify:

QUOTE(dev_akm @ Jan 26 2007, 02:12 PM) [snapback]9114096[/snapback]
PlaceAtMe Bloating Savegames
I was most surprised to find no mention of this issue whatsoever in the high-profile tutorial http://cs.elderscrolls.com/constwiki/index.php/Casting_Spells_From_An_Activator, which apparently gives very bad advice by giving script examples that will leave garbage in your savegame. The problem is that disable doesn't remove the reference from your savegame. It's mentioned on the http://cs.elderscrolls.com/constwiki/index.php/Category:About_Modding_Etiquette, but this is a pretty weak warning:
The http://cs.elderscrolls.com/constwiki/index.php/PlaceAtMe page has a good warning and the http://cs.elderscrolls.com/constwiki/index.php/Talk:PlaceAtMe page has some additional details, but these issues are not mentioned in the places where people really look for answers (i.e., tutorials), so I'm not sure how effective this is.


At the time I wrote that tutorial, I was basically hacking out lots of proof of concept things. It wasn't my intent to give bad advice. I had actually asked one of the developers about PlaceAtMe, and he said that disable would remove the references, so I didn't think any more of it. I'm glad someone figured out what was going on and edited the article <img src="http://www.bethsoft.com/bgsforums/style_emoticons/default/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" />


Posted by: dev_akm May 20 2008, 08:59 AM

QUOTE(mrflippy @ May 20 2008, 01:48 AM) [snapback]12265089[/snapback]
I know this is really old, but I stumbled across this and wanted to clarify:
At the time I wrote that tutorial, I was basically hacking out lots of proof of concept things. It wasn't my intent to give bad advice. I had actually asked one of the developers about PlaceAtMe, and he said that disable would remove the references, so I didn't think any more of it. I'm glad someone figured out what was going on and edited the article <img src="http://www.bethsoft.com/bgsforums/style_emoticons/default/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" />


Thanks for the note! Great to see you around!

This is one of the rare cases where early dev advice turned out to be incorrect, but nobody knew this back when you were writing the tutorial, so don't feel bad about it. It's an excellent tutorial with that changed. <img src="http://www.bethsoft.com/bgsforums/style_emoticons/default/falloutop5.gif" style="vertical-align:middle" emoid=":tops:" border="0" alt="falloutop5.gif" />


Posted by: DragoonWraith May 20 2008, 08:37 PM

QUOTE(mrflippy @ May 19 2008, 11:48 PM) [snapback]12265089[/snapback]
...

Holy cow! Hey, how are ya? Great to see you, man!


Posted by: bg2408 May 24 2008, 12:15 AM

Another gotcha which I've seen a couple of times now - I don't know if the gotchas discovered here are summarized somewhere, but if they are, this may be worth listing:

When doing any kind of summonable or portable Oblivion gate using MoveTo commands into the Oblivion realms will screw up the realms (they won't reset, so the next time you're going into that random realm again there will be no sigil stone). Using a proper door is necessary.

But it may be even worse: Some cases indicate that even when using a door, unless a specific command when closing is called, again the realm won't reset. Which command I don't know, maybe the door needs to get destroyed, maybe DisableLinkedPathPoints is necessary, or other strange stuff. Best bet is to emulate the standard gate behaviour as closely as possible.

Posted by: Sageing fail since 1463 May 24 2008, 04:38 AM

QUOTE(bg2408 @ May 24 2008, 03:15 AM) [snapback]12282709[/snapback]
But it may be even worse: Some cases indicate that even when using a door, unless a specific command when closing is called, again the realm won't reset. Which command I don't know, maybe the door needs to get destroyed, maybe DisableLinkedPathPoints is necessary, or other strange stuff. Best bet is to emulate the standard gate behaviour as closely as possible.


Wait...
One gate links to one realm and if you do not call closecurrentobliviongate, of course, the realm doesn't reset. IIRC, you can even go out of the realm via the gate to resupply and can go back in again.


Posted by: bg2408 May 24 2008, 05:42 AM

QUOTE(Sageing fail since 1463 @ May 24 2008, 02:38 PM) [snapback]12283144[/snapback]
Wait...
One gate links to one realm and if you do not call closecurrentobliviongate, of course, the realm doesn't reset. IIRC, you can even go out of the realm via the gate to resupply and can go back in again.
http://www.bethsoft.com/bgsforums/index.php?showtopic=843877&hl=. I've seen this problem a couple of times now - that realms get messed up like described when the Sigil Stone is taken (which calls CloseCurrentOblivionGate) - it seems that this is not enough to completely reset the realm.


Posted by: dev_akm May 27 2008, 02:07 PM

QUOTE(bg2408 @ May 24 2008, 03:15 AM) [snapback]12282709[/snapback]
Another gotcha which I've seen a couple of times now - I don't know if the gotchas discovered here are summarized somewhere, but if they are, this may be worth listing:

When doing any kind of summonable or portable Oblivion gate using MoveTo commands into the Oblivion realms will screw up the realms (they won't reset, so the next time you're going into that random realm again there will be no sigil stone). Using a proper door is necessary.

But it may be even worse: Some cases indicate that even when using a door, unless a specific command when closing is called, again the realm won't reset. Which command I don't know, maybe the door needs to get destroyed, maybe DisableLinkedPathPoints is necessary, or other strange stuff. Best bet is to emulate the standard gate behaviour as closely as possible.


Oy, nasty one there. Sounds like a good one to add to the list!


Posted by: haama Jun 11 2008, 07:58 AM

From the mouth of the http://www.bethsoft.com/bgsforums/index.php?s=&showtopic=846900&view=findpost&p=12353957, Oblivion diviner and bringer of knowledge:

QUOTE
Update: I've just gone and undeleted 3,336 deletions. It's now undeniably confirmed that deletion of vanilla refs. is the major cause of crash-on-exit if a mod that loads after the mod that deleted the ref(s) tries to do anything with them. I now have to find what the deletions were for (ie the first one was a loaf of bread floating outside the playable area of Anvil Castle Great Hall... go figure) and flag them as disabled or move them or leave them be, depending. Obviously, I'm not going to do them all before I send out the hotfix, as that could take weeks. Most of them are underground rocks in Tamriel, underground wall units in Oblivion planes, and an inaccessible section of Fingerbowl Cave. I will restore the necessary ones in towns and interiors. So there will be some delay in getting the hotfix out (sorry) but it's best that I get this done and get rid of any chance that the UOP causes crashes on exit.

It should also now be known as "no no" in mods to ever delete any vanilla (Oblivion.esm) refs. Even the official DLC's do this, so if another mod loads after them and does anything with the refs. that they deleted, crash on exit.


Posted by: dev_akm Jun 12 2008, 09:24 AM

QUOTE(haama @ Jun 11 2008, 10:58 AM) [snapback]12355637[/snapback]
From the mouth of the http://www.bethsoft.com/bgsforums/index.php?s=&showtopic=846900&view=findpost&p=12353957, Oblivion diviner and bringer of knowledge:


Wow, that sucks. <img src="http://www.bethsoft.com/bgsforums/style_emoticons/default/sad.gif" style="vertical-align:middle" emoid=":(" border="0" alt="sad.gif" />

So many mods do this it's hard to imagine being able to avoid it completely. I hope it turns out to be only certain kinds of objects or refs that cause it.

Will be interesting to see what the best workaround is. I guess simply moving the object out of sight may be the best alternative, but that could leave a lot of unused objects hanging around and slowing down the game. Might be a choice of which evil is lesser.


Posted by: kyoma Jun 12 2008, 09:29 AM

QUOTE(dev_akm @ Jun 12 2008, 07:24 PM) [snapback]12360441[/snapback]
....I guess simply moving the object out of sight may be the best alternative, but that could leave a lot of unused objects hanging around and slowing down the game. Might be a choice of which evil is lesser.

Well and ofcourse using Initially Disabled to stop it from being rendered. <img src="http://www.bethsoft.com/bgsforums/style_emoticons/default/shrug.gif" style="vertical-align:middle" emoid=":shrug:" border="0" alt="shrug.gif" />


Posted by: DragoonWraith Jun 12 2008, 11:05 AM

Yes, but then if other mods try to use those refs, would they still be disabled? I'm not certain how load ordering and precedence works for REFRs...

Posted by: kyoma Jun 12 2008, 11:17 AM

QUOTE(DragoonWraith @ Jun 12 2008, 09:05 PM) [snapback]12360806[/snapback]
Yes, but then if other mods try to use those refs, would they still be disabled? I'm not certain how load ordering and precedence works for REFRs...

Hmmm yes, but then again, if other mods are using those refs would they still need to be hidden/removed/disabled? <img src="http://www.bethsoft.com/bgsforums/style_emoticons/default/shrug.gif" style="vertical-align:middle" emoid=":shrug:" border="0" alt="shrug.gif" />


Posted by: haama Jun 12 2008, 11:45 AM

QUOTE(kyoma @ Jun 12 2008, 01:29 PM) [snapback]12360464[/snapback]
Well and ofcourse using Initially Disabled to stop it from being rendered. <img src="http://www.bethsoft.com/bgsforums/style_emoticons/default/shrug.gif" style="vertical-align:middle" emoid=":shrug:" border="0" alt="shrug.gif" />

Not the point for avoiding the bug, but I'm not sure that will work for games in-progress. Has anyone tried?


Posted by: Kivan Jun 12 2008, 01:51 PM

QUOTE(haama @ Jun 12 2008, 03:45 PM) [snapback]12360964[/snapback]
Not the point for avoiding the bug, but I'm not sure that will work for games in-progress. Has anyone tried?


Yes and it's fine. I made three test minimods. In the first, I set Initially Disabled on all objects in an outdoor cell. In the second, I deleted all of the objects. In the third, I set an enable parent to player (the only mass operation available from outside the Render window) just so they were all dirty.

With #1 active, objects were gone. With #1 and #3 active, objects were all back, including if game was saved with #3 inactive and it was then activated and game loaded. With all three active, objects were all back (well, seemed to be... see below) but.... crash on exit because #3's changes loaded after #2's deletions.

An initially disabled object ref. still has the full object ref. record; any change to the object by a later mod will override the entire record including the disabling.

One more test I have to do... I'll make a bad mesh that crashes Oblivion and place an object using it that's initially disabled to see if it precaches meshes for disabled objects.

Edit: While I was at it I was finally able to confirm something I had long suspected because I'd never heard complaints about it before then: the horridly long hangs and disk thrashing of the crash-on-exit was, so it seems, introduced by the 1.2.0416 patch due to the form ID cleanup code. I tried the #1/2/3 combination above on the 1.2.0214 .EXE and it takes less than a second for the error window to appear after quitting. Otherwise it's a good 10-15 seconds of an unrendered window and disk thrashing on 1.2.0416.

This sounds like something for Wrye or ElminsterAU or dev_akm to incorporate in their utilities. All that's required is to find deleted refs. drawn from Oblivion.esm ie with a 00 index, if they are found, import the entire record (deleted refs. are missing the data segment which is probably what causes crash on exit) from the ESM replacing the deletion record and set the Initially Disabled flag.

Edit2: It doesn't appear to affect all refs. I made two minimods. In #1 I deleted Weynon Priory House. In #2 I moved it up so it was floaty. If both were loaded it would not display the mesh until I disabled/re-enabled, but did not crash on exit with it displayed. With # 2 alone it appeared properly floaty.

Edit3: Made two minimods that deleted and moved a rock respectively. No crash on exit. Something tells me it's SpeedTree objects. I'll try one of them next.

Edit4: Nope, deleted and moved a shrub in two minimods and no crash on exit.

Edit5: Just to make sure, deleted and moved a tree, and still no crash on exit.

Edit6: No go with a harvestable flora (Dominica Redwort) either.

Can't continue the testing as I need to work on getting the UOP update done and out. But I did find one other good reason to never delete anything: in four of the cases (the single deletions of the priory, tree, shrub and flower) the object was present in-game when the deletion was overriden but it was invisible. It had to be PRIDded, disabled and enabled for it to be visible. So if a mod deletes a ref in Oblivion.esm and a later loaded mod tries to use it, it may end up invisible.


Posted by: dev_akm Jun 13 2008, 07:57 AM

QUOTE(Kivan @ Jun 12 2008, 04:51 PM) [snapback]12361457[/snapback]
Yes and it's fine. I made three test minimods. In the first, I set Initially Disabled on all objects in an outdoor cell. In the second, I deleted all of the objects. In the third, I set an enable parent to player (the only mass operation available from outside the Render window) just so they were all dirty.

With #1 active, objects were gone. With #1 and #3 active, objects were all back, including if game was saved with #3 inactive and it was then activated and game loaded. With all three active, objects were all back (well, seemed to be... see below) but.... crash on exit because #3's changes loaded after #2's deletions.
.....


Thanks so much for all the testing! That's great info, man.

QUOTE(Kivan @ Jun 12 2008, 04:51 PM) [snapback]12361457[/snapback]
...
This sounds like something for Wrye or ElminsterAU or dev_akm to incorporate in their utilities. All that's required is to find deleted refs. drawn from Oblivion.esm ie with a 00 index, if they are found, import the entire record (deleted refs. are missing the data segment which is probably what causes crash on exit) from the ESM replacing the deletion record and set the Initially Disabled flag.
...


Sounds like a reasonable solution. Now if we can just get one of them interested in the idea ....

<img src="http://www.bethsoft.com/bgsforums/style_emoticons/default/wink.gif" style="vertical-align:middle" emoid=";)" border="0" alt="wink.gif" />


Posted by: Arthmoor Jun 14 2008, 11:02 PM

The deletion conflict problem may not become a gotcha until several deletions are later overridden. All I can tell you for sure is that after going through my list of mods and undeleting records with TES4Edit, my problems with crash-on-exit have all vanished. Including edits to Tamriel -47,-7 which has been pinned as a cause for exit crashes.

Were I debugging this as a C program I'd be suspecting a double-free. These don't always bite you. The risk increases the more double-frees you cause until eventually one crashes the program. Perhaps the deletion marks it in the list as NULL and immediately removes the memory, but then the modification comes along and modifies that memory. Which remains semi-valid for the duration of the game. But when quitting the code blows up because it tried to free an already free block of memory. I've seen plenty of this in MUD code where invalid memory is still accessible until someone tries to shut down. Then it crashes as it's cleaning up.

What I don't get is why Oblivion bothers. Why go through the hassle of cleaning all that memory up when you've clearly told it you just want to quit. Why not just perform a saveini and simply drop to desktop after that? Let Windows have the memory back and clean up anything needing cleanup.

BTW - Shoving an item out of view by +/-150,000 Z units ( arbitrary value ) will put it far enough away that the game won't render it anyway. So if all this disabling and reenabling doesn't work, just shove it out of sight and it's not an issue if another mod comes along and drags it back to the surface. <img src="http://www.bethsoft.com/bgsforums/style_emoticons/default/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" />

Posted by: haama Jun 18 2008, 09:25 AM

As per Kivan's finding, I've been going through COBL's version of Salmo changing deletes to Ignores. Easy for the most part, however I had some problems with doors. Salmo deletes two doors

QUOTE
REFR [00024E3E] (in GRUP Cell Persistent Children of CELL - Cell [00027D50] <SkingradSalmoTheBakersHouse> "Salmo the Baker's House")
Record Flags: Deleted, Quest item / Persistent reference


REFR [0008D75B] <BadTarget> (in GRUP Cell Persistent Children of CELL - Cell [00027D60] <SkingradTwoSistersLodge> "Two Sisters Lodge")
Record Flags: Deleted, Quest item / Persistent reference
EDID - Editor ID: BadTarget

I couldn't find either in the listed cells. Loaded up TES4View, and lo and behold the first door is a target... from a door inside Salmo's house. Combing through Oblivion.esm, I found the door in the Skingrad Worldspace, not Salmo's house. No such info for the second door, and I still haven't found it.

So, it seems that the doors are moved to a different cell when they're deleted. Maybe this is what causes the CTD on exit? Has anyone else run into this? And where the <img src="http://www.bethsoft.com/bgsforums/style_emoticons/default/banghead.gif" style="vertical-align:middle" emoid=":banghead:" border="0" alt="banghead.gif" /> is that second door <img src="http://www.bethsoft.com/bgsforums/style_emoticons/default/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" />?


Posted by: FerociousPuppy Jun 18 2008, 09:53 AM

edit- wrong thread. <img src="http://www.bethsoft.com/bgsforums/style_emoticons/default/blush.gif" style="vertical-align:middle" emoid=":embarrass:" border="0" alt="blush.gif" />

Posted by: Kivan Jun 18 2008, 10:57 AM

QUOTE(haama @ Jun 18 2008, 01:25 PM) [snapback]12386441[/snapback]
As per Kivan's finding, I've been going through COBL's version of Salmo changing deletes to Ignores. Easy for the most part, however I had some problems with doors. Salmo deletes two doors

I couldn't find either in the listed cells. Loaded up TES4View, and lo and behold the first door is a target... from a door inside Salmo's house. Combing through Oblivion.esm, I found the door in the Skingrad Worldspace, not Salmo's house. No such info for the second door, and I still haven't found it.

So, it seems that the doors are moved to a different cell when they're deleted. Maybe this is what causes the CTD on exit? Has anyone else run into this? And where the <img src="http://www.bethsoft.com/bgsforums/style_emoticons/default/banghead.gif" style="vertical-align:middle" emoid=":banghead:" border="0" alt="banghead.gif" /> is that second door <img src="http://www.bethsoft.com/bgsforums/style_emoticons/default/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" />?


When you make any edit to a linked door, the other door is "dirtied" by the CS (the record is saved in the ESM/ESP though it's exactly the same.) The dirty record can be safely removed.


Posted by: haama Jun 18 2008, 02:32 PM

QUOTE(Kivan @ Jun 18 2008, 02:57 PM) [snapback]12386870[/snapback]
When you make any edit to a linked door, the other door is "dirtied" by the CS (the record is saved in the ESM/ESP though it's exactly the same.) The dirty record can be safely removed.

Good to know, but I don't think that's the case here. [oh, wait] Also, is it normal that the records move to the other cell?

After some more digging, I finally found "Bad Target" - it's the first target in Abandoned Mines, and I suppose, like it's namesake, is a default for bad targets. Not sure why it's deleted, though. The only thing that points to it is a mod-added package <img src="http://www.bethsoft.com/bgsforums/style_emoticons/default/shrug.gif" style="vertical-align:middle" emoid=":shrug:" border="0" alt="shrug.gif" />


Posted by: Arthmoor Jun 19 2008, 07:08 PM

If you're looking to delete a door because you don't need it around, you should undelete it, load the CS, then find the door you want gone and instead check the box for initially disabled on its properties. This is what I ended up doing for Open Cities and it's worked perfectly.

Posted by: dev_akm Jul 1 2008, 11:02 AM

I've added the http://cs.elderscrolls.com/constwiki/index.php/Crashes#Deleted_References issue to the wiki.

Posted by: dev_akm Jul 2 2008, 09:08 AM

I think we need a new subcategory for savegame problems. Right now I can think of a few major savegame CTD issues:

  • Crash when loading savegame after removing a weather mod. Can be avoided by using the console to Force Weather (fw) to vanilla weather type, then making a clean save in an interior cell.
  • Crash when loading a savegame after adding a mod that changes potion script name. No perfect solution known. Load the mod earlier so it doesn't change the script name.
  • Crash when reloading a savegame made in another cell than the one you're currently in. Undelete references in the mods you're using (not an easy solution).
  • Crash when loading a savegame that has mismatched variable types for active scripts. See http://cs.elderscrolls.com/constwiki/index.php/Common_Mistakes#Changing_Script_Variables.
Also, there are probably plenty of less severe issues we could list, such as NPC stat changes failing to have any effect (Update NPC Levels) and naked NPCs (wait for respawn in a remote interior cell).

What do you guys think?

What else should be on this list?

EDIT: added script variables crash.


Posted by: Toutatis Jul 2 2008, 09:18 AM

QUOTE(dev_akm @ Jul 2 2008, 01:08 PM) [snapback]12450859[/snapback]
[*]Crash when reloading a savegame made in another cell than the one you're currently in. Undelete references in the mods you're using (not an easy solution).

Well it is rather easy (for those with a minimum modding knowledge) and quick to do (both identifyng and undeleting the refs) with tes4edit.

FYI, another common mistake I see regularly, it is especially common when people make new innkeepers, is that they copy the topics from a vanilla npc not thinking that the voiceovers won't be copied and use the original topics for their custom npcs leaving the vanilla npcs voiceless (it is not very consequential in that it won't crash the game but it is annoying nonetheless).


Posted by: dev_akm Jul 2 2008, 10:50 AM

QUOTE(Toutatis @ Jul 2 2008, 12:18 PM) [snapback]12450905[/snapback]
Well it is rather easy (for those with a minimum modding knowledge) and quick to do (both identifyng and undeleting the refs) with tes4edit.


Yes, it's getting easier now that Wrye Bash has some tools to help undelete refs, but undeleting the refs is only the start of what you have to do to fix the issue. You also have to then set them to Initially Disabled (which TES4Edit can't do yet) and/or move them out of sight. Just moving them doesn't work well for NPCs or spawn points (they will all end up spawning in the Tiber Septim Hotel unless you also disable them).

Anyway, the point of adding this is to let people know about the issue as much as how to correct it.


Posted by: Kivan Jul 3 2008, 11:50 AM

Here's are two more I don't remember seeing in this list yet. My apologies if they are duplicates:

1) Unless your mod requires SI, don't edit existing dialog under the SI ESM (ie greetings.) The change to the top level of the tree will get tied to SI dialog that isn't there if the player doesn't have SI. For most people this is harmless but some people report crashing to desktop if they are playing under the old ESM. This is very easy to clean out of a mod even without TES4Edit or equivalent; just load the ESP under the old ESM, you'll get errors about the missing dialog, Yes them away and then save the ESP and the bad links will be gone.

2) When an actor enters a cell or is enabled in it and acquires pathing, sometimes the engine doesn't seem to care about the Z displacement of the nodes, so the actor may appear at a pathnode displaced far below where they should be if the node is closer X/Y to where they appeared (if they go below the floor they will then fall out of the sky.) Make sure that the actor is very close to or on a node when appearing and there are no nodes directly below it to avoid missing NPC's and broken quests.

Posted by: dev_akm Jul 3 2008, 01:40 PM

QUOTE(Kivan @ Jul 3 2008, 02:50 PM) [snapback]12456484[/snapback]
Here's are two more I don't remember seeing in this list yet. My apologies if they are duplicates:

1) Unless your mod requires SI, don't edit existing dialog under the SI ESM (ie greetings.) The change to the top level of the tree will get tied to SI dialog that isn't there if the player doesn't have SI. For most people this is harmless but some people report crashing to desktop if they are playing under the old ESM. This is very easy to clean out of a mod even without TES4Edit or equivalent; just load the ESP under the old ESM, you'll get errors about the missing dialog, Yes them away and then save the ESP and the bad links will be gone.

2) When an actor enters a cell or is enabled in it and acquires pathing, sometimes the engine doesn't seem to care about the Z displacement of the nodes, so the actor may appear at a pathnode displaced far below where they should be if the node is closer X/Y to where they appeared (if they go below the floor they will then fall out of the sky.) Make sure that the actor is very close to or on a node when appearing and there are no nodes directly below it to avoid missing NPC's and broken quests.


Excellent! Thanks, man!


Posted by: haama Jul 3 2008, 02:48 PM

QUOTE(Kivan @ Jul 3 2008, 03:50 PM) [snapback]12456484[/snapback]
1) Unless your mod requires SI, don't edit existing dialog under the SI ESM (ie greetings.) The change to the top level of the tree will get tied to SI dialog that isn't there if the player doesn't have SI. For most people this is harmless but some people report crashing to desktop if they are playing under the old ESM. This is very easy to clean out of a mod even without TES4Edit or equivalent; just load the ESP under the old ESM, you'll get errors about the missing dialog, Yes them away and then save the ESP and the bad links will be gone.

It'd be good to have a list of what in SI can and can't work without it.

I know that you can have items from SI in a container without a problem, they simply won't be there if you don't use SI. Hmm... not sure if I ever opened said container, but I used RemoveAllItems without a problem.

Using an explicit reference from SI in a script - the script won't run until you install SI. Kind-of nice, actually, I had one script that added all SI material and just left it as is - no need to test for SI or anything.


Posted by: dev_akm Jul 18 2008, 01:43 PM

Has anyone already documented limitations of the OnUnequip block? I didn't find anything on the wiki about it. Seems like perhaps it doesn't fire if the player drops an equipped item into a container. If it's confirmed, this is a major bummer. <img src="http://static.bethsoft.com/bgs/style_emoticons/default/sad.gif" style="vertical-align:middle" emoid=":(" border="0" alt="sad.gif" />

Posted by: spookyfx.com Aug 6 2008, 10:40 PM

I have been trying to give a horse an ability spell with addspell command and discovered Horses cannot hold onto Ability spells!

bummer...


But it makes sense I guess you cannot have a player getting fused to a horse (get on to ride) while the horse has some ability spell
attached to it, that I can see would cause problems!

I tested this by:

CODE
begin gameMode
set fQuestDelayTime to 0.001

if GetCrosshairRef == 0
return
endif

set target to GetCrosshairRef

if target.IsActor == 0 && target.iscreature == 0
return
endif

if target.HasSpell aadpHearAbility == 0
target.addspell aadpHearAbility
messageBox"He got it."
endif

end



I got the message "He Got It!" repeated over and over and over again
if I faced a horse.


But it worked just fine on other NPC.


080008


Posted by: Corento Aug 7 2008, 04:35 AM

Hello!

I'm having a big problem on the landmass. I dont know what makes this but after combining mods suddenly there are missing landmasses across the place where I've been working with a new mod. The land simply falls down and leaves a big rectangular empty place, only trees and rocks and other stuff on it. And every time I fix the landmass with height editor and render window and save my mod, it happens again..! Thelandmasses have vanished again but in different place...

Very odd, the house mod works fine but not the land.

What's going on? Pls, anyone?

Sami

Posted by: PirateLord Aug 7 2008, 05:16 AM

Please excuse my ignorance, but having been on these forums for many years, I've never encountered the term "Gotchas".

Could someone explain?

Posted by: dev_akm Aug 7 2008, 08:39 AM

QUOTE(spookyfx.com @ Aug 7 2008, 01:40 AM) [snapback]12637473[/snapback]
I have been trying to give a horse an ability spell with addspell command and discovered Horses cannot hold onto Ability spells!
bummer...
But it makes sense I guess you cannot have a player getting fused to a horse (get on to ride) while the horse has some ability spell
attached to it, that I can see would cause problems!
I tested this by:
I got the message "He Got It!" repeated over and over and over again
if I faced a horse.
But it worked just fine on other NPC.


Did you try it on other creatures besides horses?

Might be better to test it without relying on HasSpell, just to be sure it's not a limitation of OBSE spell detection.

QUOTE(Corento @ Aug 7 2008, 07:35 AM) [snapback]12638303[/snapback]
Hello!
I'm having a big problem on the landmass. I dont know what makes this but after combining mods suddenly there are missing landmasses across the place where I've been working with a new mod. The land simply falls down and leaves a big rectangular empty place, only trees and rocks and other stuff on it. And every time I fix the landmass with height editor and render window and save my mod, it happens again..! Thelandmasses have vanished again but in different place...
Very odd, the house mod works fine but not the land.
What's going on? Pls, anyone?


Lots of different things can cause this. How did you merge them? Did you make it into an ESM file? Is it a new worldspace? Are you aware of the modindex problems with new worldspaces?

QUOTE(PirateLord @ Aug 7 2008, 08:16 AM) [snapback]12638392[/snapback]
Please excuse my ignorance, but having been on these forums for many years, I've never encountered the term "Gotchas".
Could someone explain?


<img src="http://www.bethsoft.com/bgsforums/style_emoticons/default/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" />

http://www.thefreedictionary.com/dict.asp?Word=gotcha


Posted by: PirateLord Aug 7 2008, 11:13 AM

okay, excusing my increasing ignorance, but I know the meaning of Gotcha, but how does that term apply to fixing bugs and troubleshooting?

Gotcha is about catching, if you've caught a bug, then you squash it, and then it's dead.

Posted by: dev_akm Aug 7 2008, 11:57 AM

QUOTE(PirateLord @ Aug 7 2008, 02:13 PM) [snapback]12640355[/snapback]
okay, excusing my increasing ignorance, but I know the meaning of Gotcha, but how does that term apply to fixing bugs and troubleshooting?
Gotcha is about catching, if you've caught a bug, then you squash it, and then it's dead.


You're looking at it backwards. The Oblivion game engine or TESCS is the one who "got you".

Also, we don't have the game code so we can't squash anything. All we can do is to document the behavior and provide suggested workarounds if possible.

The Wikipedia definition is better:
QUOTE
* Gotcha (programming), an unexpected or unintuitive, but documented, behavior in a computer system (as opposed to a bug)

http://en.wikipedia.org/wiki/Gotcha

So, it's an accurate term for a lot of what we describe, though we also lump bugs into the same list. <img src="http://www.bethsoft.com/bgsforums/style_emoticons/default/shrug.gif" style="vertical-align:middle" emoid=":shrug:" border="0" alt="shrug.gif" />


Posted by: Corento Aug 7 2008, 01:41 PM

I found a solution to my landscape problem. <img src="http://www.bethsoft.com/bgsforums/style_emoticons/default/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" /> I found the right instructions and the answer from TESC Wiki.

Cheers!

Posted by: spookyfx.com Aug 7 2008, 04:18 PM

wow you were right!

I tried it on a bear and got the same problem!

Then I used IsSpellTarget instead and it worked just fine on NPC and Creatures (including horses).

What the heck?

So HasSpell will not work on Creatures?


<img src="http://www.bethsoft.com/bgsforums/style_emoticons/default/confused.gif" style="vertical-align:middle" emoid=":confused:" border="0" alt="confused.gif" />


QUOTE(dev_akm @ Aug 7 2008, 11:39 AM) [snapback]12639365[/snapback]
Did you try it on other creatures besides horses?


Posted by: Kivan Aug 23 2008, 08:10 AM

This is more of a tip than a "Gotcha" but it's a way that bloat can sneak in to your mod, so it's worthwhile posting here in my humble opinion. <img src="http://www.bethsoft.com/bgsforums/style_emoticons/default/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" /> I've tried this out several times to verify the effect.

When TESCS saves, it compresses some data with ZLIB (I think LAND and PGRD resources are two of them like this.) If TESCS is using a lot of memory, it seems to drop the level of compression to reduce the size of the dictionary, so if you have a large mod, navigate through a bunch of cells or open the Heightmap editor or anything else that puts a lot of resources into memory, make only a tiny change or two and then save, your mod may become larger than expected.

So after saving your (large) mod with LAND and PGRD (and other ZLIB-compressed resources if there are any) terminate TESCS, launch, load your mod again and resave immediately. For me, with the the 9.2MB UOP ESP, this consistently knocks 20-30KB of bloat off of the size of it.

Posted by: Arthmoor Aug 23 2008, 12:54 PM

QUOTE(Kivan @ Jul 3 2008, 12:50 PM) [snapback]12456484[/snapback]
1) Unless your mod requires SI, don't edit existing dialog under the SI ESM (ie greetings.) The change to the top level of the tree will get tied to SI dialog that isn't there if the player doesn't have SI. For most people this is harmless but some people report crashing to desktop if they are playing under the old ESM. This is very easy to clean out of a mod even without TES4Edit or equivalent; just load the ESP under the old ESM, you'll get errors about the missing dialog, Yes them away and then save the ESP and the bad links will be gone.


Definitely helpful, but only if you remember to grab your oblivion.esm before installing SI and set it aside somewhere. I didn't and therefore have no real choice on which one I can use and I'm not reinstalling the entire game over something like this. So TES4Edit will have to suffice <img src="http://www.bethsoft.com/bgsforums/style_emoticons/default/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" />


Posted by: dev_akm Aug 25 2008, 01:09 PM

QUOTE(spookyfx.com @ Aug 7 2008, 07:18 PM) [snapback]12642325[/snapback]
wow you were right!

I tried it on a bear and got the same problem!

Then I used IsSpellTarget instead and it worked just fine on NPC and Creatures (including horses).

What the heck?

So HasSpell will not work on Creatures?
<img src="http://www.bethsoft.com/bgsforums/style_emoticons/default/confused.gif" style="vertical-align:middle" emoid=":confused:" border="0" alt="confused.gif" />


Bummer. Maybe the OBSE team can fix this in the next release.


Posted by: dev_akm Sep 4 2008, 01:33 PM

We should probably add details on the http://www.bethsoft.com/bgsforums/index.php?s=&showtopic=872295&view=findpost&p=12785215, but I'd like to make sure to get the exact definition correct.

From what I can tell, you can't have any VWD REFRs in a master, even if it's a new worldspace and even if you've done the Move Worldspaces fix.

The easy way out is to split the plugin using TES4Gecko. This means that if you want to put a new worldspace into a master, you can't just convert your plugin to ESM. You have to:

1. Start with new worldspace created in a plugin (ESP).
2. Fix landscape with TES4Gecko->Move Worldspaces.
3. Fix VWD REFRs with TES4Gecko->Split Plugin (puts the worldspace in the ESM but leaves VWD REFRs in the ESP).

Is that it?

BTW, are trees always VWD? EDIT: the answer is yes.

Posted by: dev_akm Oct 30 2008, 09:34 AM

QUOTE (haama @ May 29 2007, 03:10 PM) <a href="index.php?act=findpost&pid=10126100"><img src='http://www.bethsoft.com/bgsforums/style_images/1/post_snapback.gif' alt='*' border='0' /></a>
You remembered the thread! So, what exactly is going on with the wiki page?

A topic, since someone else http://www.bethsoft.com/bgsforums/index.php?s=&showtopic=697443&view=findpost&p=10111392 http://www.bethsoft.com/bgsforums/index.php?s=&showtopic=697443&view=findpost&p=10112643 http://www.bethsoft.com/bgsforums/index.php?s=&showtopic=697443&view=findpost&p=10123648 http://www.bethsoft.com/bgsforums/index.php?s=&showtopic=697443&view=findpost&p=10124300 http://www.bethsoft.com/bgsforums/index.php?s=&showtopic=697443&view=findpost&p=10124311 http://www.bethsoft.com/bgsforums/index.php?s=&showtopic=697443&view=findpost&p=10125486 http://www.bethsoft.com/bgsforums/index.php?s=&showtopic=697443&view=findpost&p=10125542 - scripted items do some really weird %*!# when there are two items with the same script added about the same time. It seems incredibly spotty, though, so if any ideas on what causes the problems would be a great boon. From my experience, I can tell that the problem is with two items that have the same script (at least, two CloneFormed items, that have different FormIDs), not just two of the same item that, of course, have the same script.

My esperiences:
I have 'buttons' in my containers. These are misc. items that run onAdd/MenuMode blocks. They all seem to initialize when added by another script to my container. They are all set to do some processing once the player selects them (adds them to the player's inventory) and then remove themselves. However, if the player presses "Take All" some of the buttons won't do anything, and won't even remove themselves (even the ones that don't do any processing, that only remove themselves). The buttons that do this seem to be random. Also, if you double-click on the buttons, so that you take two of them very fast, then one of them will process, while the other won't (won't remove itself).

My other experience was even stranger - I had an item that would initialize itself, clone itself, add the clone to the container (which would in turn initialize itself, etc. until the end of the list), and then move itself to another container. At first, I had the item set to add the new CloneFormed self immediately after initialization (immediately being the next line of code). This resulted in one of them initializing, but not finishing the script by moving to the final container, while the other would move to the other container, but wouldn't be initialized - almost as if one started running the script from where the first left off. I fixed this by waiting until moving to the final container before adding the new CloneFormed item. (I now use a totally different system, so this is no longer an issue)

What really gets me, though, is that my latest form of buttons don't have any of these problems. I'm really stumped on what's different, other than a less active script when set to remove (though by no means less active when processing). So there must be some way around the problem. Anyone else have some good examples of this problem?


Haama,

The wiki description of this bug, documented as http://cs.elderscrolls.com/constwiki/index.php/Common_Bugs#Adding_Multiple_Items_with_the_Same_Script is overly vague. Can we improve this description with any more details?

Sounds to me like we're talking about the duplicate script continuing from the same point but missing any previous data? So, if you had an earlier GetContainer or similar then you'd have a great recipe for CTDs, right?

I'll try to gather up some details about the Dueling Inventory Changes theory and post here to follow up.


Posted by: dev_akm Oct 30 2008, 11:22 AM

Ok, here's a recap of recent conversations with Reneer and Shadowborn about possible issues with what I've dubbed "Dueling Inventory Changes".

What I have come to suspect after many problem reports and much testing is that it seems very likely there is a generic problem with having too many scripts trying to alter NPC and/or player inventory at the same time. Specifically, I think there's a strong possibility that you run the risk of getting a CTD when more than one script tries to add and remove items from inventory in a single frame.

We already know this is true if you add an item and then try to remove it too quickly. Anyone doing a lot of inventory manipulation has probably encountered that problem at least a few times.

The specific cases for me involved FCOM/MMM/RenGuardOverhaul after we switched MMM to using token-based NPC scripts for wounding, fleeing, feigning, etc.

The problem is almost certainly not specific to RGO/FCOM, but it definitely happens most often when users run several different token-based mods at the same time.

In trying to help people track down where many unexplained CTDs were coming from, we repeatedly discovered that removing some or all token-based script mods stopped the CTDs every single time. This could mean disabling RGO, Deadly Reflexes 4, MMM - Extra Wounding, or even just disabling Streampurge. Any one of these things was as likely to help as the others. Often the user was able to make a clean save, re-enable the "problem" mod, and then have no problems for a long time.

Now, many players have never encountered this problem, even with FCOM, RGO, and other heavy scripting mods together. I believe many more players have never seen the problem when using MMM by itself or using OOO by itself either. But FCOM places a lot of extra load on the average computer setup and we've definitely noticed it being more susceptible to issues like this for whatever reason.

Reneer suggested that we might be able to create a test case for the problem. Something along the lines of:

1. Create a test object that is scripted with an OnAdd block that adds another instance of the item to the player's inventory.

2. Have a Pluggy script running that checks the number of test objects in the players inventory and immediately writes that number to a file (perhaps once a second or longer between writes.)

3. Multiple instances of this test could be run on several computers, and if the numbers match up, it can be assumed that the issue is multiple AddItem / RemoveItems being called in the same frame. Of course the obvious caveat to all this is that another reason for the CTD might be that the game simply runs out of memory / reference ids and chokes.

He also suggested another test could be that several ESP files are created that link to a master file. Once a variable in the master file is set to 1, each mod will add items to the players inventory. In this way we could determine roughly the number of mods adding items in the same frame that causes CTD issues.

If we can prove that this does in fact crash the game for some users, then he suggested that we devise a system that separates item addition / removal from the player and NPC inventories. Likely this would require the creation of an ESM file that each of the mods links to as a master. If an item addition or removal needs to be made, a variable in the ESM can be changed so that no other mods will try to add or remove items during that particular frame. The problem with this is that it could potentially slow down mods and would require that a large number of mods be changed to allow for the new feature, as each AddItem / RemoveItem would need to be conditionalized to check to see if the variable is set to 0 or 1.

On the other hand, both Haama and Shadowborn are skeptical that the problem is as simple as I've described. Maybe it's just a general overload issue, which would suck since there's probably no way to get around that, or maybe it's a duplicate item scripts problem where RemoveMe gets called too quickly because a duplicate script got its delay timer hosed.

Here are the related wiki entries:

http://cs.elderscrolls.com/constwiki/index.php/Crashes#Dueling_Inventory_Changes

http://cs.elderscrolls.com/constwiki/index.php/Common_Bugs#Adding_Multiple_Items_with_the_Same_Script

Shadowborn has created some test cases, but has not been able to replicate the crashes yet. However, she may not be the best test case since she's able to use RGO and FCOM with no problems. I'm going to try running the same tests and I'll report my findings here.

Here's what Shadowborn reported about her test results:

QUOTE
OK, so I've done a few more tests, and no matter how many different plugins I have running, each adding multiple tokens to the player and then removing them 10 frames later, I can't get it to CTD. I've even left the scripts running while I visit several populated areas (various towns, fatback cave, sinkhole cave, vilverin, and the like), with RGO and Extra Wounding also running. My scripts are adding 200+ tokens in one frame, then removing them 10 ticks later. Still no CTD. <img src="http://static.bethsoft.com/bgs/style_emoticons/default/shrug.gif" style="vertical-align:middle" emoid=":shrug:" border="0" alt="shrug.gif" />


I wonder if perhaps the tests should focus more on inventory changes to nearby NPCs than to the player. Seems like we might have a better chance of replicating the problem that way, but I'm far from certain about any of this.

If anyone has thoughts, suggestions, a more detailed testing scenario, or hard data (like existing test cases!), please let us know. We'd very much like to arrive at a definitive answer if at all possible.

Thanks!


Posted by: Anthrop Oct 30 2008, 11:59 PM

horse.GetLOS player seems to CTD the game. I just spent about two hours figuring out why my script was crashing the game and finally found that the problem was related to GetLOS running on horses. I don't know if this is something I should have already known or not, but maybe this information can save someone else some grief. I tested mostly at the Cheydinhal Stables, but crashed at the other stables I visited as well.

Posted by: QQuix Oct 31 2008, 08:23 AM

I was curious about this as I have done tests with GetLOS recently.
I did a few tests and didn’t have CTDs, even when mounted. There must be some additional detail in your case that may be causing GetLOS to CTD. Would you give us some more details on what you are doing?

And, quite by accident, I found a most unexpected behavior from GetLOS while doing this test and I think it belongs here in the Gotchas thread:

When called on the player (Player.GetLOS xTarget) GetLOS returns different values depending on whether the player is in first or third person view.

It seems it returns true if the target is rendered in the screen, visible by the human player.

Scenario:
PC is facing north and there is an NPC behind her/him to the south. In first person view, GetLOS returns false.
Turn to third person view and start moving the camera further back.
As soon as the NPC shows up on the screen, GetLOS starts returning true.
Move the camera closer to the PC and GetLOS starts returning false just after the NPC disappears from the screen.
All of this without ever changing the PC or NOC position or heading, of course.

Posted by: dev_akm Oct 31 2008, 10:49 AM

QUOTE (QQuix @ Oct 31 2008, 11:23 AM) <a href="index.php?act=findpost&pid=13090901"><img src='http://www.bethsoft.com/bgsforums/style_images/1/post_snapback.gif' alt='*' border='0' /></a>
I was curious about this as I have done tests with GetLOS recently.
I did a few tests and didn’t have CTDs, even when mounted. There must be some additional detail in your case that may be causing GetLOS to CTD. Would you give us some more details on what you are doing?

And, quite by accident, I found a most unexpected behavior from GetLOS while doing this test and I think it belongs here in the Gotchas thread:

When called on the player (Player.GetLOS xTarget) GetLOS returns different values depending on whether the player is in first or third person view.

It seems it returns true if the target is rendered in the screen, visible by the human player.

Scenario:
PC is facing north and there is an NPC behind her/him to the south. In first person view, GetLOS returns false.
Turn to third person view and start moving the camera further back.
As soon as the NPC shows up on the screen, GetLOS starts returning true.
Move the camera closer to the PC and GetLOS starts returning false just after the NPC disappears from the screen.
All of this without ever changing the PC or NOC position or heading, of course.


Oy, good find!

So this means you're a lot better off doing:

xTarget.GetLOS Player

Right? Or does that way suffer from the same problem?


Posted by: Anthrop Oct 31 2008, 11:35 AM

QUOTE (QQuix @ Oct 31 2008, 11:23 AM) <a href="index.php?act=findpost&pid=13090901"><img src='http://www.bethsoft.com/bgsforums/style_images/1/post_snapback.gif' alt='*' border='0' /></a>
I was curious about this as I have done tests with GetLOS recently.
I did a few tests and didn’t have CTDs, even when mounted. There must be some additional detail in your case that may be causing GetLOS to CTD. Would you give us some more details on what you are doing?



You're talking about running myhorse.GetLOS player while mounted right? You're right there are some more details.

set target to Apple
set target to (GetFirstRef 36 1) ;creatures
Label 1
if target ;if target is 0 that means there are no targets left.
set type to target.IsCreature
if ( (type == 1) && (target.GetDead == 0) )
set level to target.GetLevel
set d to target.GetDistance Player
set ch to target.GetAV Health
set mh to target.GetBaseAV Health
if mh == 0
set percent to 0
else
set percent to (ch / mh)
endif
If ( (level <= capLevel) && (level > tempHighestLevel) && (d < 300) && ( percent >= .75) && (target.getLOS player) && ( target.GetCreatureType != 4 ) ) ;<------------------Crashes game when in proximity
set tempHighestLevel to level  ; of horse until I took out the getLOS
set topdog to target
set numTokens to GetItemCount miAnimalCompanion
elseif ( (level >= tempHighestLevel ) && (numTokens > 0 ) )
set topdog to target
endif
endif
set target to Apple
set target to GetNextRef
Goto 1
endif

Edit: This script is attached to a spell that runs on the player every couple of seconds.


Posted by: haama Oct 31 2008, 12:05 PM

QUOTE (dev_akm @ Oct 30 2008, 01:34 PM) <a href="index.php?act=findpost&pid=13080618"><img src='http://www.bethsoft.com/bgsforums/style_images/1/post_snapback.gif' alt='*' border='0' /></a>
Haama,

The wiki description of this bug, documented as http://cs.elderscrolls.com/constwiki/index.php/Common_Bugs#Adding_Multiple_Items_with_the_Same_Script is overly vague. Can we improve this description with any more details?

Sounds to me like we're talking about the duplicate script continuing from the same point but missing any previous data? So, if you had an earlier GetContainer or similar then you'd have a great recipe for CTDs, right?

[semi-rant]
I can place the examples, that are linked in the article, up on the wiki. However, as of now, the problem is still too vague to really comment further. The end of the first paragraph (that I should make a test file for) really demonstrates the issue. Setup - I had fake "Button" items that I would use in container menus. Select them to move them to the player's inventory, an onAdd block would run the "Button" bit of code and then, after 5 frames, remove itself. I always had 2 of each button in there (to get around another oddity). Bug - If you double-click the item, so that you take two of them very quickly (in the same frame?) one of them will process and remove itself correctly. The other seemed to process, but it's variables remained at 0 so it never removed itself.

Now that I think about it, it might be another issue - part of the script was to add back the button to the container. Maybe the error came from adding the item to one container, then immediately removing it to the player?

I ran into an issue with that problem just yesterday. I was getting constant CTDs when I added an ingredient with a scripted effect (scripted effect had a script, but the ingredient itself did not) to one container and then moved it to the player in the same frame. I was able to remedy the problem by waiting 5 frames, though in one test it seemed like it only needed 1 frame (did 5 to play it safe). I'm not sure what to make of this, though, as I also got CTDs if I directly added the item to the player. I tested both the Poisoned Apple (Dark10Apple) and Rat Poison (DASheograthPoison?) and got CTDs, but I didn't when using non-script effect ingredients like Corn, Wheat Grain, just about everything I could buy from the pub owner. One other note, it wasn't just added and removed in the same frame - one script activated another, the second script added the item to the container, then ended returning to the first script, and the first script RemoveAllItems over to the player.

I played with several variations to narrow it down - Adding the item to the container alone didn't cause a crash. Adding the item and then removing it on the next line didn't cause a CTD. Adding the item and later using RemoveAllItems (but not to the player) didn't cause a CTD. Adding the '1' flag to RemoveAllItems and changing the container to be owned by the player seemed to change the crash (it took a few seconds instead of the blink it did before), but it still crashed.

I wonder if it might be oddities with the Extra Data. Maybe we can get the OBSE team to write a function to spit out Extra Data for us?
[/semi-rant]

Ignoring the above results, thinking just about dev-akm's post, and focusing as much as possible on one aspect...
Maybe the scripts themselves will shed some light - what's on these token scripts, they're handler script, and (at least for RGO), what does the pluggy print-out look like right before the crashes?

Otherwise, the number of possibilities is going to drive us insane. For instance, in Shadowborn's tests - are those 200 tokens of the same item or different items, are they scripted or not scripted, what's on the script... So let's talk about how token systems are set up.

Most token systems use an AoE spell that adds the tokens to NPCs. Is there an error when two AoE spells occur in the same frame? Is the spell working exactly as expected - only adds one token, tests for player correctly? What happens when the spell is cast at a cell border, especially if one of those cells hasn't been loaded yet?

Overload - the real question is what type of overload? Is it just adding/removing items, to one NPC or multiple NPCs?


...
I think we need some more general information about how Oblivion does what it does. From QQuix's PlaceAtMe Bloat tests and from talking with behippo, it seems that each NPC has a linked list with 3 parts - the item's base record, the count, and extra data (owner, script variables, etc.). Also, I remember hearing somewhere that each item creates a temporary reference of itself, outside of an inventory, to run its script. I think, if we start there, we can answer the question a bit better.


Posted by: dev_akm Oct 31 2008, 01:13 PM

QUOTE (haama @ Oct 31 2008, 03:05 PM) <a href="index.php?act=findpost&pid=13093228"><img src='http://www.bethsoft.com/bgsforums/style_images/1/post_snapback.gif' alt='*' border='0' /></a>
I wonder if it might be oddities with the Extra Data. Maybe we can get the OBSE team to write a function to spit out Extra Data for us?


That's a very real possibility. We definitely know the Extra Data can cause very strange issues in inventory, especially for some item types (esp. alchemy gear). I think a function like that would be extremely useful.

QUOTE (haama @ Oct 31 2008, 03:05 PM) <a href="index.php?act=findpost&pid=13093228"><img src='http://www.bethsoft.com/bgsforums/style_images/1/post_snapback.gif' alt='*' border='0' /></a>
...
Ignoring the above results, thinking just about dev-akm's post, and focusing as much as possible on one aspect...
Maybe the scripts themselves will shed some light - what's on these token scripts, they're handler script, and (at least for RGO), what does the pluggy print-out look like right before the crashes?

Otherwise, the number of possibilities is going to drive us insane. For instance, in Shadowborn's tests - are those 200 tokens of the same item or different items, are they scripted or not scripted, what's on the script... So let's talk about how token systems are set up.

Most token systems use an AoE spell that adds the tokens to NPCs. Is there an error when two AoE spells occur in the same frame? Is the spell working exactly as expected - only adds one token, tests for player correctly? What happens when the spell is cast at a cell border, especially if one of those cells hasn't been loaded yet?

Overload - the real question is what type of overload? Is it just adding/removing items, to one NPC or multiple NPCs?
...
I think we need some more general information about how Oblivion does what it does. From QQuix's PlaceAtMe Bloat tests and from talking with behippo, it seems that each NPC has a linked list with 3 parts - the item's base record, the count, and extra data (owner, script variables, etc.). Also, I remember hearing somewhere that each item creates a temporary reference of itself, outside of an inventory, to run its script. I think, if we start there, we can answer the question a bit better.


Very good questions and suggestions. We need to find a way to reliably recreate the crash, but this is hard to do if none of our guesses about the cause are on target. Neither Reneer nor Shadowborn are seeing the crash happen themselves, and that makes it very hard to track down (though they've both heard plenty of reports about it).

I agree we need further analysis of the test cases to see if we're pushing the limits in the right direction (i.e., really trying to make it crash).

Hopefully Shadowborn and Reneer can chime in with a few more details.

Thanks, man!


Posted by: Corepc Oct 31 2008, 01:34 PM

QUOTE (dev_akm @ Oct 30 2008, 02:22 PM) <a href="index.php?act=findpost&pid=13081719"><img src='http://www.bethsoft.com/bgsforums/style_images/1/post_snapback.gif' alt='*' border='0' /></a>
The specific cases for me involved FCOM/MMM/RenGuardOverhaul after we switched MMM to using token-based NPC scripts for wounding, fleeing, feigning, etc.

The problem is almost certainly not specific to RGO/FCOM, but it definitely happens most often when users run several different token-based mods at the same time.


For testing could someone

activate the MMM increased spawn rates plugin that would increase the amount of token's that are get handed out to MMM npcs..Or use alot of mods that alot of npcs to world, aka travellers + crowded roads + tie..extra wounding token would get added to those randmon npc.


QUOTE (haama @ Oct 31 2008, 03:05 PM) <a href="index.php?act=findpost&pid=13093228"><img src='http://www.bethsoft.com/bgsforums/style_images/1/post_snapback.gif' alt='*' border='0' /></a>
Otherwise, the number of possibilities is going to drive us insane. For instance, in Shadowborn's tests - are those 200 tokens of the same item or different items, are they scripted or not scripted, what's on the script... So let's talk about how token systems are set up.

Overload - the real question is what type of overload? Is it just adding/removing items, to one NPC or multiple NPCs?


Shadowborn can answer better about the MMM token system that hand out token that handle wounding/fatique damage for the MMM side..Reneer knows best about RGO of course.

But, I will answer what I can..

200 tokens of the same item is totally possible with MMM..if you ran into nothing but certain type of npc..

But is is most likely either npc, boss, creature, token objects. Since there is different token object that are assigned to npcs based on what type of class they are in, lvl, etc in MMM.

Extrawounding is also a possiblity that it could be handing out 200 of same token object to different non mmm npcs or non mmm creatures..


QUOTE (dev_akm @ Oct 31 2008, 04:13 PM) <a href="index.php?act=findpost&pid=13093952"><img src='http://www.bethsoft.com/bgsforums/style_images/1/post_snapback.gif' alt='*' border='0' /></a>
I agree we need further analysis of the test cases to see if we're pushing the limits in the right direction (i.e., really trying to make it crash).


Me too, I am not the scripter but I will help with what I can and answer with what I know.


Posted by: dev_akm Oct 31 2008, 02:17 PM

QUOTE (Corepc @ Oct 31 2008, 04:34 PM) <a href="index.php?act=findpost&pid=13094182"><img src='http://www.bethsoft.com/bgsforums/style_images/1/post_snapback.gif' alt='*' border='0' /></a>
For testing could someone

activate the MMM increased spawn rates plugin that would increase the amount of token's that are get handed out to MMM npcs..Or use alot of mods that alot of npcs to world, aka travellers + crowded roads + tie..extra wounding token would get added to those randmon npc.

Shadowborn can answer better about the MMM token system that hand out token that handle wounding/fatique damage for the MMM side..Reneer knows best about RGO of course.

But, I will answer what I can..

200 tokens of the same item is totally possible with MMM..if you ran into nothing but certain type of npc..

But is is most likely either npc, boss, creature, token objects. Since there is different token object that are assigned to npcs based on what type of class they are in, lvl, etc in MMM.

Extrawounding is also a possiblity that it could be handing out 200 of same token object to different non mmm npcs or non mmm creatures..

Me too, I am not the scripter but I will help with what I can and answer with what I know.


Thanks, man.

Your suggestion about running the test with increased spawn rates, additional enemy variants, crowded roads, etc. is a good idea. Anything we can do to push the limits as far as possible will help.

The 200 number was from a separate test setup Shadowborn created just to see if she could force a crash with a lot of overlapping additem/removeitem activity. It's not at all representative of "normal" MMM token usage, just a simulation to push the limits until things start breaking. It didn't crash, so we need to dig further into it and make sure we're accurately simulating a realistic test, or we need to try it on a weaker system than she has to see if that makes a difference, etc.


Posted by: qzilla Oct 31 2008, 06:51 PM

This is my understanding of the token/CTD problem:

When a stack of items is involved, calling removeme in a script on one of those items simply removes the top stacked item. RemoveItem will remove the top X items of the type passed to the command. The only times when I have run into CTDs with these two functions are under the following circumstances:

1) have 1 container, and one token base object with a script attached to it, and in which the onadd block calls removeme at the end.

2) set up two scripts to add the same token to the 1 container in the same frame. to be clear, i mean script A does container.additem scripteditem 1, and Script B does the exact same thing.

3) observe CTD

Taking note of how exactly removeme works, we can see exactly what is going on:

1) two tokens are added to the container in the same frame with on add blocks. They go on the item stack as A-B

2) oblivion schedules both of those snippets of code to run (the same snippet, it just runs twice.

3) scripts run asynchronously, so if B is on the bottom, and B's code executes first, the when RemoveMe is called, it removes the top item in the stack and here's the problem: Script B is removing the item attached to script A, while Script A still has a queued OnAdd block to run.

I don't know if the CTD occurs then, or if it occurs when script A tries to run on a nonexistent item.

Now I know object stacks don't quite work like how I've described -- there's one item and the extra data is attached -- except the extra data is 'attached' to individual virtual items. In the above example, the same script is being run twice by the two tokens (which are on real item/two virtual items), but each script will keep track of it's own variables. So Script B removes the extra data for Virtual Item A which has the queued script, etc.


I have to say again, I've never run into removeme/removeitem CTDs under any other circumstances. The code for my Q-Core mod (where I encountered this problem) tosses tokens back and forth over like 40 containers, and I never ran into CTDs except in the exact above situation.

Posted by: QQuix Oct 31 2008, 08:04 PM

QUOTE (dev_akm @ Oct 31 2008, 04:49 PM) <a href="index.php?act=findpost&pid=13092399"><img src='http://www.bethsoft.com/bgsforums/style_images/1/post_snapback.gif' alt='*' border='0' /></a>
So this means you're a lot better off doing:
xTarget.GetLOS Player
Right? Or does that way suffer from the same problem?

xTarget.GetLOS Player does not have this problem. It returns the same result in both first and third person mode.

But notice that “xTarget.GetLOS Player” is not the same “Player.GetLOS xTarget” as the result depends on which way they are facing.

I came across a new problem: under some conditions (*) GetLOS randomly returns 0 for 1-4 frames, even when the player is face to face with the target. It is as if the target was blinking (now you see me, now you don’t). When it should return 1s all the time, it returns something like this: 1110011111011111000011101000111111111011100111 . . .

The test site has a horse and an NPC facing each other, 500 units apart.
The test script has four GetLOSs and prints the results every frame:
Player.GetLOS Horse - - Horse.GetLOS Player - - NPC.GetLOS Horse - - NPC.GetLOS Player
In a configuration where all four should return 1, the Player.GetLOS Horse returns 1 as expected, but the other three follow the pattern mentioned above. And ALL three fail at the same time. It is as if the engine got hiccups and decides to calculate LOS only for the Player during that frame.

(*) It seems the hiccups are related to the number of actors in the cell. All worked fine up to 8-9 actors in the cell. Above that the more actors in the cell the more frames GetLOS will fail.

After all, this is not that bad, as I don’t think there are many areas in the game (if any) with so many actors.


Anthrop, I still did not look at your script. I will do that tomorrow, as it is getting late around here (2AM)



Posted by: haama Oct 31 2008, 09:03 PM

QUOTE (qzilla @ Oct 31 2008, 10:51 PM) <a href="index.php?act=findpost&pid=13096560"><img src='http://www.bethsoft.com/bgsforums/style_images/1/post_snapback.gif' alt='*' border='0' /></a>
This is my understanding of the token/CTD problem:

When a stack of items is involved, calling removeme in a script on one of those items simply removes the top stacked item. RemoveItem will remove the top X items of the type passed to the command. The only times when I have run into CTDs with these two functions are under the following circumstances:

1) have 1 container, and one token base object with a script attached to it, and in which the onadd block calls removeme at the end.

2) set up two scripts to add the same token to the 1 container in the same frame. to be clear, i mean script A does container.additem scripteditem 1, and Script B does the exact same thing.

3) observe CTD

I tried to reproduce this but was unable to. http://www.tesnexus.com/downloads/file.php?id=18334 so you can see what might be different. Setup - a Start Game Enabled quest moves the container to the player, sets 2 quests' fQuestDelayTime to .01, starts them, and prepares 2 pluggy strings.
CODE
scn TestRemMeCTDAInitScript

long  numTokens
long  spTxtFile
long spTemp

begin GameMode
    TestRemMeCTDACont.MoveTo player

    set TestRemMeCTDAAdder01.fQuestDelayTime to .01
    StartQuest TestRemMeCTDAAdder01
    set TestRemMeCTDAAdder02.fQuestDelayTime to .01
    StartQuest TestRemMeCTDAAdder02

    set spTxtFile to (CreateString -1 "\Tests\RemMeCTDA\Test.txt")
    DelFile spTxtFile
    set spTemp to CreateString

    StopQuest TestRemMeCTDAInit
end

The quests both have the same script which add the tokens to the container. They also print out the GameHour - if it's the same GameHour then it's the same frame. (note we can also use OBSE v16's GetCurrentFrameID, but that would require v16 and I didn't want to dig through my PMs for the exact name).
CODE
scn TestRemMeCTDAAdderScript

long  Added
float fQuestDelayTime

begin GameMode
    if (Added == 0)
        set Added to 1
        FmtString TestRemMeCTDAInit.spTemp 0 "Token added, Gamehour %.5f" GameHour
        StringToTxtFile TestRemMeCTDAInit.spTxtFile TestRemMeCTDAInit.spTemp
        PrintC "Token added, Gamehour %.5f" GameHour
        TestRemMeCTDACont.AddItem TestRemMeCTDAToken 1
    endif
end

Finally, the token prints out the GameHour from an onAdd block and removes itself
CODE
scn TestRemMeCTDATokenScript

begin onAdd
    set TestRemMeCTDAInit.numTokens to (TestRemMeCTDAInit.numTokens + 1)
    FmtString TestRemMeCTDAInit.spTemp 0 "Token script: Token %g, Gamehour %.5f" TestRemMeCTDAInit.numTokens GameHour
    StringToTxtFile TestRemMeCTDAInit.spTxtFile TestRemMeCTDAInit.spTemp
    PrintC "Token script: Token %g, Gamehour %.5f" TestRemMeCTDAInit.numTokens GameHour
    RemoveMe
end


Interestingly, I don't think I could repeat the crash because the tokens aren't running in the same frame! The two quests run in the same frame, and the first token runs in the same frame as the quests, but the second one runs in a subsequent frame.
QUOTE
Token added, Gamehour 1.09729
Token added, Gamehour 1.09729
Token script: Token 1, Gamehour 1.09729
Token script: Token 2, Gamehour 1.09756


Will play around with RemoveMe and see if I can get them to run in the same frame.


Posted by: Anthrop Oct 31 2008, 09:14 PM

QUOTE (QQuix @ Oct 31 2008, 11:04 PM) <a href="index.php?act=findpost&pid=13097037"><img src='http://www.bethsoft.com/bgsforums/style_images/1/post_snapback.gif' alt='*' border='0' /></a>
Anthrop, I still did not look at your script. I will do that tomorrow, as it is getting late around here (2AM)


That's fine. I'm impressed with the checking you've already done. So it appears that GetLOS doesn't crash the game from the horse in every situation. My script used GetLOS player on every creature in the area, at nearly the same time so maybe the problem has to do with running it too frequently. On the other hand, it really does seem to have to do with horses as I wasn't crashing in areas with zillions of imps but with a few horses around my game would crash every time.


Posted by: qzilla Nov 1 2008, 03:31 AM

Hm, i don't remember exactly how i got things to run in the same frame but I guess the two quests thing doesn't work. It's been a while since I worked on that particular issue.

Posted by: QQuix Nov 1 2008, 10:27 AM

QUOTE (Anthrop @ Nov 1 2008, 03:14 AM) <a href="index.php?act=findpost&pid=13097388"><img src='http://www.bethsoft.com/bgsforums/style_images/1/post_snapback.gif' alt='*' border='0' /></a>
... On the other hand, it really does seem to have to do with horses as I wasn't crashing in areas with zillions of imps but with a few horses around my game would crash every time.

Found it.
Problem is that stables have horses for sale initially disabled, and they are returned by GetFirst/NextRef.

Calling GetLOS on a disabled actor crashes the game most of the time (for some mysterious reason, I don’t get CTDs at the Cheydinhal Stables). "Player.getLOS xDisabledActor" did not cause CTDs.

You will be fine if you change your second if to: if type == 1 && target.GetDead == 0 && target.GetDisabled == 0

I also noticed a “set NumTokens to GetItemCount xxx”. I know nothing about spells, but shouldn't it be Player.GetItemCount? Or do spells assume its target as the reference?


Posted by: Anthrop Nov 1 2008, 02:33 PM

QUOTE (QQuix @ Nov 1 2008, 02:27 PM) <a href="index.php?act=findpost&pid=13101772"><img src='http://www.bethsoft.com/bgsforums/style_images/1/post_snapback.gif' alt='*' border='0' /></a>
Found it.
Problem is that stables have horses for sale initially disabled, and they are returned by GetFirst/NextRef.

Calling GetLOS on a disabled actor crashes the game most of the time (for some mysterious reason, I don’t get CTDs at the Cheydinhal Stables). "Player.getLOS xDisabledActor" did not cause CTDs.

You will be fine if you change your second if to: if type == 1 && target.GetDead == 0 && target.GetDisabled == 0

I also noticed a “set NumTokens to GetItemCount xxx”. I know nothing about spells, but shouldn't it be Player.GetItemCount? Or do spells assume its target as the reference?


Great work! So I can use GetLOS, I just need to use it after a GetDisabled to make sure I'm not using it on a disabled reference.

Spells do assume their target as the reference.


Posted by: dev_akm Nov 3 2008, 10:14 AM

QUOTE (haama @ Nov 1 2008, 12:03 AM) <a href="index.php?act=findpost&pid=13097312"><img src='http://www.bethsoft.com/bgsforums/style_images/1/post_snapback.gif' alt='*' border='0' /></a>
I tried to reproduce this but was unable to. http://www.tesnexus.com/downloads/file.php?id=18334 so you can see what might be different. Setup - a Start Game Enabled quest moves the container to the player, sets 2 quests' fQuestDelayTime to .01, starts them, and prepares 2 pluggy strings.
CODE
scn TestRemMeCTDAInitScript

long  numTokens
long  spTxtFile
long spTemp

begin GameMode
    TestRemMeCTDACont.MoveTo player

    set TestRemMeCTDAAdder01.fQuestDelayTime to .01
    StartQuest TestRemMeCTDAAdder01
    set TestRemMeCTDAAdder02.fQuestDelayTime to .01
    StartQuest TestRemMeCTDAAdder02

    set spTxtFile to (CreateString -1 "\Tests\RemMeCTDA\Test.txt")
    DelFile spTxtFile
    set spTemp to CreateString

    StopQuest TestRemMeCTDAInit
end

The quests both have the same script which add the tokens to the container. They also print out the GameHour - if it's the same GameHour then it's the same frame. (note we can also use OBSE v16's GetCurrentFrameID, but that would require v16 and I didn't want to dig through my PMs for the exact name).
CODE
scn TestRemMeCTDAAdderScript

long  Added
float fQuestDelayTime

begin GameMode
    if (Added == 0)
        set Added to 1
        FmtString TestRemMeCTDAInit.spTemp 0 "Token added, Gamehour %.5f" GameHour
        StringToTxtFile TestRemMeCTDAInit.spTxtFile TestRemMeCTDAInit.spTemp
        PrintC "Token added, Gamehour %.5f" GameHour
        TestRemMeCTDACont.AddItem TestRemMeCTDAToken 1
    endif
end

Finally, the token prints out the GameHour from an onAdd block and removes itself
CODE
scn TestRemMeCTDATokenScript

begin onAdd
    set TestRemMeCTDAInit.numTokens to (TestRemMeCTDAInit.numTokens + 1)
    FmtString TestRemMeCTDAInit.spTemp 0 "Token script: Token %g, Gamehour %.5f" TestRemMeCTDAInit.numTokens GameHour
    StringToTxtFile TestRemMeCTDAInit.spTxtFile TestRemMeCTDAInit.spTemp
    PrintC "Token script: Token %g, Gamehour %.5f" TestRemMeCTDAInit.numTokens GameHour
    RemoveMe
end


Interestingly, I don't think I could repeat the crash because the tokens aren't running in the same frame! The two quests run in the same frame, and the first token runs in the same frame as the quests, but the second one runs in a subsequent frame.

Will play around with RemoveMe and see if I can get them to run in the same frame.


Good stuff, man. Very curious to hear what you discovered, if anything.

I did some testing with Shadowborn's test case (running multiple copies of a plugin that constantly adds/removes tokens from the player) and I couldn't replicate the crash that way. It's not going to be easy to track this down.

I'll see if I can devise a more complete test using NPCs.

Thanks, man.


Posted by: shadowborn Nov 4 2008, 03:05 AM

Dev pointed me in the direction of this discussion. Please excuse me while I catch up...

QUOTE (haama @ Oct 31 2008, 08:05 PM) <a href="index.php?act=findpost&pid=13093228"><img src='http://www.bethsoft.com/bgsforums/style_images/1/post_snapback.gif' alt='*' border='0' /></a>
I can place the examples, that are linked in the article, up on the wiki. However, as of now, the problem is still too vague to really comment further. The end of the first paragraph (that I should make a test file for) really demonstrates the issue. Setup - I had fake "Button" items that I would use in container menus. Select them to move them to the player's inventory, an onAdd block would run the "Button" bit of code and then, after 5 frames, remove itself. I always had 2 of each button in there (to get around another oddity). Bug - If you double-click the item, so that you take two of them very quickly (in the same frame?) one of them will process and remove itself correctly. The other seemed to process, but it's variables remained at 0 so it never removed itself.

This may not be related to the issue under discussion, but one thing I noticed when modifying various scripts in MMM is that, in the scripts that are attached directly to NPCs, if you run code in the 'OnLoad' section, for the first frame only, many variables, settings, and even the attributes of the NPC in question, are returned as zero. Most notable in my testing was that GetRandomPercent often returned zero in the first frame. Adding a one frame delay (or more correctly, a one script cycle delay) solved the problem. I wonder if this is at play in this situation?

QUOTE (haama @ Oct 31 2008, 08:05 PM) <a href="index.php?act=findpost&pid=13093228"><img src='http://www.bethsoft.com/bgsforums/style_images/1/post_snapback.gif' alt='*' border='0' /></a>
I wonder if it might be oddities with the Extra Data. Maybe we can get the OBSE team to write a function to spit out Extra Data for us?

Again, this might not be related but mentioning the Extra Data reminds me of another oddity. In the Hunting & Crafting plugin for MMM, you can manufacture a number of things, including making arrow flights from feathers (quills). You do this by clicking on the feather, which gives you a 'Do you want to make arrow flights?' confirmation box. Clicking 'Yes' removes one feather and adds five arrow flights. If you have both stolen and non-stolen feathers in your inventory, it will often remove more than one feather, and sometimes it will remove multiple feathers even if you just have a single stack. Now I don't know an awful lot about the way Oblivion handles stacks of items, but I'm wondering if this is indicative of it getting muddled with the Extra Data and the number of items in the stack?

QUOTE (haama @ Oct 31 2008, 08:05 PM) <a href="index.php?act=findpost&pid=13093228"><img src='http://www.bethsoft.com/bgsforums/style_images/1/post_snapback.gif' alt='*' border='0' /></a>
For instance, in Shadowborn's tests - are those 200 tokens of the same item or different items, are they scripted or not scripted, what's on the script... So let's talk about how token systems are set up.

In that particular test, there were initially two tokens, each with their own script. Each one had an 'OnAdd' block that added the other token, then removed itself (so token 1 added token 2, then removed token 1; and token 2 added token 1, and removed token 2). If I did the RemoveMe immediately after the AddItem, I got a CTD 100% of the time. After adding a delay of 10, and running the RemoveMe in the GameMode block, I couldn't get a CTD. I put a limit of 100 on the number of tokens added (so you got 50 of each being added), and set up a quest script that would add one copy of token 1 every time it ran (on the default delay). I then duplicated this plugin, renamed everything, and ran both at the same time. So plugin 1 was adding a total of 50 copies of token 1 and 50 copies of token 2, while plugin 2 was adding 50 copies of token 3 and 50 copies of token 4.

If you want to take a look, you can download the pair of plugins http://www.shadowborn-manor.org.uk/Files/CrashTestDummies.zip.

QUOTE (haama @ Oct 31 2008, 08:05 PM) <a href="index.php?act=findpost&pid=13093228"><img src='http://www.bethsoft.com/bgsforums/style_images/1/post_snapback.gif' alt='*' border='0' /></a>
Most token systems use an AoE spell that adds the tokens to NPCs. Is there an error when two AoE spells occur in the same frame? Is the spell working exactly as expected - only adds one token, tests for player correctly? What happens when the spell is cast at a cell border, especially if one of those cells hasn't been loaded yet?

Good question. I can't speak for RGO or any other plugin, but MMM (mainly the Extra Wounding plugin) runs one AoE spell with a radius of 4000 (if I remember correctly), which is cast by an activator on the player. The spell is 'on touch', rather than 'on target', to avoid having to mess with the script effect cast sound. It checks all NPCs and creatures it hits, adds one or more tokens depending on the kind of wounding process that actor should have, then adds a 'process' token that acts to indicate that that actor has been processed - the first thing the script effect does is check if the 'process' token is present, and terminates if it is.

In another test, I copied the Extra Wounding plugin and had both copies running at the same time, so you had two AoE spells being cast, but only one set of tokens. I went to a number of heavily-populated areas - both towns and lairs - and couldn't get it to CTD.

QUOTE (dev_akm @ Oct 31 2008, 09:13 PM) <a href="index.php?act=findpost&pid=13093952"><img src='http://www.bethsoft.com/bgsforums/style_images/1/post_snapback.gif' alt='*' border='0' /></a>
Very good questions and suggestions. We need to find a way to reliably recreate the crash, but this is hard to do if none of our guesses about the cause are on target. Neither Reneer nor Shadowborn are seeing the crash happen themselves, and that makes it very hard to track down (though they've both heard plenty of reports about it).

I think I'm fortunate in that I've got a fairly stable system. I'm even running RAEVWD and all of the UL mods, in addition to a full FCOM install, and while I do get a certain amount of slowdown outside, I don't tend to get more than the occasional random CTD - although it does often CTD on exit.

QUOTE (qzilla @ Nov 1 2008, 02:51 AM) <a href="index.php?act=findpost&pid=13096560"><img src='http://www.bethsoft.com/bgsforums/style_images/1/post_snapback.gif' alt='*' border='0' /></a>
3) scripts run asynchronously, so if B is on the bottom, and B's code executes first, the when RemoveMe is called, it removes the top item in the stack and here's the problem: Script B is removing the item attached to script A, while Script A still has a queued OnAdd block to run.

Now that's a good thought. But if we're thinking that the problem lies with multiple copies of the same token being added at the same time, I can't see how that can occur with MMM, and if it was something that happens in any other mod, I'd expect people to be reporting issues when running that mod on its own. But the problem only seems to occur when running multiple different mods, each of which use their own tokens. So rather than it being a case of two items running the same script and removing themselves at the same time, I think it's more likely to be when two items (from different mods) each run their own scripts and remove themselves at the same time.

I don't think we can narrow down the circumstances in which the CTD occurs any more at the moment; it's not like it mostly happens in particular situations, for example when the player kills an NPC (which could point to MMM), or when a guard decides to do something (which could point to RGO).

Completely left-field thought: Does anybody know if the CTDs tend to occur at any particular in-game time? If it turns out that the CTDs tend to occur at or around the hour mark, it may point to an issue with tokens affecting NPC decisions when they do their regular package evaluation.

Eloise


Posted by: dev_akm Nov 4 2008, 09:26 PM

QUOTE (shadowborn @ Nov 4 2008, 06:05 AM) <a href="index.php?act=findpost&pid=13133927"><img src='http://www.bethsoft.com/bgsforums/style_images/1/post_snapback.gif' alt='*' border='0' /></a>
Dev pointed me in the direction of this discussion. Please excuse me while I catch up...
....


Some very good thoughts there, Shadowborn. I don't have any answers for you, but all the suggestions so far have given me a few ideas. I'm digging through Extra Wounding and RGO for hints about how to devise another test. I'll post details if I get anywhere with it.


Posted by: Centurion Nov 14 2008, 09:41 AM

As requested by dev_akm I post here a possible solution for the "enemy-NPC-freezes" in the "Dwemer Skyship" plugin:

QUOTE
That didn´t solve the problem for me; the freezes of NPCs was still existend.

But I hope, I could solve the problem.
There is a script for the quest-starting-NPC which tells him to move to a so called "source-cell" when curtain circumstances are true. But there are also his AI-settings telling him to have a walk somewhere in IC.
And I guessed, that this contradiction may cause a permanent loop possible blocking other AI-settings.
So I deleted this part of the script.
It looks now as following:
QUOTE
Scriptname DSStartNPCScript

short done

Begin GameMode

if ( done == 0 )
if ( GetDistance Player < 768 )
set done to 1
SetForceRun 1
StartConversation Player
endif
endif

End


And after the first few tests, I didn´t encounter anymore "freezing"-problems. May be I´m wrong too, so I´ll have further tests to see if this problem is solved.


Posted by: dev_akm Nov 14 2008, 03:10 PM

QUOTE (Centurion @ Nov 14 2008, 12:41 PM) <a href="index.php?act=findpost&pid=13228527"><img src='http://www.bethsoft.com/bgsforums/style_images/1/post_snapback.gif' alt='*' border='0' /></a>
As requested by dev_akm I post here a possible solution for the "enemy-NPC-freezes" in the "Dwemer Skyship" plugin:



And after the first few tests, I didn´t encounter anymore "freezing"-problems. May be I´m wrong too, so I´ll have further tests to see if this problem is solved.


Awesome! Now we just need to figure out what that means exactly so we can warn people to avoid it in the future. <img src="http://static.bethsoft.com/bgs/style_emoticons/default/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" />

Thanks, man!


Posted by: Rowan Nov 16 2008, 07:57 PM

You should add this little problem to the troubleshooting section. The problem I'm talking about starts at the second post.

http://www.bethsoft.com/bgsforums/index.php?showtopic=911650&st=0&gopid=13245911&#entry13245911


Pretty common sense I guess, but just in case someone else has the issue.

Posted by: Rowan Nov 17 2008, 06:36 PM

dev_akm: The troubleshooting section is a GREAT idea. If every problem that was solved could be posted in that section and well ordered that would be amazing, and you would be my hero a thousand times over. The trick is finding all the solutions. The easiest way would be for people to post links to their discussion threads in this thread and provide a quick summary of the problem and solution.

the search function on these forums is pretty useless. I have more luck searching on google. That's another reason why this troubleshooting section that you're making is so valuable. If only we could get everyone involved, and so it doesn't come down to just you searching through the forums to find stuff and people randomly posting their help questions everywhere, so that the same questions get asked a dozen times and people waste their time trying to answer them.

that's what the wiki is for. but it could be better.

One suggestion: An alternative way to order the solutions would be to have on the first page, the links: Building and Editing, Textures, Models, Quests, Scripts like on the main page of the wiki, and basically match the paths.

for example, if I'm having an issue with LOD not showing up, on the main page of the Troubleshooting section I would click building and editing, then on the landscape LOD generation and then the read the section about moving the worldspace index or whatever using TES4Gecko, along with all the other problems that have to do with LOD. These solutions would also appear as a link on any tutorials or topics dealing with LOD or new worldspace building/landscape editing. some of the pages have this information, but some do not, so they should have a link to the troubleshooting section that contains the solutions associated with that particular topic. This would make it a lot easier to find these solutions, which you put the work into and are quite helpful if you can find them!

just my thoughts.

Posted by: dev_akm Nov 19 2008, 08:51 AM

Rowan, that's a good suggestion. I will give it some thought. Thanks!

I've added a new blurb on http://cs.elderscrolls.com/constwiki/index.php/Common_Bugs#Touchy_Cells_in_Tamriel.

Posted by: washington Nov 19 2008, 09:24 AM

QUOTE
Some worldspace cells in Tamriel are especially prone to problems. Almost any changes in these cells can cause strange problems in the game, so mod-makers should generally avoid making changes to these cells.


Hmm... Which cells?


Posted by: DragoonWraith Nov 19 2008, 09:36 AM

The sub-heading(s) under it would list various problems of that type. In this case, there's only one sub-heading, "Random Vanishing Landscape in Tamriel", which discusses 20,-17 and 20,-18.

Posted by: dev_akm Nov 21 2008, 10:04 AM

I'd like to get some help verifying what's possible and not possible using workarounds for TESCS crashing when you have other ESPs loaded besides the active one.

The question was posed recently in the OOO thread by onelifecrisis. It went something like this:

QUOTE
I'm trying to make a new plugin for XXXX. I select Oblivion.esm, XXXX.esm and YYYY.esp data files, then make a change and hit Save. TESCS asks for a filename for the new plugin. I name it TEST.esp and click OK. TESCS crashes and I end up with TEST.esp (0kb) and TEST.tes (which looks like a corrupted esp when I open it in a hex editor).


We know TESCS does not like it when you load with other ESPs than the active one. There are several ways around this detailed in the De-Isolation Tutorial, but it appears there may be another undocumented solution reported by display name is already in use:

QUOTE (display name is already in use @ Nov 20 2008, 08:10 AM) <a href="index.php?act=findpost&pid=13268944"><img src='http://www.bethsoft.com/bgsforums/style_images/1/post_snapback.gif' alt='*' border='0' /></a>
dev_akm has replied to this of course, but he didn't explain how to still use the CS and avoid the crash. Since there are some things which TES4Edit can't do, here's how you should be able to save in the CS without crashing.

Edit something in the Tamriel worldspace before saving. It doesn't matter what, you can move something, delete something, place something, raise or lower the land height in a cell, change the landscape texture in a cell.... absolutely anything. Now when you save, the CS will not crash. The cause of the bug is that for some reason the CS requires the Tamriel worldspace record to exist in your new ESP when other ESPs are loaded. If you haven't edited anything in the Tamriel worldspace, then the CS gets upset and flakes out.

Whatever change you make, you can remove it later using TES4Edit.


This sounded very interesting to me, so I asked for more details on how reliable it is:

QUOTE (display name is already in use @ Nov 21 2008, 08:07 AM) <a href="index.php?act=findpost&pid=13275521"><img src='http://www.bethsoft.com/bgsforums/style_images/1/post_snapback.gif' alt='*' border='0' /></a>
Well, I know that changing the land height guarantees reliability. I typically make a single raise or lower to the land in one cell, and later use TES4Edit to strip it out again. What's needed is the presence of the Tamriel worldspace record itself in your ESP, no subrecords are actually needed. But to gain that from the CS, you have to move an object which would appear as a subrecord for the worldspace. The game itself has no such requirement of course, it's only the CS which needs the worldspace record, and only when other ESPs are loaded too.

Personally I've never done anything OTHER than change the land height to avoid this bug, it was someone else who told me that they found it worked with any change to Tamriel after I explained to them how I avoided the crash. And they should have been correct, too, as even moving/deleting an object placed by one of the other ESPs should still cause it to be added to your active ESP (whether the other ESP was ESMified or not - it will either appear as an override or as a duplicate). However if you're finding that object movement isn't reliable, fall back to land height adjustment. it's never failed me yet, and I've been aware of this bug and how to avoid it since February or so <img src="http://static.bethsoft.com/bgs/style_emoticons/default/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" />


I think this sounds well worth some further investigation. Any takers?


Posted by: QQuix Nov 21 2008, 01:06 PM

QUOTE
I'm trying to make a new plugin for XXXX. I select Oblivion.esm, XXXX.esm and YYYY.esp data files, then make a change and hit Save. TESCS asks for a filename for the new plugin. I name it TEST.esp and click OK. TESCS crashes and I end up with TEST.esp (0kb) and TEST.tes (which looks like a corrupted esp when I open it in a hex editor).


Just did this without any problem.
Changed an object from YYYY.esp and saver as TestA.esp
Then loaded TestA.esp, renamed the same object creating a new one and saved as TESTB
Then loaded TestB.esp, renamed the same object again, created a new cell and saved as TESTC
Then loaded all 3 tests and duplicated the cell from TestC and saved as TestD.

Every time not setting any esp as active, of course.

I have had CS crashes when saving a mod for the first time. But this is rare. Don’t really remember what I did the second time around.
And every once in a while I do load a library esp of mine with some mod I am working on, so I can copy/paste from the library to the mod.
Never tried to mod any esm besides Oblivion.esm, thou.

OS = XP64 - CS = 1.2.404


Posted by: dev_akm Nov 21 2008, 03:08 PM

QUOTE (QQuix @ Nov 21 2008, 03:06 PM) <a href="index.php?act=findpost&pid=13277765"><img src='http://www.bethsoft.com/bgsforums/style_images/1/post_snapback.gif' alt='*' border='0' /></a>
Just did this without any problem.
Changed an object from YYYY.esp and saver as TestA.esp
Then loaded TestA.esp, renamed the same object creating a new one and saved as TESTB
Then loaded TestB.esp, renamed the same object again, created a new cell and saved as TESTC
Then loaded all 3 tests and duplicated the cell from TestC and saved as TestD.

Every time not setting any esp as active, of course.

I have had CS crashes when saving a mod for the first time. But this is rare. Don’t really remember what I did the second time around.
And every once in a while I do load a library esp of mine with some mod I am working on, so I can copy/paste from the library to the mod.
Never tried to mod any esm besides Oblivion.esm, thou.

OS = XP64 - CS = 1.2.404


Thanks! This is a great start! <img src="http://static.bethsoft.com/bgs/style_emoticons/default/falloutop5.gif" style="vertical-align:middle" emoid=":tops:" border="0" alt="falloutop5.gif" />

I assume you used interior cells?

The worst problems happen when YYYY.esp changes worldspace cells and you want to alter something it did.

For example, try moving part of the castle exterior from Battlehorn DLC, etc.

Also, in this test:

Then loaded TestA.esp, renamed the same object creating a new one and saved as TESTB

What happens if the object is say a sword that carries an enchantment that is only defined in TestA.esp?


Posted by: QQuix Nov 21 2008, 03:59 PM

QUOTE
The worst problems happen when YYYY.esp changes worldspace cells and you want to alter something it did.
For example, try moving part of the castle exterior from Battlehorn DLC, etc.
Fine again:

Made a YYYY.esp that moves static/activators from position A to position B in XXXX.esm worldspace cell 0,0 (not Battlehorn Castle. I don’t have it)
Loaded XXXX.esm and YYYY.esp (not active)
Moved the static/activators from position B to position C
Saved as ZZZZ.esp (no crash)
In game, the static/activators will be in position B or C depending on the load order.


QUOTE
What happens if the object is say a sword that carries an enchantment that is only defined in TestA.esp?

Sorry, I know nothing about enchantments.
If you instruct me how to enchant a sword, I will test it.


Posted by: washington Nov 21 2008, 04:33 PM

I would just like to share my mistake:

I have placed some initially disabled NPCs outside Anvil, on west side of docks. They had packages that forced them to go to the docks and in front of the warehouse.

But, when they were enabled they were gone. What happened?

The whole area of Anvil's harbour is in subspace. My NPCs were also in this subspace, but their closest path node was outside of that subspace, so instead going few steps to the right and stepping on docks, they went all around Anvil in wide circle, then through the town to the docks, which took lot of time (I discovered that by making them quest targets) and some more problems.

Adding new path node directly under them and connecting it to Anvil docks path grid has solved the problem.

Posted by: dev_akm Nov 21 2008, 06:38 PM

QUOTE (QQuix @ Nov 21 2008, 05:59 PM) <a href="index.php?act=findpost&pid=13278910"><img src='http://www.bethsoft.com/bgsforums/style_images/1/post_snapback.gif' alt='*' border='0' /></a>
Fine again:

Made a YYYY.esp that moves static/activators from position A to position B in XXXX.esm worldspace cell 0,0 (not Battlehorn Castle. I don’t have it)
Loaded XXXX.esm and YYYY.esp (not active)
Moved the static/activators from position B to position C
Saved as ZZZZ.esp (no crash)
In game, the static/activators will be in position B or C depending on the load order.


Ok, that sounds feasible, but to make that a relevant test, YYYY.esp must place a new static or other object into the world, not just move a vanilla placement -- i.e., so the REFR has a local FormID rather than a vanilla Oblivion.esm FormID (00).

Then ZZZZ.esp must try to move that object.

You see what I'm getting at here?

QUOTE (QQuix @ Nov 21 2008, 05:59 PM) <a href="index.php?act=findpost&pid=13278910"><img src='http://www.bethsoft.com/bgsforums/style_images/1/post_snapback.gif' alt='*' border='0' /></a>
Sorry, I know nothing about enchantments.
If you instruct me how to enchant a sword, I will test it.


Rename an enchant, such as EnWeapFireDamage10Flame, creating a new one, then make a new sword (rename and create new) and assign your new enchant to the sword (on the weapon dialog).

Thanks!


Posted by: QQuix Nov 21 2008, 09:28 PM

QUOTE
Ok, that sounds feasible, but to make that a relevant test, YYYY.esp must place a new static or other object into the world, not just move a vanilla placement -- i.e., so the REFR has a local FormID rather than a vanilla Oblivion.esm FormID (00).
Then ZZZZ.esp must try to move that object.

I made a YYYY.esp that:
1; Created a new container and placed it in the world (renamed a barrel)
2; Placed a vanilla chest in the world
Loaded XXXX.esm and YYYY.esp (not active)
Moved the 2 objects mentioned above
Saved as ZZZZ.esp (no crash)
In game:
a. The barrel (1) remained where YYYY placed it. ZZZZ movement was ignored (makes sense)
b. The vanilla chest (2) was duplicated: one where originally placed by YYYY. Another where ZZZZ moved it to (funny, but kind of makes-sense-after-the-fact)

Same results with similar actions in Oblivion.esm

QUOTE
Rename an enchant, such as EnWeapFireDamage10Flame, creating a new one, then make a new sword (rename and create new) and assign your new enchant to the sword (on the weapon dialog).

Created an enchanted longsword ELS1, as you said, in YYYY.esp and placed one in the world
Loaded YYYY.esp, created a new longsword by renaming ELS1 to ELS2, placed one in the world and saved the ESP as WWWW
In game, both were there, but ELS2 didn’t have the enchanted symbol in the inventory.


Posted by: dev_akm Nov 21 2008, 11:11 PM

QUOTE (QQuix @ Nov 21 2008, 11:28 PM) <a href="index.php?act=findpost&pid=13280419"><img src='http://www.bethsoft.com/bgsforums/style_images/1/post_snapback.gif' alt='*' border='0' /></a>
I made a YYYY.esp that:
1; Created a new container and placed it in the world (renamed a barrel)
2; Placed a vanilla chest in the world
Loaded XXXX.esm and YYYY.esp (not active)
Moved the 2 objects mentioned above
Saved as ZZZZ.esp (no crash)
In game:
a. The barrel (1) remained where YYYY placed it. ZZZZ movement was ignored (makes sense)
b. The vanilla chest (2) was duplicated: one where originally placed by YYYY. Another where ZZZZ moved it to (funny, but kind of makes-sense-after-the-fact)

Same results with similar actions in Oblivion.esm


Created an enchanted longsword ELS1, as you said, in YYYY.esp and placed one in the world
Loaded YYYY.esp, created a new longsword by renaming ELS1 to ELS2, placed one in the world and saved the ESP as WWWW
In game, both were there, but ELS2 didn’t have the enchanted symbol in the inventory.


Ok, so it's not crashing for you but the references to the original are lost because the original is not a master (and not an Esmified plugin).

Thanks, man! <img src="http://static.bethsoft.com/bgs/style_emoticons/default/falloutop5.gif" style="vertical-align:middle" emoid=":tops:" border="0" alt="falloutop5.gif" />


Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)