The text translation is associated with the Font via the "text encoding" String in the .EXE.
(but not for FR, there is a special tricky situation, and String replacement won't work)
Many European languages have minor letter differences from the base EN.
They even work on EN Pharaoh.exe , but have a problem with jumping letters with diacritics (umlauts ä, ö, ü and others).
By replacing the "text encoding" string in the .EXE - it is adjusted to another language.
################################
Pharaoh v1.x (without Cleopatra)
Pharaoh v2.x (+Cleopatra)
0x?????? - v1.0 (EN,base)
0x175994 - v1.1 (EN,base)
0x175964 - v1.2 (EN,base)
0x1DF49C - v2.0 (EN,base)
0x1E049C - v2.1 (EN,base)
0x174CC4 - v1.0 (RU,1C)
0x1E051C - v2.1 (PL,Unknown)
0x29EE44 - v2.0 (FR,Unknown)
For another version, Offset will be different, but it can be easily found by "555 556 565 655".
This works for the entire series of games Caesar3 + Pharaoh + Zeus + Emperor.
This way you can easily change Translations + Fonts.
Pharaoh.exe
EN String
Lenght:240 bytes (+16 with "555 556 565 655")
Lenght:224 bytes (without "555 556 565 655")
START: 00 3F 40 00
..
FINISH:36 35 35 00
Offset 0 1 2 3 4 5 6 7 8 9 A B C D E F
001E0490 00 00 00 00 73 61 76 65 5C 00 00 00 00 3F 40 00 save\ ?@
001E04A0 00 41 00 4A 43 44 42 46 4E 45 4F 4D 3E 35 36 37 A JCDBFNEOM>567
001E04B0 38 39 3A 3B 3C 3D 48 49 00 47 00 4B 00 1B 1C 1D 89:;<=HI G K
001E04C0 1E 1F 20 21 22 23 24 25 26 27 28 29 2A 2B 2C 2D !"#$%&'()*+,-
001E04D0 2E 2F 30 31 32 33 34 00 63 00 00 50 00 01 02 03 ./01234 c P
001E04E0 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 10 11 12 13
001E04F0 14 15 16 17 18 19 1A 00 00 00 00 00 65 61 56 54 eaVT
001E0500 51 53 01 67 81 55 57 59 6E 5D 69 1B 6A 67 6D 60 QS g UWYn]i jgm`
001E0510 5D 5F 64 63 19 7B 6B 00 6F 00 00 00 52 7F 5E 62 ]_dc {k o R ^b
001E0520 66 6C 01 0F 80 00 00 00 00 00 00 00 82 00 00 00 fl Ђ ‚
001E0530 00 00 00 00 00 00 00 00 00 00 00 80 72 70 71 71 Ђrpqq
001E0540 69 83 6D 65 74 6A 73 73 77 75 76 76 00 6C 7A 78 iѓmetjsswuvv lzx
001E0550 79 79 7B 00 84 7E 7C 7D 6B 33 00 68 53 52 54 51 yy{ „~|}k3 hSRTQ
001E0560 51 85 67 65 57 56 58 55 5B 5A 5C 59 00 66 5F 5E Q…geWVXU[Z\Y f_^
001E0570 60 60 5D 00 86 63 62 64 61 19 00 19 35 35 35 00 ``] †cbda 555
001E0580 35 35 36 00 35 36 35 00 36 35 35 00 01 00 00 00 556 565 655
001E0590 0A 00 00 00 64 00 00 00 E8 03 00 00 10 27 00 00 d и '
Using any convenient HEX editor, you can find the "text encoding" string in the native .EXE and transfer it to the new .EXE;
Or even you can use "certutil" built into Win7,Win8,Win10;
Press "Win + R" or Start => Search => cmd.exe
Go to the game folder
cd /d D:/games/Pharaoh
Create HEX-dump Pharaoh.exe
certutil -f -encodeHex Pharaoh.exe HEX.txt >nul
We open HEX.txt in a regular notepad, quickly look for the offset thanks to "555 556 565 655", and change 240 HEX cells to new ones.
(the rightmost column has no effect, it's just a visual representation of HEX=>ASCII so that you at least roughly understand what's in the HEX cells)
Save in notepad and run the inverse transformation.
certutil -f -decodeHex HEX.txt Pharaoh_new.exe >nul
We start the game with a new file and check!
##########################
I had to deal with anomalies with incorrect letter height and width.
(code The text encoding string was already correct)
Probably there is a table for correcting the height of the letters.
(and in EN .EXE it is set to zero or aligned to one height)
Correction applied to offset values obtained from _Fonts.sg3
Accordingly, there are fonts with aligned letters and vice versa
I keep searching
I am researching here
(use GoogleChrome for auto translate)
steamcommunity . com/sharedfiles/filedetails/?id=2748181836