Jump to content

Repeating Active Script in Saves


Recommended Posts

I'm getting what appears to me a repeating error in my saves, which I'd like to fix.  The script DLC01WESC03 repeatedly occurs so that I now have 429 active scripts in my save file according to ReSaver.  The vast majority of the repeating is from this script.

 

From Bethesda: "dlc01wesc03 is a script in Skyrim SE that is related to the Dragonborn. It is used to start the quest “The Final Descent” which is part of the main questline of the Dragonborn DLC1."    This came from Bathesda in a Bing search.

 

I have completed "The Final Descent" quest.  I have searched for conflicts in SSEEdit with all mods and found nothing relating to the quest or NPCs associated with the quest.

 

Screen Pic from Resaver:



image.jpeg.df80d1435f0dbcdb573c126acaba6813.jpeg

 

 

Anyone have any ideas about the cause?  Should they just be deleted (I'm reluctant to do this)? 

 

 

 

 

Link to comment

The Utility.Wait call that it is stuck on is preceded by this:

While (DLC01_WESC03.GetStage() == 0)
    if (SceneCenterMarker.GetReference().GetDistance(Game.GetPlayer()) > 2000)

 

So if a marker object is more than 2000 units away from the player when OnLoad is called it will wait a second. This repeats for as long as the quest in DLC01_WESC03 is set to stage 0. Workarounds:

  1. Delete all but one script instance using ReSaver. Maybe make sure they're all stuck on Wait() first. This may break whatever DLC01WESC03Script is attached to; bats perhaps. You may want to be in a cell that does not use DLC01WESC03Script. Considering its dlc content, the bannered mare in whiterun might be safe?
  2. Find the quest referenced in that DLC1_WESC03 property and set its stage to something else. Might be risky as it may cause unexpected things to happen.
Link to comment

Yep, Google gave me wrong info.   This is not from Dragonborn but from Dawnguard.   And it indeed is "bats". 

 

The quest ID is DLC1_WESC03.  The property is DLC01WESC03.

 

The stages are 0 - start up stage, 10, and 255 - shut down.

 

On 4/11/2023 at 3:54 AM, traison said:

Find the quest referenced in that DLC1_WESC03 property and set its stage to something else. Might be risky as it may cause unexpected things to happen.

I'm going to set the stage in DLC1_WESC03 to 255 and see if it shuts down.  I'll create two saves back-to-back and change the stage in it to 255. If it goes sideways, I'll have a working return point.  I'll post results.

Link to comment

OK, , setstage DLC1_WESC03 255, seems to have solved the issue.  It got rid of every script repeat, a total of 425 repeats in the save.

 

image.jpeg.e5b8d7386f7cf8143bf840787b87025b.jpeg

 

{/spoiler]

 

Now if I just understood how this happened.  I loaded everything in SSEEdit and found nothing that conflicted with the quest.  

Link to comment

That smells like a bug. If say there's 15 of these bat objects in a cell, and OnLoad is called each time the object is loaded (ie. when you enter the cell or otherwise walk by in a large worldspace) that would load infinite amounts of instances and they'd all be stuck in a while loop. I feel like a simple "DoOnce" boolean would be required here, or an OnUnload.

 

I may look into this later today. I'll post a fix if I make one.

 

Edit: This appears to be a world encounter. There may be more issues (some perhaps intended?) with this than just the infinite loop. For instance, I'm not finding where this quest is started. If it's simply stared without a setstage or reset call, this encounter may only work once (after it has been triggered). Anyhow, without diving into the whole story manager thing, changing the loop conditions seems like the least intrusive way to fix the current issue. The script already has an OnUnload event which calls Stop on the associated quest, so in the loop we can check if that has been done:

While (DLC01_WESC03.IsRunning() && DLC01_WESC03.GetStage() == 0)

 

Attached compiled script. Maybe if you still have that bloated save you could test it out for me?

 

Edit: Turns out USSEP already contains a patch for this file. While I do not believe it will fix this particular issue, my script below does not include USSEP's changes (was not aware of it at the time). The changes they made are not significant, if the script below works for you you can safely use it even if you use USSEP.

 

DLC01WESC03Script.pex

Edited by traison
Link to comment
On 4/13/2023 at 3:18 AM, traison said:

Attached compiled script. Maybe if you still have that bloated save you could test it out for me?

 

When I ended the quest, it went away.  I'm not sure where this quest triggers.  I do know some bats appear in Riverwood. once the bridge to the north is crossed.  I'll check it out later this afternoon.  Gotta work this morning.

Link to comment

Dunno if you use it, but I noticed that USSEP uses a patched version of this script, the only change is that they commented out the OnUnload() event in favour of OnCellDetach()

 

Event OnUnload()
    ;USSEP 4.2.5 Bug #30585 - This doesn't need to happen twice. The event below is more reliable.
    ;DLC01_WESC03.Stop()
EndEvent

Event OnCellDetach()
    DLC01_WESC03.Stop()
EndEvent

 

Edited by Yinkle
Link to comment

Hm, I'd say the USSEP peeps know more about this than I do but I'm not sure their fix would be sufficient. Stopping the quest will still have GetStage return 0 and the loop continues. This must have been a recent change, it does not appear to be in the 4.2.4b version, latest for 1.5.97.0. Good find tho @Yinkle, I'll update my previous post.

Link to comment
On 4/14/2023 at 11:27 AM, traison said:

Hm, I'd say the USSEP peeps know more about this than I do but I'm not sure their fix would be sufficient. Stopping the quest will still have GetStage return 0 and the loop continues. This must have been a recent change, it does not appear to be in the 4.2.4b version, latest for 1.5.97.0. Good find tho @Yinkle, I'll update my previous post.

I've been trying to replicate the problem but have not been able to get it to start.  I'm going to continue my game and see what happens.

Link to comment

That could be because of what I mentioned in one of my previous posts. If the thing that starts the quest does not reset it or setstage it to 0, it will only work once. When it goes past stage 0 it will never be in stage 0 again and thus it skips over the loop that contains its payload. That would most likely also mean the bat effects get spawned in, but not cleaned up.

 

getstage DLC1_WESC03

 

Does that still output 255, like you set it to before? If it does, my theory is correct and you'd have to setstage 0 to restore functionality. It would also mean the script needs another patch.

Link to comment
21 hours ago, traison said:

Does that still output 255, like you set it to before? If it does, my theory is correct and you'd have to setstage 0 to restore functionality. It would also mean the script needs another patch.

You're right, getstage DLC1_WESC03 resulted in 255.  I've never work with the papyrus script so; I have no idea how to patch this.

 

I'll use an earlier bloated save to test your script you attached earlier and post the results here.

 

Link to comment

 

On 4/13/2023 at 3:18 AM, traison said:

Attached compiled script. Maybe if you still have that bloated save you could test it out for me?

Well, I created a blank mod in MO2 and added a scripts folder then I copied DLC01WESC03Script.pex to the new folder.  I loaded an older save that would have had the repeating scripts.

 

First, I checked the stage of the quest DLC1_WESC03 and it was at stage 255.  I then exited the game and checked the save in ReSaver and the repeating script was gone.  Ideally, the patch would have reset the stage to 0 in addition to eliminating repeats.  

 

I could just reset the stage to 0. 

Link to comment

Not able to compile scripts right now. Might be a week before I get back to it.

 

The fix would be simple though, locate where it calls Stop() on the quest and precede it with a Reset() or SetStage(0), ie.:

 

Event OnUnload()
    DLC01_WESC03.Reset()
    DLC01_WESC03.Stop()
EndEvent
Link to comment

I finally had a look at the quest structure for DLC1_WESC03. How you managed to get >400 instances of the DLC01WESC03Script is beyond me. It doesn't seems possible (or practical?). The quest script will only ever clean up the last instance of the bat effect, so whatever you do (resaver, setstage, ...) you will be stuck with >400 activators bloating your game world. Is this a problem? Probably not. I would have made the script clean up its own activator instead of relying on a quest, but that's irrelevant.

 

Since I do not know how the story manager works I get the feeling we shouldn't Reset the quest and that the script I provided earlier is sufficient to fix this issue (issue being script instance bloat); and if it isn't, one can simply setstage DLC1_WESC03 255 or stopquest DLC1_WESC03 in the console and it will sort itself out eventually. That applies without my altered script as well.

Link to comment
  • 11 months later...
On 4/15/2023 at 4:58 PM, traison said:

That could be because of what I mentioned in one of my previous posts. If the thing that starts the quest does not reset it or setstage it to 0, it will only work once. When it goes past stage 0 it will never be in stage 0 again and thus it skips over the loop that contains its payload. That would most likely also mean the bat effects get spawned in, but not cleaned up.

 

getstage DLC1_WESC03

 

Does that still output 255, like you set it to before? If it does, my theory is correct and you'd have to setstage 0 to restore functionality. It would also mean the script needs another patch.

Thanks for this, I came across this thread in my online search for why this was happening in my save. It's never happened before that I know of.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more information, see our Privacy Policy & Terms of Use