vendredi 27 février 2015

How do I find and change a couple of lines of text within a .sav file (it opens with .txt format) automatically using a batch file?

There's this game, where if you find and modify the save file, you can change your starting weapon. Since it's permadeath and the starting weapon is hardcoded, the only way you get to keep your changes is by having your save file open and every time you die close the game, change the corresponding line within the save file, save it, then open up the game again. This obviously takes time, more than what is tolerable between each playthrough. So I made a batch file that overwrote the save file with a copy that had the same data except for the line of text that indicated what was your starting weapon, so all I had to do when I died was close the game and open the batch:


XCOPY /y C:\modifiedsave C:\originalsave START /d "C:\Games\Nuclear Throne\Nuclear Throne Update 63" nuclearthrone.exe


The problem here was that it overwrote everything in the save file, which made it so any progress I made (achievements, stats, enemies killed etc.) was lost. The only solution to this is changing an individual segment of text within the save file, instead of overwriting it, but since I'm pretty much new to this whole thing (noobish) I have no idea how to do so. This is the part within the save file I want to change (in bold):


DATA


1


1


0


7


1


1


0


7


1


1


0


7


1


1


0


7


1


1


0


7


39


1


0


7


1


1


0


7


1


1


0


7


46


1


0


7


1


1


0


7


1


1


0


7


81


1


0


7


56


1


1


0


0


0


0


0


0


-1


(The numbers in bold are the data values for the starting weapons.) ~~~ So how would I make a batch file (or any simple executable) that replaces all the numbers in bold with a number of my choosing?


Aucun commentaire:

Enregistrer un commentaire