i Need help with a Project i have! I wanna interact with a data file from a Game on the Computer the Problem is, i can't Edit any Files. For example, a Character File has its own Special .dat so i can't Change the Texture from it.
Thats why i Need a Converter to Change the file into something else so i can interact with it the same is with stages so i can Change the stages via. Level Editor i Programm. Is there any tutorial of how to create such Converter or am i wrong here.
if you know the file's format, you create a structure that holds the fields and pull them in. you need to know its endian format, if its nonnative to your machine, that matters.
for example if you had a bunch of bytes 00 ff ab cd ef 12 34 00 ... that could be a byte and a string, or a pair of 16 bit integers and a string, or any of a gazillion other combinations.
If you are trying to reverse engineer it, a GOOD hex editor is the key. Open the file with that and mouse over any byte, and you will get its value as a c-string, integer formats (1,2,4,8 bytes listed usually), and its float and double values (to some few digits of precision). This is very difficult; often you can only find the location of a few key values, but not understand every byte. That is OK, if the key values let you hack what you wanted to :)
at a guess, you are thinking wrong. I would think this kind of program would read the file in, populate the screen with the values you know and care about, let the user edit them in your program, and then write that back to a file of the same type and replace the existing one with your new data (make a backup of the original in case you mess it up).