Mod Causing Save Corruptions

Post » Thu Jun 21, 2012 1:30 am

My mod seems to be causing save corruptions in some users, and I'm at a loss as to what's causing it. Would anyone be willing to help me troubleshoot?

Link to my mod thread & download from Workshop:
http://www.gamesas.com/topic/1362265-wipz-radiance-a-simple-immersion-booster/

My mod mainly adds new wilderness events. This involves creating new quests (along with a smattering of new items, actors, and AI packages) and hooking them into the Script Event and Change Location SM Event Nodes. In the Script Event Node, I've added a stacked branch node to the top of the main WE stacked branch, and in Change Location I added a random quest node to the change location--habitation random branch node.

I don't get any save corruptions in my own game. All three of the testers who encountered this issue use WATER.esp and WATER - Get Wet.esp, but after testing this without those two mods enabled, they report that the save corruption issue persists. Disabling Radiance (my mod) allows "corrupted" saves to be loaded again as normal.


I didn't turn anything up about save corruptions after a search through this forum, but maybe I missed something. Does anyone know what might cause this issue? Is there any more information you need that I neglected to include here?

Thank you to anyone who might be able to shed some light on this annoying issue!
User avatar
Mrs. Patton
 
Posts: 3418
Joined: Fri Jan 26, 2007 8:00 am

Post » Wed Jun 20, 2012 7:26 pm

Nobody has any insight into this issue? Can anyone at least point me to a list of common causes for save corruptions?

Thank you!
User avatar
Laura-Lee Gerwing
 
Posts: 3363
Joined: Fri Jan 12, 2007 12:46 am

Post » Thu Jun 21, 2012 12:18 am

Nobody has any insight into this issue? Can anyone at least point me to a list of common causes for save corruptions?

Thank you!

Are you using any RegisterForUpdate() or RegisterForGameTimeUpdate()? They can very easily cause save corruption, especially if the update time is short. RegisterForSingleUpdate() or RegisterForSingleGameTimeUpdate() are much better to use. You can re-register for another single update at the end of the OnUpdate() or OnUpdateGameTime() events.

Careful of using any "While x = True ... (do stuff) ... x = False ... EndWhile" blocks of code. If something unforeseen happens, you can get stuck in that loop. (I'm surprised how many times I see that used by otherwise great script-writers.)

Scripts are saved in the save game file, so any unresolved loops will only stack up.

I don't and won't use Steam Workshop, so I can't look at your mod itself. But, I hope this helps a little.
User avatar
roxanna matoorah
 
Posts: 3368
Joined: Fri Oct 13, 2006 6:01 am

Post » Thu Jun 21, 2012 5:04 am

Quick Edit: I forget to say thank you! I appreciate your taking the time to answer this question for me.

Are you using any RegisterForUpdate() or RegisterForGameTimeUpdate()? They can very easily cause save corruption, especially if the update time is short. RegisterForSingleUpdate() or RegisterForSingleGameTimeUpdate() are much better to use. You can re-register for another single update at the end of the OnUpdate() or OnUpdateGameTime() events.
I'd be surprised if I am. My quests are only using vanilla Skyrim scripts, and I don't recall using that on any of those functions in any scripts I made myself. I'll comb through my own scripts to see if they come up, though.

Careful of using any "While x = True ... (do stuff) ... x = False ... EndWhile" blocks of code. If something unforeseen happens, you can get stuck in that loop. (I'm surprised how many times I see that used by otherwise great script-writers.)
The only control block I'm using is a simple if command. :(

Scripts are saved in the save game file, so any unresolved loops will only stack up. I don't and won't use Steam Workshop, so I can't look at your mod itself. But, I hope this helps a little.
Perhaps I'll have to upload this to Nexus earlier than I planned. I'll update here if I do.
User avatar
Christina Trayler
 
Posts: 3434
Joined: Tue Nov 07, 2006 3:27 am

Post » Thu Jun 21, 2012 2:12 am

Installed Notepad++ to make searching through my scripts easier. Here's an update on what I've found.

Are you using any RegisterForUpdate() or RegisterForGameTimeUpdate()? They can very easily cause save corruption, especially if the update time is short. RegisterForSingleUpdate() or RegisterForSingleGameTimeUpdate() are much better to use. You can re-register for another single update at the end of the OnUpdate() or OnUpdateGameTime() events.
The RegisterForUpdate() function exists in one script on this mod, but it should never run. The script is attached to an alias on a quest that never starts (because I couldn't get it working at the time; it's on my to-do list). I'd assume this couldn't be an issue...am I wrong? Can a RegisterForUpdate() function cause save corruption if the script is never run?

Careful of using any "While x = True ... (do stuff) ... x = False ... EndWhile" blocks of code. If something unforeseen happens, you can get stuck in that loop. (I'm surprised how many times I see that used by otherwise great script-writers.)
As expected, I don't use any loops in my script. :(

I don't and won't use Steam Workshop, so I can't look at your mod itself. But, I hope this helps a little.
On that note, is there a function to easily get a list of all scripts used by new forms in your mod? I'm guessing that uploading this to Nexus with a .bsa wouldn't really help anyone get a closer look at my scripts. :P

Thank you again for your input!
User avatar
Jennifer May
 
Posts: 3376
Joined: Thu Aug 16, 2007 3:51 pm


Return to V - Skyrim