@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.