Jump to content

Photo

How to CLEAN your SAVEGAMES from BROKEN SCRIPTS - Tutorial - Solving C


  • Please log in to reply
1120 replies to this topic

#291
AdirianSoan

AdirianSoan

    Stranger

  • Members
  • Pip
  • 3 posts
Endorsed.

It didn't solve my problem, but it ruled out a script-based cause of the issue. Reverted my savegame and no harm done.

At absolute worst this is an extremely useful diagnostic tool. At best, well, I'm planning on hitting my endgame save with it, which I only load up anymore because a certain five year old loves riding horses around in the game. Maybe I won't spend so much time booting the game back up after it inevitably crashes. (A tendency which existed before I installed -any- mods, and which I suspect originates with vanilla scripts. The savegame has been around since Skyrim was released, and the patches made a lot of script-related stuff break, such as my weapon plaques.)

And as a programmer whose job duties include parsing deliberately obfuscated data formats, I suppose it couldn't hurt to look at the Papyrus data. I'm not familiar with making mods, though, and the first step would be to produce several savegames with slightly different Papyrus scripts.

Any mod-makers familiar with the scripting engine out there willing to team up on this issue? It will include copious amounts of busywork on your part.

#292
Arthmoor

Arthmoor

    Destroyer of Bugs

  • Premium Member
  • 19,839 posts

@Arthmoor, What you're doing isn't really doing that though. You're erasing all of the data. While the game will replace it with what it finds as it loads, that data has been reset and is no longer valid for the state of your game.

You are absolutely right, i'm not doing that. Forget about me and my tutorial. Let's talk abstract.

So do you think that the problem is with data only? If we manage to restore the data somehow, what other issues can we face?

You appear to be approaching this reasonably.

 

The largest problem with script issues are scripts that left behind update events that haven't been properly unregistered. While what this procedure outlines will remove that problem, it is doing so by removing every single scrap of script data in the save. It's not a viable approach.

 

What should be done instead is to work with someone (in this case, Trira on the official forums) to help decode the actual save game format to a point where it becomes possible to remove individual script items safely. It's an effort that will take time to get done right, but it will never happen if people don't start working together to solve it.

 

That said - SKSE is soon to issue an update where these abandoned update events will be killed and thus dropped from the save. Their approach is perfectly safe since they've hooked the underlying engine code in a way that lets them kill only what actually needs killing. They've also said it would be unlikely to be safe for them to try and remove abandoned data from ALL scripts.

 

Still, removing abandoned update events is a huge thing, and is easily 90% of the problem with why people are flocking to this tool and then breaking their games after using it.



#293
flexcreator

flexcreator

    Resident poster

  • Premium Member
  • 3,139 posts
@AdirianSoan, thanks.

It is similar to this
http://www.uesp.net/...ipt_File_Format

Same codes for operations and types. BUT there are major differences in structure. Compiled scripts are stored another way inside savegames. For example, there is no difference between property and common variable when they are located in savegame.

My priority is values, so I started with building different temporary plugins and assigning marker values to variables. Then I just search the marker values inside the binary and try to measure things. Still need to handle the string variables and arrays, but I'm very close.

The thing that is really bother me is the large section between the ending of the second structure (where scripts are linked with members) and the beginning of values definition. It can be the bytecode, I looking a way to skip this scary thing without parsing, but I'm afraid it's not that simple.

Again, will appreciate any advice about this particular case or about methodology in general.

#294
Twitch2026

Twitch2026

    Old hand

  • Members
  • PipPipPip
  • 536 posts
I appreciate your attempts here and can see you have good intentions, I hope you take Arthmoors advice and work with other people though to solve this issue. Then maybe in a few months or however long you will have a real tool that is 100% safe

Edited by Twitch2026, 20 February 2013 - 12:07 AM.


#295
M0rningLightM0untain

M0rningLightM0untain

    Enthusiast

  • Supporter
  • PipPip
  • 111 posts
So much sanctimonious commenting going on lol. "If people knew how to backup saves... blah blah blah." Maybe there are some people that might have a 1st character, back from when they were clueless about modding in general, have hundreds of backed up saves but no idea what mods were installed when they made those saves, that may want to see if they can at the very least get that game to not CTD after 5 seconds, so that they can revisit an old friend. I guess my point is: Yes, everyone knows it's not recommend. Everyone knows it's dangerous. Everyone knows you should make a backup first. If you fail to know these things, you are willfully ignorant, and deserve whatever is coming. Please continue the discussion regarding creation of a better tool for this, but please stop crying for removal of this mod in order to protect us from ourselves. Thank You. P.S. I will be attempting this on a save tonight.

Edited by M0rningLightM0untain, 19 February 2013 - 11:18 PM.


#296
cretin0us

cretin0us

    Enthusiast

  • Premium Member
  • 156 posts
All right. If SKSE is on the verge of fixing this problem for good, then I'll revert to the pre-purge savegame for my long-term progress and anticipate their solution. I'll continue to test the post-purge save in parallel, though, as it is running well so far.

Thanks, @flexcreator, for dragging this issue out into the light. At the very least you've motivated people.


#297
cherom

cherom

    Old hand

  • Supporter
  • PipPipPip
  • 536 posts
lol something really hilarious occured to me after doing this:

I loaded my save (which was made inside that starting room from Alternative Start mod) and ASSAULT mode activated from DeadlyDragons and there was a freaking dragon flying there!!!

#298
adamlevin

adamlevin

    Enthusiast

  • Members
  • PipPip
  • 106 posts
This may sound pedantic... But can't we all start a petition to Bethesda to disclose save file information or at the very least help develop a tool for this issue? I ask if this is a viable thing. Is it likely Beth would actually listen?

Edited by adamlevin, 20 February 2013 - 12:53 AM.


#299
Gamer720

Gamer720

    Stranger

  • Members
  • Pip
  • 6 posts
@cretin0us Do you have a link to proof of this? I believe you, I would just love to read the original article by the developers of SKSE.

#300
cretin0us

cretin0us

    Enthusiast

  • Premium Member
  • 156 posts
@Gamer720 : Arthmoor's post before mine. He should be in a position to know. It has mentioned by others earlier in the thread as well.

I went hunting for the source myself in the Bethesda SKSE thread, but couldn't find it.





Page loaded in: 1.032 seconds