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.

  • #76
    the link to get agth is not working...

    Comment


    • #77
      does anybody have already found a good configuration for fate/stay night?

      I mean /c /v /x etc... ( what does they mean anyway) I only know that /c is for copy to the clipboard but /v /x and in /P how can you get the PID if it changes everytime you start the proccess, and what does /p mean? what is their function??? .
      Don't look behind, don't look to your sides only look forward.....
      furimukanaide, tonari ni minaide, mae dake wo mite....

      Comment


      • #78
        AGTH update

        1) New option: /NS - don't use subcontexts. Useful when you need to capture multicolor text in one text thread.

        2) New option: /H{A|W}[data_offset][:addr][#level] - set additional hook.
        Very powerful option. Allows you to set hook on any address and even on function that some call levels upper then specified address. Can solve problems like 'pyramid problem', 'missing characters' (font caching), and maybe even allow to capture text from games where AGTH can't find anything useful automatically.

        A or W - type of hook: ASCII or Unicode
        data_offset - offset of symbol to capture. Negative values (from -6 to -20) refer to data in registers, positive (from 0) - to stack parameters. Usually useful only values that are multiple of 4 (for example 0, 4, 8, C, 10, 14... and -8, -C, -10...)
        addr - base address of hook. If unspecified you can set it in runtime by selecting text thread and turning on ScrollLock.
        level - number of levels to trace up the stack. Useful values: 0-3. Nonzero values require new dbghelp.dll and can be used only when 'addr' unspecified or set to one of text threads.

        Example for Fate/Stay Night:
        1) /HWB4:521AE0
        or
        2) /HWB4#1 , then select GetGlyphOutlineW text thread (it'll appear when the game will start to write text), turn on ScrollLock, make game write some more text

        In both cases you will get [UserHookW] text thread with perfectly captured text.
        Second way may also work with some other games on the same engine.

        Comment


        • #79
          Originally posted by Setx
          turn on ScrollLock
          Pardon my ignorance, but what does ScrollLock do in this instance?

          Comment


          • #80
            Yo Kita, I've got Gadget working on AGTH! It didn't work initially but I managed to fix it up after awhile...

            SetX does this mean FSN is fully supported by AGTH now =]. Awesome!

            Comment


            • #81
              Just a quick update before bed:

              Gadget works perfectly. 1.03 patch with noCD. I don't dare try to find a 1.06 patch and noCD, since 1.06 always crashes with some sorta sound error *and* the last time I went looking for NoCDs I got a trojan that wiped my HDD for me.

              But yeah, it works great.

              Comment


              • #82
                I can't get Gadget to work with AGTH at version 1.03 actually. At least 1.00 works fine, and I'm not missing out on that many bugfixes.

                Comment


                • #83
                  Originally posted by Setx
                  AGTH update

                  Example for Fate/Stay Night:
                  1) /HWB4:521AE0
                  or
                  2) /HWB4#1 , then select GetGlyphOutlineW text thread (it'll appear when the game will start to write text), turn on ScrollLock, make game write some more text
                  Well that FSN example doesn't work for me. With /HWB4:521AE0 game immidately shuts down after it starts, and with /HWB4#1 I get program error from tm.exe.
                  And I'm using proper AGTH shortcut method, so that's not the problem.

                  Comment


                  • #84
                    KiTA
                    ScrollLock is used here to tell AGTH proper time of installing user hook.

                    ww3master3
                    /HWB4:521AE0 works only in one version of Fate.exe, so if you have different version - it will not work. It is normal.

                    /HWB4#1 should work in any case. It will not work only in case of major game engine update, but that is hard to believe.
                    Remember to turn on ScrollLock only when you selected GetGlyphOutlineW thread in AGTH (not at the start time).

                    tm.exe is some kind of protection in FSN. Try attaching AGTH in runtime by /P option.

                    Comment


                    • #85
                      Originally posted by Setx
                      /HWB4#1 should work in any case. It will not work only in case of major game engine update, but that is hard to believe.
                      Remember to turn on ScrollLock only when you selected GetGlyphOutlineW thread in AGTH (not at the start time).
                      Wonderful! Fate/Stay night is almost perfect now! The only remaining problem is that the furigana get included in the outputted text, and there are sometimes linebreaks that shouldn't be there.

                      Comment


                      • #86
                        AGTH update

                        1) New option: /NC - don't attach to child processes.
                        Can help in some cases when game with AGTH crashes at startup.

                        2) Modified option /H: /H{A|W}[data_offset][:sub_offset][@addr][#level]

                        sub_offset - offset to data for subcontext information

                        For example, if you want to split text in Fate/Stay Nigth based on symbol size use /HWB4:0@521AE0 or /HWB4:0#1


                        danj2k
                        Linebreaks should be fixed by setting text speed to maximum.
                        For mixed furigana I've added feature to split text of FSN based on symbol size.
                        It it perfect text extraction now? ^_^

                        Comment


                        • #87
                          Originally posted by Setx
                          AGTH update

                          1) New option: /NC - don't attach to child processes.
                          Can help in some cases when game with AGTH crashes at startup.

                          2) Modified option /H: /H{A|W}[data_offset][:sub_offset][@addr][#level]

                          sub_offset - offset to data for subcontext information

                          For example, if you want to split text in Fate/Stay Nigth based on symbol size use /HWB4:0@521AE0 or /HWB4:0#1
                          Ahhh, it finally works now with new 2006.3.2. version and /NC option, or what I use is /C /NC /HWB4:0@521AE0 and then scroll to [UserHookW] thread once game starts. Thnx. Guess that tm.exe was problem in my case.

                          Comment


                          • #88
                            Originally posted by Setx
                            danj2k
                            Linebreaks should be fixed by setting text speed to maximum.
                            For mixed furigana I've added feature to split text of FSN based on symbol size.
                            It it perfect text extraction now? ^_^
                            Yes! Thank you very much for your quick response

                            Comment


                            • #89
                              Originally posted by Setx
                              AGTH update
                              A or W - type of hook: ASCII or Unicode
                              data_offset - offset of symbol to capture. Negative values (from -6 to -20) refer to data in registers, positive (from 0) - to stack parameters. Usually useful only values that are multiple of 4 (for example 0, 4, 8, C, 10, 14... and -8, -C, -10...)
                              addr - base address of hook. If unspecified you can set it in runtime by selecting text thread and turning on ScrollLock.
                              level - number of levels to trace up the stack. Useful values: 0-3. Nonzero values require new dbghelp.dll and can be used only when 'addr' unspecified or set to one of text threads.
                              Sorry but can you elaborate more on this.
                              For example I'm having game with 'missing characters' problem. Same text (with missing characters) appears in two threads
                              0x0040F93C:00000000 GetTextExtentPoint32A
                              0x0040FA21:00FFFFFF TextOutA
                              When I start AGTH&Game with /X option I get another thread (with right text output) but this time with 'pyramid' problem
                              0x015A1C78:00000000 lstrlenA
                              Can I get any 'hints' out of this what should I be using for data_offset/addr/level?

                              Comment


                              • #90
                                I have a small question, since I'm not very good with programming lingo.

                                I'm playing a game where it hooks the dialogue and then the character's name after the line. Not that this is a big deal, but I was wondering if there is an option I can use to correct this?

                                Also, I have a few games (ones made by Koei) that aren't able to hook the in-game text. All I get are WideCharToMultiByte or MultiByteToWideChar which don't have game text. Adding /v listed more, but still none hooking game text. I went ahead and tried instead loading the game using /p and /v but all I was able to get there was ExtTextOutW which only displayed the game name from the top of the game window over and over. Still not able to grab game text. Is there something I should try, or should I sum it up to the game using some weird programming?

                                Just wanted to say you guys are awesome. This is so much better than O!TH that I'm just floored.
                                Last edited by mastress; 03-04-2006, 12:27 AM.

                                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

                                Working...
                                X