[Help wanted] How to read game_data.sav file in C#

Julianvs

Discord: TheDevJulian#0001 && #JusticeForCalensi
Aug 5, 2020
42
17
Hi,

I've been trying to make an console application which reads the game_data.sav from The Legend of Zelda - Breath of the Wild. The only thing is I am having troubles because I simply don't know where/how to start and how the file is working with getting data.

There is a well known save-editor written in JavaScript ( ) but I don't know how to understand the code since JavaScript and C# are completely different files.

I hope some people can help me telling me how to read it or how it does work.
 

Morohara

Member
May 18, 2020
92
55
Save data for games in majority of cases are saved in hexadecimal so; 1a 6f 45 40 ect.

All save editors do is alter the bytes. Let's say a tutorial for a game is 1a and if completed tutorial it would change to a 1b the game would call on the save data and the portion of code and from the byte change it would know the tutorial is completed. A great example of how changing the hex code was a famous voting error.


Reading that all though nothing to do with what you may be asking but it may aid you in understanding how a single change in a byte can result in a lot of changes. All a save editor does is simply change the byte information which is also how the program cheat engine works all the program does is edit the RAW data.

You could use the int.32parse method to alter the hex but you would only get an integer which wouldn't be much of a help to you either.

Also depending on the game and its original contents there's something called a checksum, this basically checks byte information to make sure that there isn't any errors in the code and if you get the hash wrong the save data file won't work, which is why there's not really a universal save editor due to each game saving in a different way. (dependant on the console and how the game chooses to save.) I've added a picture of what a checksum might look like, the second picture added is what happens when the original text is altered (one character was changed.)

A bruteforce sort of way would be comparing the hex of two saved files but that may be slow and tedious.

Hope I helped in your understanding of game save editing.
 

Attachments

  • download (2).png
    download (2).png
    7.6 KB · Views: 7
  • download (3).png
    download (3).png
    15 KB · Views: 8

Users who are viewing this thread

Top