Announcement

Collapse

Please use the Hentai ID thread for all hentai ID requests. Click me for link!

The Identification Thread is Here:

http://www.hongfire.com/forum/showthread.php/447081
See more
See less

AGTH - text extraction tool for games translation

Collapse
This is a sticky topic.
X
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • AGTH - text extraction tool for games translation

    Current AGTH version: 2011.5.9

    Before asking something make sure you've read this first post, guides and searched in this thread.


    Related links

    AGTH home site: http://sites.google.com/site/agthook/

    Guide by mastress: http://blgames.proboards25.com/index...ead=1141106731

    Screenshot guide by fhc: http://www.hongfire.com/forum/showthread.php?t=59189

    Advanced AGTH Video Tutorials by Freaka: http://www.hongfire.com/forum/showthread.php?t=80401

    Itadaki (external toolset for adding furigana (reading) to kanji): http://www.hongfire.com/forum/showthread.php?t=75958

    Translation Aggregator (tool for querying many translation engines): http://www.hongfire.com/forum/showthread.php?t=94395



    AGTH general information

    AGTH is a tool for capturing text from running programs. Main purpose - extracting text from japanese games for translation.

    AGTH requires Windows 2000 or newer NT-based system, x64 and server variants are also supported. Recommended operation system - Windows 2003 and newer (yes, some features won't work on XP). With Vista/Win7 you would likely want to run AGTH with elevated rights or disable UAC.


    Running program under AGTH

    AGTH consists of hook module agth.dll and loader agth.exe.
    To load application - pass its name to agth.exe as command line argument.

    Example for running from shortcut:
    1) Create shortcut for game.
    2) Open properties of created shortcut. In "Target" field will be something like
    Code:
    "C:\Games\Maou no Musume-tachi\twins.exe"
    3) Append to the start of "Target" field full path to where you extracted AGTH, so it will be like
    Code:
    "C:\AGTH\agth.exe" "C:\Games\Maou no Musume-tachi\twins.exe"
    4) Make sure that "Start in" filed hasn't changed after you changed the "Target" and there is space between AGTH and game exe paths.
    5) Run game from this shortcut.


    Before name of game exe you can specify some options for AGTH. Each option must be separated by spaces from both sides.

    Example of running the same game but also automaticaly copy captured text to clipboard:
    Code:
    "C:\AGTH\agth.exe" /C "C:\Games\Maou no Musume-tachi\twins.exe"

    Working with loaded AGTH

    After load AGTH will create its window, where it will show captured text.

    AGTH separetes text into several 'text threads' based on 'context' (to avoid mess from mixing text of game, menu, title...).
    Displayed text thread could be chosen by drop-down list in the upper part of AGTH window. As game runs, new text threads could be found and added to list.

    If you close AGTH window it will not detach it's hook from the running applications, so if AGTH is started again it will continue to hook the text, hook options will be unchaged too.


    Additional features

    AGTH can try to correct locale of programs - useful for running japanese games with system locale set to non-japanese.

    /R option tries to correct locale the AGTH-way - minor visual glitches are possible, but overall program should run like started on system with specified locale.
    /L option works exactly as running program under AppLocale (also this option requires installed AppLocale).

    Both options can be used together.

    AGTH can be used just for fixing locale without any text hooking.
    Example of starting QuickATLAS with locale overriden to japanese (useful in case when you see only '?????' in it instead of characters):
    Code:
    C:\AGTH\agth.exe /L /NH "C:\Program Files\Atlas\QuickATLAS.exe"
    If you can't find useful text - try options /X3 and/or /V with loading by /P

    Recent changes

    2011.5.9
    • Added new type of user hook: Code.
    • Hardware hooks now also work on 32-bit XP SP3.
    • Improved /R override, now it should be able to run InnoSetup installers.
    • Added symbol '◇' to default filtering.
    • Removed user hook type: Hex.

    2011.4.21
    • Added support for LiveMaker engine.
    • Added support for IronGameSystem engine.
    • Updated KiriKiri support.
    • Updated RealLive support.

    2011.4.18
    • ASLR support, can be disabled with ':' at the end of user hook.
    • Improved /R override, just /R performs more aggressive process 'japanization' than /R411
    • Updated RealLive support.

    2011.4.16
    • Locale override support for Win7 (/R option).
    • Internal threading optimizations.
    Attached Files
    Last edited by Setx; 05-09-2011, 05:42 AM.

  • #91
    At http://agth.nm.ru/... it said that this program work best on windows 2003 SP1, is he mean windows 2003 server???

    Comment


    • #92
      AGTH update

      1) New option: /CT[time] - allows to change delay before copying text to clipboad.

      2) New type of hook in /H option: H - display hex values of captured symbols.

      3) In /H option changed meaning of 'data_offset' and 'sub_offset': 4 should be added to values that was used in previous versions.

      Examples for FSN: /HWB8:4@521AE0 and /HWB8:4#1 (don't use ':4' if you don't want to split text based on symbol size).



      ww3master3

      I haven't seen such games, so I can't tell you precise values.

      In general you can try:

      1) Find function (context of AGTH) that has right symbols, but can't capture all the text. This is likely to be GetGlyphOutlineA or GetGlyphOutlineW. (In your case it sems to be GetTextExtentPoint32A.) Use first number of this context as 'addr' parameter (number, not only the first symbol). Also this can give you a hint which type of hook to use - 'A' or 'W'.

      2) Set 'level' to 1

      3) Try 'data_offset' -4, -8, -C, -10, -18, -1C, -20, 4, 8, C, 10, 14, 18, 1C, 20

      4) Try 'level' 2 and 3 with the same set of 'data_offset'.


      mastress

      There is nothing special to solve problem "character's name after the line".
      Try /X option - it will enable all available function hooks. But remember that no text could be extracted if game uses pictures instead of text.


      username777

      Yes. It's the most stable Windows now.

      Comment


      • #93
        Originally posted by Setx
        1) Find function (context of AGTH) that has right symbols, but can't capture all the text. This is likely to be GetGlyphOutlineA or GetGlyphOutlineW. (In your case it sems to be GetTextExtentPoint32A.) Use first number of this context as 'addr' parameter (number, not only the first symbol). Also this can give you a hint which type of hook to use - 'A' or 'W'.
        Ok in case of 0x0040F93C:00000000 what number is used as addr parameter then, 40F93C? And what's here actually telling me whether I should use A or W?
        Also in FSN case, data offset is B8, right? Or is just 8, what's B for then?
        Sorry, too many questions again.

        Comment


        • #94
          They're good questions ww3master3. I'm trying to teach myself how to do this as well and am wondering the exact same thing. Though I think the A or W thing has to do with the name of the process after the 0x0040F93C:00000000 you have above. Like if it is TextOutA or TextOutW, GetGlyphOutA or GetGlyphOutW.

          Currently playing: N/A | Currently seeking: My Requests
          Co-leader of: HF-Bishoujo Games | Member of: (Unofficial) HF-Incest
          My Resources: AGTH Tutorial and H Codes | Bishoujo Game Reviews

          Comment


          • #95
            Originally posted by mastress
            Though I think the A or W thing has to do with the name of the process after the 0x0040F93C:00000000 you have above. Like if it is TextOutA or TextOutW, GetGlyphOutA or GetGlyphOutW.
            Yeah you're probably right, I shouldve noticed that, one question less then.
            Last edited by ww3master3; 03-04-2006, 07:03 PM.

            Comment


            • #96
              Im trying to understand how the application works but everything ive tried has not worked. Can any help me with how to use to program to translate the text for the game Viper CTR?

              Comment


              • #97
                ww3master3
                Yes, 40F93C
                In FSN data offset is B8. But it's very unlikely that you'll find anything meaningful in other game engines around offset B8. (BTW: B8 is hexadecimal number that equal to 184 decimal.)


                Drunken Dragon03
                AGTH works with Viper-CTR perfectly. Just load it with AGTH and select TextOutA text thread. (Everything is described in the first post of this thread.)
                But remember, that AGTH doesn't translate anything - it just extracts text. For translating you'll need something like Atlas.

                Comment


                • #98
                  excuse my n00bness, but
                  can u just re-summarize how to get AGTH to hook Fate/Stay Night?
                  have been wanting to play that game, but I can't seem to understand completely about everything explained......
                  reason: I'm not too familiar with internal Windows System codes, and I'm never good at HEX >.<

                  HF-Typemoon #38 || HF-Hentai #412

                  Comment


                  • #99
                    Anyone got AGTH to work with Muv Luv Alternative? Previous MLs had the 0x1004102A:00000000 "GetCachedFont", but Alternative doesn't.

                    Comment


                    • Ahh ic..okay ive looked around but i cant find a way to obtain the atlas program in order to translate the game text. Can anyone give this complete noob a step by step of using the applications?

                      Comment


                      • AGTH is reading all the japanese with double letters
                        so for example the game would say apple but agth read's it as aappllee
                        I would just want to know how do I stop it from doing that.
                        not4chan... where ass****ing an 11-year-old girl is
                        par for the course, but tickling her is weird and creepy.
                        -Anonymous

                        HF-Hentai Member #52

                        Comment


                        • Originally posted by starwind75043
                          AGTH is reading all the japanese with double letters
                          so for example the game would say apple but agth read's it as aappllee
                          I would just want to know how do I stop it from doing that.
                          /KS[number] - remove 'number' repetition of each symbol (default parameter: 1)

                          When adding this function, don't type the brackets. (ex. /KS2)
                          Calvin: Here's another math problem I can't figure out. What's 9+4?
                          Hobbes:
                          Ooh. That's a tricky one. You have to use calculus and imaginary numbers for this.
                          Calvin:
                          IMAGINARY NUMBERS?!
                          Hobbes:
                          You know, eleventeen, thirty-twelve, and all those. It's a little confusing at first.

                          Comment


                          • Hi.

                            Like some peoeple have reported in this thread, I've tried every switches posted in this thread but still can't get it to work with this game. T_T

                            "Princess which is?" (Pajamas soft)

                            The problem is "missing" characters. AGTH showed the correct text but some characters (mostly in the middle of each sentence) are missing.

                            There are 'two' GetGlyphOutlineA function to choose here.

                            Is it really impossible for this game? ; ;

                            Comment


                            • zephyranthez
                              agth.exe /c /HWB8:4@521AE0 Fate.exe

                              Argas
                              Give me UnivUI.dll from Muv Luv Alternative

                              starwind75043, jlbravo
                              When you see each symbol 2 times - use /KS1 (or /KS), because parameter for /KS is number of symbols to remove.

                              lgmcben
                              Read about /H option above.

                              Comment


                              • 1) Find function (context of AGTH) that has right symbols, but can't capture all the text. This is likely to be GetGlyphOutlineA or GetGlyphOutlineW. (In your case it sems to be GetTextExtentPoint32A.) Use first number of this context as 'addr' parameter (number, not only the first symbol). Also this can give you a hint which type of hook to use - 'A' or 'W'.

                                2) Set 'level' to 1

                                3) Try 'data_offset' -4, -8, -C, -10, -18, -1C, -20, 4, 8, C, 10, 14, 18, 1C, 20

                                4) Try 'level' 2 and 3 with the same set of 'data_offset'.
                                Thank you, Setx.

                                I'd want to try the 4 steps you recommended but I can't set a 'level'.

                                If I attemp to set a level and run the game. The switch will look like this:

                                /HW4@45625A#1

                                The game boot up fine, but as soon as I loaded the saved game(as soon as the text hook function begins its operation, i suppose), Visual Studio.NET prompt me asking if I want to debug and force me to choose between Yes and No.

                                If I choose Yes, the debug windows appear and... (whatever it is happening here, I can conclude that the game is unplayable)

                                If I choose No, the game terminated, so the agth. >_<

                                I tried loading agth with /p option but the result is the same (Visual Studio.NET still come up when I execute agth.exe)

                                (Edited again >_<) : And If I don't set a level, the switch will look like this:

                                /HW4@45625A

                                And the game runs fine (but with the missing characters problem >_<)
                                Last edited by Noriaki; 03-06-2006, 05:18 AM.

                                Comment

                                Working...
                                X