Community
    • Login

    How To Read And Edit ASCII File with HEX Values Inside

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    asciihex value
    5 Posts 5 Posters 94 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Tnega TercesT
      Tnega Terces
      last edited by

      I’m trying to edit the save file for a game I have, but the game Devs wrote their save file in a very smart, and right now very annoying, way. It’s a normal ASCII file with lines for each individual game object and human readable variable names, like “ECharacterStatType::Level” for the PC’s level, but then, instead of an ASCII number for the aforementioned level’s value, it uses Hex values instead. I’ve tried using a regular hex editor, like the standard hex editor plugin, but that wants to treat the entire file as nothing but hex codes and ignores line breaks, instead just always showing 16 hex codes per line and then wrapping to a new line, which makes it harder to read the human readable ASCII in the original file. Is there a way to view the file as an ASCII file with the line returns as intended in the file (so objects with their multiple variable fields are separated on to different lines, and similar variable fields all line up vertically), but show the non-ASCII parts as their actual Hex code values?!? And be able to easily edit those hex code values just as if they were normal text in a text editor?!? I’ve attached a screenshot of the file so that you can see what I’m talking about…Screenshot 2025-11-02 023101.png

      mpheathM Terry RT 2 Replies Last reply Reply Quote 1
      • mpheathM
        mpheath @Tnega Terces
        last edited by

        @Tnega-Terces

        The 1st 4 characters define the format. It is GVAS. 2-way convertors exist to change the format to an editableJSON format or similar. Editing the binary directly might not be good as the 1st 16 lines look like a header that may define data length and other critical information that may make the editing invalid.

        1 Reply Last reply Reply Quote 4
        • Terry RT
          Terry R @Tnega Terces
          last edited by

          @Tnega-Terces said in How To Read And Edit ASCII File with HEX Values Inside:

          It’s a normal ASCII file with lines for each individual game object and human readable variable names

          I totally agree with @mpheath , you are barking up the wrong tree. Just do a google search on the GVAS file format. It is clearly stated that it’s a “binary” file format, in spite of being able to read some text within it. Editing it with any text editor is bound to fail!

          Terry

          1 Reply Last reply Reply Quote 5
          • Ivy_PearsonI
            Ivy_Pearson
            last edited by

            What you need is a hex editor that supports a “hex + ASCII” view, where the left side shows the ASCII text and the right side shows the hex bytes. Tools like HxD, 010 Editor, or Bless Hex Editor let you see line breaks correctly while still letting you edit hex values directly. In 010 Editor, you can even create a template to map the structured fields for easier editing.

            PeterJonesP 1 Reply Last reply Reply Quote 0
            • PeterJonesP
              PeterJones @Ivy_Pearson
              last edited by

              @Ivy_Pearson said in How To Read And Edit ASCII File with HEX Values Inside:

              What you need is a hex editor that supports a “hex + ASCII” view, where the left side shows the ASCII text and the right side shows the hex bytes.

              Oddly, that’s exactly what Notepad++ with the Hex Editor plugin does. And yet, the original poster said that wasn’t sufficient. Why do you think it is sufficient?

              Tools like HxD, 010 Editor, or Bless Hex Editor let you see line breaks correctly while still letting you edit hex values directly. In 010 Editor, you can even create a template to map the structured fields for easier editing.

              Some of those sound promising (like the one with the template), even though the original poster already dismissed standard hex editors as not being sufficient for their needs.

              @Tnega-Terces said in How To Read And Edit ASCII File with HEX Values Inside:

              It’s a normal ASCII file with lines for each individual game object and human readable variable names,

              It’s not an ASCII file. As @mpheath and @Terry-R indicated, it’s a binary file that just happens to have some text encoded as ASCII. But that does not make it an ASCII file. No solution in Notepad++ is going to completely satisfy you, because Notepad++ is a text editor, not a binary editor. And most hex editors aren’t going to be what you want, because they focus on just providing you with the hex, not with a formatted text document that shows the encoded numbers that are represented by the binary bytes that Notepad++ shows you. One that allows templating data structures does sound promising for your needs, but a Notepad++ text editor forum is not the right place to dig into the intricacies of some other hex editor tool (and if that’s the path you want to take, you’ll have to go somewhere else to learn more about the tool that you do choose).

              But I think your best bet is to find a converter for that file format that @mpheath suggested – if it can convert from the binary format to a textual JSON, then you can edit the text-based JSON in Notepad++; since it’s a 2-way converter, then after you edit the JSON, you should be able to go back to the binary format, so that you can use the edited results in your game. That’s really your best bet.

              Assuming that it’s a command-line utility, we could even help you set up the NppExec plugin to allow you to load the binary file, have NppExec call the external converter and show the results in Notepad++, allow you to edit the JSON in Notepad++, and then when you save the file, NppExec could automatically convert it back for you. I have a similar workflow that I played with for encrypting and decrypting files using gpg, and the essential structure of that would work for your needs, just using the GVAS conversion script as the external tool, instead of the gpg executable. Ah, right, I even show one direction in this FAQ, and the same style of script could work for you – so you could use that as the starting point.

              1 Reply Last reply Reply Quote 0
              • First post
                Last post
              The Community of users of the Notepad++ text editor.
              Powered by NodeBB | Contributors