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.

  • Originally posted by ww3master3
    Well again in my 2-year experience Systran's (Google, Babelfish...) translations make the least sense by far, out of three engines. I don't know about vocabulary but it definately doesn't have 'better understanding of sentence structure'.
    Hmm, OK, I defer to your greater experience. But I was consistently finding while playing Fate and UBW that where ATLAS would fail to get a complete sentence and instead output a string of unconnected words with ellipses, I could get something more coherent out of Google Translate.

    Comment


    • Originally posted by zephyranthez
      I still can't hook ANY text with those agth.exe /C /L /M /V /HWB8:4#1 Fate.exe code
      Did you remember to do the rest of it? Remember, when you actually start playing or load your savegame, you have to select GetGlyphOutlineW, then hit Scroll Lock on your keyboard, then click the Fate window to get it to output some more text, then select a UserHookW thread in AGTH. Also when the font size changes you have to select a different UserHookW thread (the second number relates to the font size).

      Comment


      • Yeah, I use GetGlyphOutlineW, turn on Scroll Lock, and get more thext, then try UserHookW.... but it shows all 'EEEEEEEEEEEEEEEEEEEEEEEEEEEE' with no japanese text....... both the UserHookW got the same text.... should I post a screenie?

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

        Comment


        • Ok your all forgetting the /NC that stops the crashing on starting up the application for many users. With /NC I can start fate/stay without locking up my computer. This is an issue with many and I have not had luck with /P to work with the hardware address for the custom userhookW at all.

          agth.exe /NC /L /C /M /V /HWB8:4@521AE0 Fate.exe

          Comment


          • Originally posted by zephyranthez
            Yeah, I use GetGlyphOutlineW, turn on Scroll Lock, and get more thext, then try UserHookW.... but it shows all 'EEEEEEEEEEEEEEEEEEEEEEEEEEEE' with no japanese text....... both the UserHookW got the same text.... should I post a screenie?
            Sure.. though I don't know if I'll be able to help, maybe the author of AGTH might have an idea about it.

            Comment


            • Originally posted by molitar
              Ok your all forgetting the /NC that stops the crashing on starting up the application for many users. With /NC I can start fate/stay without locking up my computer. This is an issue with many and I have not had luck with /P to work with the hardware address for the custom userhookW at all.

              agth.exe /NC /L /C /M /V /HWB8:4@521AE0 Fate.exe

              it also didn't work.... catch double chars for GetGlyphOutlineW and shows the same 'EEEEE' on UserHookW....... I'll post a screenie, plz help if possible, thx



              is screenie of other parts needed too?

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

              Comment


              • zephyranthez - the second number (the one after 0x00527D95) shouldn't be zero, because it relates to the font size. There are two different GetGlyphOutlineW threads if I recall correctly, have you tried UserHooking the other one?

                Comment


                • I tried both GetGlyphOutlineW and both UserHookW, but the result is the same. btw how do u change the second numbers there? or better saying how do u manipulate those numbers?

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

                  Comment


                  • I'll write a GUI for AGTH tomorrow.
                    Daiteikoku English Translation v0.35
                    [Progress: 45.508 / 130.000 lines (~35%)]
                    [Patch v0.40: 2.264/ 6.500 lines]

                    Get it here at Hongfire !

                    Comment


                    • zephyranthez, you may need to do a few more scrolling with glyphoutlineW before a UserHookW shows up with a 00000017 that you need to be using. I once had over 6 UserHookW but usually you have 2-4 of them and you select the 00000017 for the size.

                      emperorzom, Great glad to hear someone will write a gui for agth

                      Comment


                      • molitar, I don't quite understand by what u mean scrolling..... the text from the game?
                        I tried clicking on the game for some times and still don't get the UserHookW 0000017 thing..... I still only got 000000 for UserHookW
                        forgive the n00bness about these thing >.<
                        Last edited by zephyranthez; 03-13-2006, 09:16 AM.

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

                        Comment


                        • I wonder if it could be something to do with the dbghelp.dll that the author mentions in the description of the /H switch? zephyranthez, If you're on Windows 2000, XP or 2003 you could try installing the Windows Debugging Tools which should include the latest version of that dll.

                          Comment


                          • General notes:
                            1) When you have problems always ensure that you have the latest version of AGTH.
                            2) Current version of AGTH should be executed by 'agth.exe' and not only 'agth'. Otherwise you may get 'Error: can't load library agth'.


                            lgmcben
                            When you use '@addr' parameter of /H you must know the exact memory address. (When it is set incorrectly it will crash running program.)
                            When you don't know the exact address to hook - use method of selecting text thread and turning on ScrollLock.


                            danj2k
                            Reading configuration information from a file, checking the version number of the game executable and other similar things could be (and should be) done as external program.

                            Could you send me FSN save just before it would crash? Does game crash even with /NC?

                            When AGTH can't find correct dbghelp.dll it'll just won't install user hook with '#level'. It doesn't needed for anything else.


                            lgmcben
                            'Missing characters' in the 'GetGlyphOutlineA' is not a problem of AGTH - it's the way the game works. To get full text you can try setting user hook with /H.


                            molitar
                            You don't need /M and /V for FSN.
                            I think that most of your problems caused by 'tm.exe', that is some kind of protection software that comes with FSN. It sometimes crash FSN on startup even on my machine (but after another run of game it works fine).
                            You get much worse errors probably bacause you use WinXP which is much less stable than my Win2003 SP1.

                            I've already written about splitting text of FSN (threads :00000017 and :00000015)!!! If you don't want to split text based on font size write /HWB8@521AE0 instead of /HWB8:4@521AE0


                            zephyranthez
                            You are using old AGTH or different version of fate.exe
                            If it is different version of fate.exe than you can try /HWB8:4#1 with ScrollLock as descibed above.


                            Argas
                            With your version of UnivUI.dll you can try /HA0#4 set with ScrollLock on 'GetGlyphOutlineA' text thread.

                            Comment


                            • Nice Tool , i'm a noob in this things, and i was about to star asking how the get one game running , but after a few hours(4 to be exact) finally i get Pia Carrot3 Working but i can't load Quic altas From the same shortcut as AGTH, if i remember i use /C /P to run the AGTH and run the game and quickAtlas separate, but i hope this work well , if i have any questions i can post them here or is other place to post them?

                              P.D. What a nice work congratulation

                              Comment


                              • Still doesn't hook all the text, but definately a huge improvement from before. Thanks!
                                Last edited by Argas; 03-13-2006, 05:31 PM.

                                Comment

                                Working...
                                X