Help with simple save game edit..not working as I think it should...

I have been experimenting with a simple save game edit that does not appear to work. First, in the user.setting file I set the SaveGameFileFormat to produce an ascii file for easy editing.

Then I save a game where I have 27445 credits, 2444 crystal, 1345 metal showing in the interface as test.save. I close the game. I then open up the saved game file test.save and look for 27455 and find the location of the values for credits, crystal and metal. Like so....

credits 27445.30 Bits=1186809129
metal 2444.58 Bits=1166382756
crystal 1345.34 Bits=1155836661

At this point, I am confidant that I have the right values for credits etc. to change in the saved game file as they are the values that were saved from the game.

I then modify the parameters to something obvious like...

credits 10000.00 Bits=1186809129
metal 5000.00 Bits=1166382756
crystal 3000.34 Bits=1155836661

and close the saved game file.

Now, when I load the saved game file, the values for Credits etc. are still the old values, of 27445 etc.!

I check the saved game file again and the changed values are still there, not the old values that the game has now loaded from somewhere.

So...where did the game get the old values from. I changed them in the saved game file. They must be loading from somewhere else that I am not aware of.

As a check, I save the game back to test.save and the new, changed values of Credits:10000 are now changed back to the old values. So the game is saving the values for Credits etc. where I locate them in the saved game file.

What am I missing? It's a mystery out there in the Sins Universe. And I gots no clue...

7,328 views 7 replies
Reply #1 Top
The problem is most likely with the bits value you see behind the numbers you are trying to change. The bits value has to match the new values you entered I believe; or the game is only reading the bits value(s) itself. Unfortunately I don't know exactly how you would calculate the new bits value.
Reply #2 Top
I think in this case, you would have to get a series of save files with different values and compare the results. Either that or just mess with the bit values in the blind and see what you blow up. :)
Reply #3 Top
Yes, you are both right. The load takes the value from the bits=xxxxx. To check this, I took known values from one save game file and moved them to another and the proper values followed the move. Next, I'll compare a range of values, bits=xxxx, bits=yyyy etc. and see if I can figure out the transfer function. They may just be doing integer math for speed (ahh fond memories of Forth); It may be hoping for too much but if they released the save game file organization, I could write a save game editor app that would be fun to play with. Maybe do it in LabView....B-)
Reply #4 Top
The "bits" are the number represented in IEEE 754 format ("float" for you programmers). There are lots of converters, I found one here:
http://handyscript.wz.cz/files/ieee754.htm

It only takes HEX though, so enter the Bits in e.g. the windows calculator, there you can convert it to hex (if you have it in "Scientific" mode). Then run it through the converter above and you get the float number.

Of course you're more interested in the other way around, so enter 10000 in the left pane on the web converter, get the hex value (46 1C 40 00), paste it in calculator in hex mode and convert to decimal (1176256512). This is the Bits value you should enter in the save file.
Reply #5 Top
Ahh, yes IEEE 754....thanks! That will do it. There are a number of formats out there so I was going to write basic...oops...basic C# program, feed the left hand side decimal in and do as many format type conversions as I could think of until I hit on the right one to match the bits= side. I should have just tried 754 first since it's so common. You saved me the trouble B-). Right now I'm just doing a little game balancing by giving myself some credits to compensate for over researching and jacking up the penalties too high to sustain the ship count. I do it the old fashion way..fire up Beyond Compare 2 on a save game with lots of credits and copy over the larger value to my current save game file. If I get enthusiastic tonite I'll write up a little parser to look for the credits parameter, boost it, save and get out. A great game leads to great modding, and this is one great game.
Reply #6 Top

I know this is several years later but I was wondering how you...

 "First, in the user.setting file I set the SaveGameFileFormat to produce an ascii file for easy editing"

I know how to get to this file I just don't know what to enter for  "SavedGameFileFormat 1" Do i change the value of 1 to something else, like 0.

I have been toying with everything else like the IEEE 754 and claculator bit.

Also, have you any hints on what to look for specificly when editing within the save text. I just can't seem to find 'em.

Reply #7 Top

Every 2 years this thread must resurface. Still works in rebellion change save game file format to 0