Important information: this site is currently scheduled to go offline indefinitely by end of the year.

Patrician 3 - .exe and the hex editor [Maybe noob question]

The Original Forum. Game archives, full of resources. How to open them? Get help here.
Post Reply
User avatar
lostprophet
mega-veteran
mega-veteran
Posts: 202
Joined: Wed Apr 07, 2010 7:38 pm
Has thanked: 35 times
Been thanked: 7 times

Patrician 3 - .exe and the hex editor [Maybe noob question]

Post by lostprophet »

Hi again,

So I found out, that the Patrician3.exe (the main exe) has all the English texts in it. I tried to edit it with several hex editors, but when I change the texts (translating it), and save it, the exe says "Patrician3.exe is not a valid Win32 application".

Is there a way to edit the strings in it, avoiding the corruption of the exe?

Thanks in advance.
Hungarian translator | Previous translations: http://lostprophet.hu
User avatar
Ernegien
mega-veteran
mega-veteran
Posts: 160
Joined: Wed Mar 24, 2010 6:27 am
Location: Illinois, USA
Has thanked: 12 times
Been thanked: 158 times
Contact:

Re: Patrician 3 - .exe and the hex editor [Maybe noob question]

Post by Ernegien »

My guess would be that you're changing the length of these strings, which isn't good practice in an executable :P

To answer your question, yes there is a way to edit strings without corrupting the executable. Keep your edits just as long, or smaller, just make sure to add the character delimiter after you're done. If you want to go nuts and change lots of strings around, you'll need to open up the exe in a disassembler and find all references to those strings, throw your new strings somewhere, then update accordingly...
User avatar
lostprophet
mega-veteran
mega-veteran
Posts: 202
Joined: Wed Apr 07, 2010 7:38 pm
Has thanked: 35 times
Been thanked: 7 times

Re: Patrician 3 - .exe and the hex editor [Maybe noob question]

Post by lostprophet »

Thank you for the fast reply. What exactly is a character delimiter?
Hungarian translator | Previous translations: http://lostprophet.hu
User avatar
Ernegien
mega-veteran
mega-veteran
Posts: 160
Joined: Wed Mar 24, 2010 6:27 am
Location: Illinois, USA
Has thanked: 12 times
Been thanked: 158 times
Contact:

Re: Patrician 3 - .exe and the hex editor [Maybe noob question]

Post by Ernegien »

Strings are usually null-terminated by a byte or word of 0's, depending on whether it's ascii or unicode you're working with. They can also sometimes prefixed with an integer value indicating their length, but null-terminated strings are usually more common.
Post Reply