Star General exe - translation of game menu text (English-Polish)

Guten Abend Gast. Schön, dass Du hereinschaust! Einen angenehmen Aufenthalt wünscht das CompiWare-Team.
  • Hi everyone! Huge apologies for creating topic in English, but my German knowledge is veery basic and I didn't want to make every reader upset with my low level German.

    I was recently reading the following topic:

    Thpwg
    11. Februar 2021 um 06:17

    In hope it could help me in my plan to make fan-made translation for Star General game. Quite a lot of text is placed in easy to edit files (unitdata + ebattle), but unfortunately, important part of menu/interface is "inside" exe file (speaking about Windows version, from gog.com).

    I've tried to use the recommended IDA and HexEd. However I admit that I probably did not understood crucial parts of the guide from the linked topic (probably either my lack of technical knowledge...or poor German knowledge).

    I would like to try to split the process on "parts" and have hope, that one of forum users could advise me, if I'm doing right or wrong.

    I.First step - extracting all text for translation (and translating it).

    1.First, I was trying to localize fragment with parts to translate. I think that it is contained in following fragments:

    00559740-beginning

    005614A0 - end

    I know that end has caught a bit of German word, but just in case I wanted be sure, that I caught entire segment and I won't make any stupid mistake.

    2.After matching all this fragment, I clicked right mouse button and choose the option "save to file" and saved it as POL.dll.

    3.Now I understand, that I need to basically translate this stuff, in hex editor (for example HexEd)? And save those changes after translating (in the created POL.dll)?

    Einmal editiert, zuletzt von PoooMukkel (4. September 2023 um 08:35) aus folgendem Grund: Added screenshots into the post.

  • BumbleBee 3. September 2023 um 19:24

    Hat das Thema freigeschaltet.
  • Hallo! Ich versuche meine Anfrage in die Deutche Sprache ubersetzen. Entschuldigen fur alle Fehler.

    Ich mochte Star General von Englisch aus Polnisch ubersetzen. Leider befindet sich der größte Teil des Textes in der exe-Datei (STARGEN_EN.EXE, Windows version von GOG.com)

    Ich habe IDA und HxD Hex Editor installiert. Ich habe auch diese thread gelesen:

    Thpwg
    11. Februar 2021 um 06:17

    Aber ich Ich verstehe die wesentlichen Punkte nicht.

    1.Wie soll ich die texte fur Ubersetzung finden und exportieren? ich denke, dass heir ist die Anfang:

    00559740-Anfang

    https://www.compiware-forum.de/attachment/61157-jssk6e3-webp/

    005614A0 - Ende

    https://www.compiware-forum.de/attachment/61158-cu4er0u-webp/

    ist das Richtig?

    2.Wie soll ich exporterie diese Text? Ich habe den Text ausgewahlt und eine option "save to file" geklickt (wie "POL.dll").

    3.Wie soll ich ubersetze diese Text? Soll ich text-part mit HxD Hex Editor ubersetzt? Oder andere Programme (und wie)?

    4.Das schwerigste - Wie kann ich einen übersetzten Teil zur Exe-Datei hinzufügen? Ich weiss, dass Ubersetzung wurde hat andere Textlange, so wie kann ich Polnische worte (statt Englisch worte) zugeben?

    Der vierte Punkt ist für mich der schwierigste - ich habe linked thread gelesen, aber diese Part war fur mich unverständlich.

    Danke sehr fur Hilfe!

  • Kleine Update von mir - Ich habe die DLL teilweise ubersetz. Mit andere Anfang und Ende Adressen (

    00559740 - Anfang

    005652D0 -Ende)

    Ich habe grosse part, mit Englisch und Deutsch texte, aber Ich ersetze nur den englischen Text durch Polnisch.

    Ich habe auch Ich habe die Start- und Endadressen im CFF Explorer gefunden (Screenshots).

    Jetzt möchte ich diese teilweise übersetzte Datei überprüfen. Aber ich weiß nicht, wie ich es „montieren“ soll. Ich habe „Header“ (Daten) als .polish hinzugefügt und die geänderte Exe-Datei (im Anhang) gespeichert. Aber diesen Teil verstehe ich nicht: Use now Bintext for the new string Memory Position and replace it with IDA.

    Was muss Ich in IDA gemacht und wie?

  • Now, the easy part is done. The last step is linking the Polish translation to the right position. But first, the Relocation must be stripped from the EXE. Lucky, there are some tools on the web like StripReloc. Now, modify the EXE is much easier.

    For the right position, in this case x32dbg (part of x64dbg) is better than IDA.

    1. Open STARGEN_EN.EXE with x32dbg, press the Arrow "Run" until Module "stargen_en.exe" is loaded.

    2. Press "A" symbol (Search for Strings)

    3. Search for "Battleship" and double click

    4. Right click => Follow in Dump => stargen_en.00556c08

    5. In Dump 1 => Right click => Address

    6. Now, you can see the text in Dump 1

    7. You need your polish mem position from bintext.

    8. In x32dbg in Dump 1 double click on Value and change the first entry from 559740 to 68B000

    9. You can see "Battleship" changed to "Pancernik"

    10. Congratulation! Your first entry is now linked. ;) Save your work under File => Patch file.

    Star General_PL.zip

  • Thank you so much for help!

    Do I understand correctly that every "phrase" (so name of unit, description etc) has to be manually "replaced" in the same manner?

    I will now try to use this program as you've described to test on my own the whole process)

    I'm very very grateful for directing me! (by the way, would you be interested, as my humble token of appreciation, in GOG key for Star General? If yes, I would gladly send it for you via PM - just don't know if I can do it on this forum without being accepted to friends list)

  • Sorry, seems like my text was completely "eaten" in previous post, don't know why. Here it is:

    Ok, I think I was able to reproduce step-by-step whole process,but at the end I have this problem - when I swap the value, I don;'t have anything in the "comment" section. It's just empty.

    I also had something unusual at the beginning - when I'm opening the file, it never gets to stargen_en.exe, it's always in module ntdll.dll and showing me info about "exception breakpoint". To make it "go" to the stargen_en.exe", I have to go to "breakpoints" section, and click on the only available position - only then I'm "moved" to the adequate module. is this right, or I did something wrong?

    Also - I wanted to ask how did you generate so great looking text file, is it based on PL.dll? If yes, how can I prepare such file?

  • Sorry, seems like my text was completely "eaten" in previous post, don't know why. Here it is:

    Dein letzte Betrag enthielt Links auf andere Internetseiten. Neunen Benutzer ist es nicht erlaubt Links zu posten und der Beitrag muss vom Team freigegeben werden. (Die Links sind im Zitat von Zyankali enthalten.)

    Übersetzt mit DeepL:

    Translated with DeepL:

    Your last post contained links to other websites. New users are not allowed to post links and the post must be approved by the team. (The links are included in the quote from Zyankali).

  • You're in Module Ntdll.dll.

    Press the Arrow () and you will get into STARGEN_EN.EXE.

    The Breakpoint in Ntdll.dll is normal. You can disable the System Breakpoint in the preference menu (Options => Preference => uncheck "System Breakpoint")

    Also - I wanted to ask how did you generate so great looking text file, is it based on PL.dll? If yes, how can I prepare such file?

    BinText
    www.majorgeeks.com
  • Ok, again, sorry for that.

    Yes, I've tried with that arrow - but I'm never "moved" to STARGEN_EN.exe in this way, it every time takes me to NTdll.dll. Only after I used "breakpoint" I could go to "exe" part.

    But probably the bigger problem in my case is, that by some reason when I'm "swapping" the values, it doesn't show me the new ones - as shown on the screenshot, I've swapped first three occurences of Battleship on values for "Pancernik" and instead of new text, it shows me empty fields in "comment" section.

  • Did you create your own EXE? Maybe all memory positions are different.

    I've tried now on the one you've attached in the primal post (in zip package). But when I'm opening it, I can't search for any text string (like with names of ships), whenever I'm searching with that small "A" icon, it doesn't show me any results.