1

I am trying to change the text in some game files using the HxD hex editor.

When I see a sentence in the hex editor, such as Powered by me, this is 13 characters long. I have found that the replacement sentence also needs to be 13 characters long in order to work. If it's not 13 characters long, the game will not load for some reason.

I have added bytes to the file. Now I need to find out how to make it work. How can I make the file work with my added bytes?

1
  • I assume solution to your problem might be related to game you are aiming to - so you better specify it in your question. Commented Apr 5, 2017 at 15:08

1 Answer 1

2

It likely has to be the same length or shorter (e.g. padded with nulls) because of pointers within the file itself. If a game file is expecting a structure or function at index XXXX, and you shift everything by five bytes, then it's not going to work. How to fix it? You would need intimate knowledge of the game file format. Then you could go about revising what else needs to be revised.

As an aside, Windows DLLs keep their strings and dialogs in a separate resource area, and are surprisingly easy to revise using a resource editor!

Sign up to request clarification or add additional context in comments.

8 Comments

Or shorter you say? The file has tons of 0's on the bottom, if I remove about 30 of them, do you think it will work?
No, it would have to be within the space the string occupies, e.g. "Powered by me" could be changed to "Joost Rules__" with the '_' meaning '\x00' or null, or maybe even spaces. You have to make sure everything after the string stays aligned.
Aside from needing intimate knowledge, is there any other way to fix this?
Not really. Some file formats are standardized, and you might be able to use a resource editor. The editor would keep track of all the pointers for you.
@DADi590 If you kept the original length of the string the same, you wouldn't need to change pointers. Optimized code may do weird things, like add to an existing pointer to get a new pointer, or use an offset to an existing pointer, in which case searching and replacing pointers wouldn't work 100%. It doesn't hurt to try anyway.
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.