the Sim Settlements forums!

Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Long Save Research Tool

To give you guys some inspiration - the HQ Reset bug was solved as the bounty drew the attention of the Buffout 4 creator!

I hear through the grapevine the SKSE team is looking into this long save issue currently and has some ideas. Fingers crossed! Either way, going to keep at this with you all so we can keep the cash in-house if possible haha

Will try compiling these tomorrow - going to be hotfixing the HQ issue now!
 
To give you guys some inspiration - the HQ Reset bug was solved as the bounty drew the attention of the Buffout 4 creator!

I hear through the grapevine the SKSE team is looking into this long save issue currently and has some ideas. Fingers crossed! Either way, going to keep at this with you all so we can keep the cash in-house if possible haha

Will try compiling these tomorrow - going to be hotfixing the HQ issue now!

So good to know! Thank you!
 
Here are my save txts generated with the plugin, in a zip:

Had to use an external upload site, file size was too big for the forum...

First save is an autosave when leaving the pip-boy, in my main settlement. Took 15s.
Second save is a fast-travel autosave when fast-traveling to diamond city, made 30s after the previous one, only change is I dropped two items in my workshop and grabbed one from a container. Took 2-3m.
 
Last edited:
To give you guys some inspiration - the HQ Reset bug was solved as the bounty drew the attention of the Buffout 4 creator!

I hear through the grapevine the SKSE team is looking into this long save issue currently and has some ideas. Fingers crossed! Either way, going to keep at this with you all so we can keep the cash in-house if possible haha

Will try compiling these tomorrow - going to be hotfixing the HQ issue now!
Fingers crossed! Opening up the script tables where scripts could report on values will be a welcome addition!
 
To give you guys some inspiration - the HQ Reset bug was solved as the bounty drew the attention of the Buffout 4 creator!

I hear through the grapevine the SKSE team is looking into this long save issue currently and has some ideas. Fingers crossed! Either way, going to keep at this with you all so we can keep the cash in-house if possible haha

Will try compiling these tomorrow - going to be hotfixing the HQ issue now!
The inspiration knob got turned a few clicks :)
It already was at a very nice setting seeing how many people contributed in some way in helping / trying to resolve the issues.
There will become more good out of this then only the fixes.
 
@kinggath any chance of giving us a build with the added traces? :)
Apologies for the delay, weekends are very busy for me, I'm lucky if I get more than an hour at my PC some days.

There are a lot of instances where the script is creating entries like this:

Debug.Trace("Function ending! ModTraceCustom(sEmpireLog, "Location " + thisLoc + " returned Location Center: " + kCenterRef)")

I think it's seeing the word "return" in some of my own traces or comments and thinking those are points to inject a trace.

If those were just extra traces we didn't need, it wouldn't be a big deal - but since those traces include a bunch of extra double quotes the string is invalid and won't compile.
 
Apologies for the delay, weekends are very busy for me, I'm lucky if I get more than an hour at my PC some days.

There are a lot of instances where the script is creating entries like this:

Debug.Trace("Function ending! ModTraceCustom(sEmpireLog, "Location " + thisLoc + " returned Location Center: " + kCenterRef)")

I think it's seeing the word "return" in some of my own traces or comments and thinking those are points to inject a trace.

If those were just extra traces we didn't need, it wouldn't be a big deal - but since those traces include a bunch of extra double quotes the string is invalid and won't compile.
No need to apologise :)

I'll try to fix it today
 
Here's a quick console app that uses a standard coding framework (the coding is quite a few years old and was part of something I tossed together as fast as possible), but for the most part it's copy and paste then just add the custom code section below the 'main'. When I get the code cleaned up, I'll post the source along with it. For now, it takes a papyrus log as input and just summarizes how many stack dumps occurred for each script sorted in descending order from highest count to least by script name. It's pretty simple. If it works out ok for everyone then I'll use this same framework for other quick-n-easy utilities. It does require at least .NET framework (4.7.1 or later) so be sure to get have that installed before using it, otherwise it won't work. It's a 32bit app.

An example would be from the console:

StackDumpInfo -c="c:Users\John Doe\My Documents\My Games\Fallout4\Logs\Scripts\papyrus.0.log"

...as an example. Be sure to have quotes around the full path name to the papyrus log your wanting to summarize if the filename has spaces.

If you want to localize or change any of the 'search' fields to another language or text just use:

StackDumpInfo -createconfigs

... this will create the configuration files in the same folder as the application, and override the built in resource files. You can edit these with any text editor. It should be fairly straight forward. You can also use the ">" shell 'pipe' to send the output to a text file, or use the framework parameters "-outf={filename} -outfile" to do the same.

Just message me if you have any problems.
 

Attachments

  • StackDumpInfo.zip
    14.8 KB · Views: 1
  • stackdumpinfo.txt
    14.7 KB · Views: 1
Last edited:
@kinggath I think I fixed the problem. Should I add traces for events too?

git is always updated if anyone wanna check the code and have any suggestions.

Just message me if you have any problems.

When I do my play session later I'll give it a try :agree:
 

Attachments

  • Debugger.zip
    10.6 KB · Views: 3
@kinggath I think I fixed the problem. Should I add traces for events too?
Found another instance of strings causing the same problem. We have some functions that return strings. For example:

String Function GetLogName() global DebugOnly
Debug.Trace("Function starting!")
Debug.Trace("Function ending! return "SS2"")
return "SS2"
Debug.Trace("Function ending! ")
EndFunction

So the trace is invalid for the same reason as the previous - multiple double quotes.

Adding them to events might be a good idea, but perhaps we start with this and see if it helps first.
 
Found another instance of strings causing the same problem. We have some functions that return strings. For example:

String Function GetLogName() global DebugOnly
Debug.Trace("Function starting!")
Debug.Trace("Function ending! return "SS2"")
return "SS2"
Debug.Trace("Function ending! ")
EndFunction

So the trace is invalid for the same reason as the previous - multiple double quotes.

Adding them to events might be a good idea, but perhaps we start with this and see if it helps first.
Yeah, that part of the code was smelling bad to me, I kind of knew it would break, cause those look like c# properties without a setter.

It is always 'return "string"' or does it vary?

Adding them to events might be a good idea, but perhaps we start with this and see if it helps first.
Agree. :)

Working on a fix right now.
 
My dyslexia almost got me :grin I read the problem was with the trace being inside a function like property instead of the double quote :blush

1643037725683.png

This should fix every occurrence of double-quotes. I simply removed the quotes from the return message when printing the debug. Let me know if the compiler accepts the code after the return. Some do, some don't, I have no idea about CK. In C# for instance, it throws a working of "Unaccessable code" but it compiles anyway.
 

Attachments

  • Debugger.zip
    10.6 KB · Views: 3
Heh - apparently this is much more complicated than expected. Another issue for you:

Here's one it caught :


MiscObject[] Property SpecificUpgradeRequirements Auto Const
{ Requirements for each level to be upgraded to. (Additional more complex requirements can be configured by extending the CityPlan script and redefining the IsEligibleForUpgrade function.) Each entry must be of type SimSettlementsV2:MiscObjects:UsageRequirements. }
Debug.Trace("Function starting!")

Apparently it picked up the word function in the property notes section?
 
Heh - apparently this is much more complicated than expected. Another issue for you:

Here's one it caught :


MiscObject[] Property SpecificUpgradeRequirements Auto Const
{ Requirements for each level to be upgraded to. (Additional more complex requirements can be configured by extending the CityPlan script and redefining the IsEligibleForUpgrade function.) Each entry must be of type SimSettlementsV2:MiscObjects:UsageRequirements. }
Debug.Trace("Function starting!")

Apparently it picked up the word function in the property notes section?
Jesus, how many ways there are to do comments in papyrus?? :rofl

1643045438248.png
1643045691166.png

there... now let's find the next problem :todd:

I have to find a syntax checker...
 

Attachments

  • Debugger.zip
    10.6 KB · Views: 1
Continuing the same game save, and on this playthrough here's an another observation...

During gameplay I received 3 successive 'defend settlement' notifications. One for Starlight Drive In, One for Red Rocket and other for Kingsport Lighthouse. There was a 'long save' here and there on each one, nothing new. Then I went to one of the Fraternal Order Police Stations to kill some super mutants for Abernathy and when fast traveling to turn it in I had 'blue' people everywhere. Note, that I did not go into Workshop mode. Just traveled there to turn in the quest. I'll attach a log of the stack dumps.

I did update to the new SS2 and SS2 Chapter 2, so that may have something to do with it. But it's like, something decided to 'go out of logical' or 'coded' context, and that spun everything off. I have the auto-kill set to 3minutes and unfortunately it hit that before completing the save.

Here's a 'stack info' report on the stack dumps that were in that session's papyrus log. To me, just looking at the program's behavior script wise,and I'm ballparking it here, it seems to have missed something maybe a conditional, something... SS2 started rendering those blue icon markers in Abernathy as though I was in Workshop mode, and the scripts seem to think so to as 1300+ stack dumps were from 'is player in workshop mode'- which I was not, and didn't go in after fast traveling there.

Not sure if this will help, just throwing darts at the wall. When I get a moment here in a bit I'll try and take a look to re-purpose the papyrus log info to see if one script is repetitively calling another.

Stack trace:
[01/23/2022 - 01:49:38AM] <unknown self>.workshopframework:wsfw_api.IsPlayerInWorkshopMode() - "C:\Program Files (x86)\Steam\steamapps\common\Fallout 4\Data\Scripts\Source\User\WorkshopFramework\WSFW_API.psc" Line 208
[01/23/2022 - 01:49:38AM] IP: 822 Instruction: 13 Line: 208
[01/23/2022 - 01:49:38AM] [::temp30]: [WorkshopFramework:WSFW_APIQuest <WSFW_API (12004CA3)>]
[01/23/2022 - 01:49:38AM] [::temp31]: False
[01/23/2022 - 01:49:38AM] [::temp32]: [workshopframework:mainquest <WSFW_Main (12000F99)>]
[01/23/2022 - 01:49:38AM] [::temp33]: [ReferenceAlias <alias lastWorkshop on quest WSFW_Main (12000F99)>]
[01/23/2022 - 01:49:38AM] [::temp34]: [workshopscript < (0006F5C5)>]
[01/23/2022 - 01:49:38AM] [::temp35]: [workshopscript < (0006F5C5)>]
[01/23/2022 - 01:49:38AM] [api]: [WorkshopFramework:WSFW_APIQuest <WSFW_API (12004CA3)>]
[01/23/2022 - 01:49:38AM] [::nonevar]: None
[01/23/2022 - 01:49:38AM] [workshopRef]: [workshopscript < (0006F5C5)>]

I also included 'stack info' report from another game session. If I were to take another guess, it would be subtle game save corruption of some kind. Not necessarily in structure, but in the data somewhere?
 

Attachments

  • stackdumpinfo.txt
    1.2 KB · Views: 3
  • stackdumpinfo.txt
    14.2 KB · Views: 1
Last edited:
Jesus, how many ways there are to do comments in papyrus?? :rofl
At least one more:


; When we open another barter menu before the previous one has finished processing (ie. before getting to the end of the ProcessBarterSelection function), we set this to avoid ProcessBarterSelection removing all of the items from our inventory
Debug.Trace("Function starting!")

Other format you might run into is:

;/ another
comment format
this comment can have returns
/;
 
Here's another quick one for those that don't know how to get crash event data for their games, programs or applications. It's the exact same framework as the previous app, but with a main function coded for showing crash event data. This will also require .NET 4.7.1+ to work, and is a 32bit application. From the console use:

ShowCrashEvents -p="fallout4.exe"

...or any program you want to see if there's crash event data for. This will print out a history of crashes for "fallout4.exe". You can easily substitute another program name for "fallout4.exe" to check crash events for other programs, if it's available.

With the framework all other parameters passed to the app is the same- use "-createconfigs" for the app to save it's internal configuration files locally. You can 'pipe' the output to a file, or use the "-outf={filename}" along with "-outfile" to do the same thing. You can attach these files in your posts to help others see what might've happened.
 

Attachments

  • ShowCrashEvents.zip
    15 KB · Views: 1
Last edited:
Top