Save game editing

Apologies if this has already been posted, a brief google search of the forum didn't find it.

Line 119 of user.setting (it's in the user SoaSE directory, not the Program Files SoaSE directory) :

SavedGameFileFormat 1

If the value is 1 (default), saved games are encoded as binary, and essentially unreadable (but smaller and load faster). If you change the value to 0 then games saved after the change will be plain text, and fairly easy to edit (albeit very long; a save shortly after the beginning of a small random map is over 3 megs of text).

Just posting it in case anyone actually *wanted* to know. On the off chance.

(note, the next line is "RecordedGameFileFormat 1", but for the life of me I don't know why I'd want to edit a recording - to destroy the evidence in an MP game, perhaps? ;) )
37,573 views 22 replies
Reply #1 Top
Oof, this should be always binary, it shouldn't be easy for people to cheat and edit their save games (3 megs of text is doable in some text editors).
Reply #2 Top
Carbon,

Lol, cheating hadn't actually crossed my mind. It's for modding a save game to have precisely the scenario you want, for some crazy RPG mod or whatever. I don't think this could be used to cheat in multiplayer because the other players' save files wouldn't match and the game would complain. As for cheating in singleplayer... well, sure, but there are easier ways to do that.

Plain-text saves are also easier for the end-user to track down bugs with.
Reply #3 Top

Oof, this should be always binary, it shouldn't be easy for people to cheat and edit their save games (3 megs of text is doable in some text editors).
End of quote
Why is this a problem?
Reply #4 Top

Lol, cheating hadn't actually crossed my mind.
End of quote


Oh! Of course, you're right, they wouldn't match up. You might be able to get away with it if someone crashed and needed the save file, but then it'd only work for a 2v2 etc. Good point.
Reply #5 Top
Ive tried doing this to see if I could change my economy stats in a single player game by starting a game and buying all the crystal I could off the black market to set as a marker to look for in the file and came up with nothing but I did notice that theres another file that saves along with the .save files called *.stats and I think thats the file that contains your economy details. Now it appears that its in some sort of hex format but unsure since I do not have a hex editor on this PC.
Reply #6 Top
Nevermind, I found what I needed to change by using a tool that compares two saves. Here the game saves in decimal points so where I was looking for 950, it was actually 949.65
Reply #7 Top
Ok now I am left with this puzzle, my first save game was just what you get at the very beginning...

credits 3045.50 Bits=1161713664
metal 800.00 Bits=1145569280
crystal 250.00 Bits=1132068864

The next one was right after I bought all I could of crystal...

credits 45.50 Bits=1110835200
metal 800.00 Bits=1145569280
crystal 949.65 Bits=1148021077

The metal stayed the same of course but notice how the "Bits" number has changed on both credits and crystal. I am wondering how this number is generated so that if I change the amounts, I can appropriately change the bits as well.
Reply #8 Top
Hi i tried adding a little more Crystal but for some reason anything that is edited in the savegame file it dont take hold :( im guessing the bits need to be changed also?

Yea i know its cheating but mining crystal takes forever even with crystal research,lol i have tons of metal though.
Reply #9 Top
I don't think this could be used to cheat in multiplayer because the other players' save files wouldn't match and the game would complain. As for cheating in singleplayer... well, sure, but there are easier ways to do that.
End of quote


Yea they would fail a CRC Check. We tested it to make sure. We found out one of the guys we were playing with was trying to use a trainer to cheat, we don't play with him any more. As for solo, I don't care what he does with his solo games.

Reply #10 Top
Hi i tried adding a little more Crystal but for some reason anything that is edited in the save game file it dont take hold im guessing the bits need to be changed also?
End of quote


An easier way for solo Eco editing would be to edit a map in Galaxy forge, then give the starting player0 the extra stuff and set the team index to 0 instead of -1. Of course this only does starting values but is easier
Reply #11 Top
Hi i did what ya said to do with the Forge Map Editor,i saved it then i went to go play and as soon as it was done loading it said all Empires were defeated and gave me a choice to either quit or continue playing. :( Hmm something got messed up. Glad i backed up first hehe.

Could it be that i used the ingame editor to make the map? plus i made it before the new patch.
Reply #12 Top
Could it be that i used the ingame editor to make the map? plus i made it before the new patch.
End of quote


No seems others have the problem. Think there is a fix in the Galaxy Forge Tutoral post. One thing you can do is edit one of the premade maps and change the name to XXX 2.galaxy then do it. I have one of the BIG maps I made to play around on that I gave myself about 8mill of the 3 resources, a few fleets of ships and other items. The team index is so you always appear as that player and team 0 is team 1.

Reply #13 Top
Where is the folder located for saved/recorded games. I have downloaded a couple of recorded games off the forum but have no clue where to place them so that the game will recognize them and allow me to watch. Also, if I save a game in the middle and then want to watch it before continuing, can that be done? I apologize if I overlooked this in the manual, but I'm confused. Can anyone help a noobie?

NightReaper
Reply #14 Top
well i know this one isnt about cheating, but just to alleviate anyone's concerns about cheaters, if you change the savegame to give yourself more credits and whatnot, other peoples' savegames wont match up so they wont be able to play your messed up map
Reply #15 Top
Im only doing this in single player and yes I know about sync issues if someone tried to do this for a MP save game. The reason I went this route is cause according to the dev's they said that they didn't make any cheats cause it would be easy to edit the game and I am finding this to be complete BS. With this Bits field, they've pretty much made it near impossible to change any values for your resources.
Reply #16 Top

Hi,

            I'm trying to find a way to edit a save game to build a campaign. In esscence i start the first game, run it to end, even with beat up ships, low or high credits doesnt matter, half my caps dead, that's ok. I just want to take the save game data and see if i can transfer it to a new map, load the ship & stat data and begin the new map (new planet doesnt make a diff either) with all my ships in their beatup, healing,  5 caps left and half my supply gone, and go on.  :)  Run this map to the end and if anything is left, haha, maybe not by then, but perhaps some is left, edit "that" save game and put it into a another new map, and pick up again.

In this way, it might be possible, with a series of small mini-mods to build a campaign where resources and available ships are very limited, and slowly build out. Second mini-mod picking up from the first with higher resources and more ships (about one third under normal) and playing out that scenario. Third mini-mod picks up and continues with third edited save game... etc. By the end of a 7 or 8 series of mini's and edited games i have a campaign of the Vasari/Tec war with Advent hangers on biting at the edges.

It could also go the other way, a massive battle with everything in it (edited and added from a previous save game) and dwindling down until the Vasari and Tec only have a handful (less than 8-10 ships) left, and the Advent with perhaps 1 capital and 3 frigates.

(I wanted to have half-scorched planets and shattered suns and a smokey debris filled system as well, but that is beyond my editing ability now, and this save game editing may be as well... but its a start in the direction i would like to go.)

Anyone have any ideas?  Can you in fact move ship data from one map to another?  Or am i crazy to even hope for it?

Thanks in advance for all the help,

-Teal

 

Reply #17 Top

Teal, you'd probably need a tool to go through the save game file and extract all the fleet information, then export it into a scenario template (txt file) which you'd need to manually insert into the map and then set the scenatio template to Planet X for the player.  If you had a good enough tool, Planet X -the homeplanet- would have a scenario template "DefaultHomeCarryOver", but also the homeplanet would need the defaulthomestart template assigned so colonization occurs, but usedefaulttemplate = false
Your tool would need to transplant the data in the exported txt file to the "DefaultHomeCarryOver" scenario template in the "next" map in the "campaign" while simultaneously updating many fields so the map wouldn't crash to hell and burn.

template
 templateName "DefaultHomeCarryover"
 subTemplates 0
 groups x
 group
  condition
   type "Always"
   param ""
  owner "PlanetOwner"
  colonizeChance 0 or 1
  items xxx
  item "xx"

Good luck

Reply #18 Top

I got it!!

All you have to do is look near the top of that file and find a large number, I found this line:

                    SectorPosition [ 19020.73 61570.27 98878.88 ] Bits=[ 1184143734 , 1198555716 , 1203838832 ]

98878.88 is the largest is the 1st category so I grabbed the bit number 1203838832 as it matches...

 

Next go down to where it says the following for your character (found mine on line 903):

    credits ***** Bits= ****
    metal ***** Bits= ****
    crystal ***** Bit= ****

replace those low resources with the following (or whatever u have found, if it was a higher number):

voila....

    credits 98878.88 Bits=1203838832
    metal 98878.88 Bits=1203838832
    crystal 98878.88 Bits=1203838832

 

Beast Mode!

 

-duckboy81

Reply #19 Top

Templates are over my head SemazRelan, I appreciate the explanation and even the thought, but im not familiar enough with working with them to be any good at it, but i can learn, i suppose i should start spending more time in GalaxyForge and looking at the templates and see how they work and if i can start by changing some of the variables and how they play out. Then of course go from there, crashing and burning and trying it again.  :)

Thank you for the interesting explanation though, it would be interesting to actually pull such a thing off.  :)

-Teal

 

Reply #20 Top

I made up a list of various numbers and their bit values. This makes the adjustments easier, and works for Credits, Metal or Crystal.

100.00 Bits=1120403456

1000.00 Bits=1148846080
2000.00 Bits=1157234688
4000.00 Bits=1165623296
6000.00 Bits=1169915904
8000.00 Bits=1174011904

10000.00 Bits=1176256512
20000.00 Bits=1184645120
40000.00 Bits=1193033728
50000.00 Bits=1195593728
60000.00 Bits=1198153728
80000.00 Bits=1201422336

100000.00 Bits=1203982336
200000.00 Bits=1212370944
400000.00 Bits=1220759552
600000.00 Bits=1225948160
800000.00 Bits=1229148160

1000000.00 Bits=1232348160
2000000.00 Bits=1240736768
4000000.00 Bits=1249125376
6000000.00 Bits=1253513984
8000000.00 Bits=1257513984

10000000.00 Bits=1259902592

Reply #21 Top

In which folder are the saved games?

 

I plaid a single player campaign and used a self-made map which I called "Utul Pax". If I want to manipulate that saved game, where would I find that saved game? I use the Diplomacy Addon.

Reply #22 Top

Hirnsausen,

It is in the hidden folder titled appdata. There are forum posts that explain how to reveal said folder and the root directory from there. Something about control panel, folder options, view and select 'show hidden files folders'.

From there go to start then click on your user name. From there you should find AppData open it. Then open Local. Find Ironclad-sins-save single player and go from there.

I recommend getting a text editor like notepad++ before hand. It's great and even numbers the lines on the left side. With notepad++ you can right click on utul pax and choose said program to open the file. However it is also highly recommended that you search for 'how to edit save files'. As has been noted by others the 'search' via this site is quite reliable. There is a post that will explain how to change a value within user.setting from 1-0 so that saves can then be in text format. Once you have changed this create a new game in your map(start with 1v1) and save it 'test'. Edit test with notepad++ and around the 2400's(line, at least for me) you should see(note player 0 denotes you)

tradePartnerPlayers P
shareExternalVisionPlayers 0
shareInternalVisionPlayers 0
credits 2742.50 Bits=1160472567
metal 83194.88 Bits=1201831281
crystal 76328.36 Bits=1200952366
shipSlots

Just put in whatever variable from the posts above hit the eXit button click yes and you're done.

NOTE you do not need to select file-save or save as for the effect to be recorded. X marks the spot.

Do  not leave spaces in between the lines. once you edit it tens to create a blank line underneath, especially if you copy paste. just put the cursor on the blank line and hit backspace to return the lines to 'congruency'.

Final note, the games tend to run a little bogged when the saves are switched to text format. Weird.

 

orethan