Jump to content

Lule System To Recover Bad Savegames


Aralez

Recommended Posts

Don't know if it's known yet, but if you edited a savegame (no matter what way)and something went wrong, the savegame works, but you only have two bases and are back at the start of the game. There is a way to get the file to work correctly again most of the time: Just load an unedited savegame and then load the edited one again, in 99% it will work as intended, all bases with full equipment. The name LULE system has it's origin at blian from this forum, i mailed him that tip and he thanked me for the LULE system (Load Unedited Load Edited). Great name, isn't it :tank:

 

Thanks blian :rolleyes:

 

Btw, blian had a great idea, some kind of XCOMUTIL for UFO:AM, maybe he himself can tell you more.... And he has some knowledge regarding savegames, i told him to cantact you, sigget, as you maybe could use this info for your reference site.

Link to comment
Share on other sites

Hi all...hi Aralez...here I am.

 

About the modding tool I proposed: I already described it in Fulby's Plugin Creator topic. Please read it.

 

About savegames: here comes a quote from the mail I sent to Aralez.

 

Experiences with editing store amounts in savegame:

 

- Not all the items are there in the savegame, only the ones I met. For

example if I haven't found the ZVI Falcon yet, there is no entry for it,

but if I find an Alien Energy Cell, an entry for Alien Power Cell also

appears. The items are listed in the order of discovery.

- if I add at least one byte into the STORE section, the LAST item

disappears, so do the bases except the initial two. The bases can be

restored by the "load an unchanged game, then the edited one" (LULE)

trick, the last item can not.

- if I don't add bytes, just change some existing ones, everything goes

OK, the edited game can be loaded perfectly.

- After the END_OF_STORE there are some junk bytes.

- if I add too many data, the soldiers in reserve disappear (all of them).

This cannot be restored with the LULE trick.

 

Looks like the different sections have their length stored somewhere in

the savegame, and/or the sections cannot have any length, just some

"round" lengths.

 

I couldn't find the mentioned lenghts yet; although I have an idea how the one related to the STORE section could be found:

 

Let's suppose we save game_0, which does not contain the entry for item_X. We research and manufacture a new kind of item with FINISHRD cheat in little time, and save game_1, which differs from game_0 in the existence of item_X. let's delete the entry of item_X from game_1, and record the number of removed bytes (i call it Z). These entries look like something this:

(0D 0A 20 20 20) [..1..] STORED_ITEM [..2..] END_OF_STORED_ITEM [..

3..] 0D 0A 20 20 20 ([..4..])

 

The first "0D 0A 20 20 20" (or sg similar) belongs to the previous entry, and the last [..4..] byte sequence belongs to the next one, so I put them into ( ).

The game_0 and the shortened game_1 should have the same length and should differ in:

- the length we want to find

- the current game time

- some other things (these could be minimized by doing research and manufacture instantly)

We should compare the two savegames byte-by-byte and list the differences and their offsets with some bitwise file compare utility (there are a lots of them).

If we are lucky, one and only one of the differing byte sequence pairs differ

by Z (the number of removed bytes).

 

(maybe it would be enough for a savegame editor to remove as many bytes from the junk section as there were inserted?)

 

I must confess that I don't have enough patience for things like this...

 

blian

Link to comment
Share on other sites

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
×
  • Create New...