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.

  • Well, I finally managed to finish Fate/Stay Night, and installed Fate/Hollow Ataraxia, but it seems the same settings don't work for HA. I used this:

    Code:
    agth.exe /C /Pxxxx /HWB8:4#1
    (where xxxx was replaced with the PID) and then did the scroll lock thing, but while the GetGlyphOutlineW shows the text with doubled characters, the UserHookW threads just show EEEEEE like in zephyranthez' case.

    Comment


    • now we are stuck in the same problem >.<
      what is PID? I still got no clue on how to run agth on my fate.exe either.... in fact, I don't even know what commands are available and what are their purposes >.< need explanation in..... easier words >.<

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

      Comment


      • Originally posted by zephyranthez
        now we are stuck in the same problem >.<
        what is PID? I still got no clue on how to run agth on my fate.exe either.... in fact, I don't even know what commands are available and what are their purposes >.< need explanation in..... easier words >.<
        PID = Process ID, it's a number you get from the Task Manager so that AGTH can attach to the game after it's loaded.

        This EEEEE problem seems to be related to the "offset" part of the /H switch, I'm fiddling with the options a bit to see if I can get it working. Basically, the "B8" after the /HW is a number in hexadecimal, and it seems like you need to fiddle around with it adding or subtracting multiples of 4 (you can use Windows Calculator in Scientific mode to do hexadecimal).

        Comment


        • @Setx with regard to Hollow Ataraxia -

          /HWB4:4@528E30#1 works partially, but I get doubled characters in the normal size thread and random symbols in the furigana thread.
          Last edited by danj2k; 03-22-2006, 05:50 AM.

          Comment


          • Just got back from a long trip. I am glad to see this get stickied.
            "It's not magic Michael, it's an Illusion!"

            Comment


            • Setx > Pardon, but is there anyway to get AGTH to hook Baldr Force's text?

              Originally posted by Setx
              Argas
              With your version of UnivUI.dll you can try /HA0#4 set with ScrollLock on 'GetGlyphOutlineA' text thread.
              I tried this, but the game crashes the moment the game starts/loads text with scroll-lock on...What's wrong?

              We should all have the same UnivUI.dll, yes? Just to be sure, mine is 384kb in size.
              Last edited by Kazune; 03-22-2006, 01:58 PM.

              Comment


              • I have Pia Carrot 3 and Tsukihime game and works perfect! You are a genius! I love you!
                Very thanks!
                added REPUTATION points!
                ...

                Comment


                • I re-read some past posts, and now I got a question:
                  for /H function:
                  we use /H<data_offset>:4<sub_offset>?
                  what are data offset and sub offset? If I understand some more of AGTH Functions I might be able to do some experimenting on some games too

                  [forgive the n00bness >.<]

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

                  Comment


                  • Originally posted by zephyranthez
                    I re-read some past posts, and now I got a question:
                    for /H function:
                    we use /H<data_offset>:4<sub_offset>?
                    what are data offset and sub offset? If I understand some more of AGTH Functions I might be able to do some experimenting on some games too

                    [forgive the n00bness >.<]
                    actually it's /H{A|W}<data_offset>:<sub_offset> I think. A stands for Ascii and W stands for Wide (meaning wide characters i.e. unicode) and corresponds to the letter at the end of the function you're trying to hook (in our case it's GetGlyphOutlineW so we use W). as far as the data offset and sub offset are concerned........ unfortunately I am in the same boat as you, I don't really know what they do. I think it should be possible to run both Fate/Stay Night and Fate/hollow ataraxia with the current version of AGTH (they are using the same script engine after all), it's probably just a matter of finding the right settings to use. Unfortunately since the settings can only be set on the command line, that means you'd have to load it up, check if it works, close it down, change the settings, load it up again, etc. and given the range of possible settings it would take a while to go through all of them.

                    Comment


                    • danj2k
                      Doubled characters are fixed with /KS
                      ':suboffset' is optional. Don't use it if you don't know that you are really need it.
                      Settings can only be set on command line, but that doesn't mean that you have to restart the game. Just close AGTH and rerun it with /P.

                      Comment


                      • Originally posted by Setx
                        danj2k
                        Doubled characters are fixed with /KS
                        ':suboffset' is optional. Don't use it if you don't know that you are really need it.
                        Settings can only be set on command line, but that doesn't mean that you have to restart the game. Just close AGTH and rerun it with /P.
                        Right, but if I simply "fix" it with /KS, doesn't that mean I'm going to be stuffed when the font size changes to 0x15 like it does in Fate/Stay Night for e.g. flashback scenes? I'll try it without the suboffset though.

                        EDIT: Weird. It seems to pick up all the font sizes except furigana in the one thread, if I use /HWB4@528E30#1. Why is that?

                        EDIT 2: Ok, it falls down when there is a word with dots over the kana, which results in stuff like: マ・マ・ス・ス・タ・タ・ー・ー・ when it should be just マスター

                        EDIT 3: It also doesn't work with choices, these are in a different style in Hollow Ataraxia, they do show up in the GetGlyphOutlineW thread though.
                        Last edited by danj2k; 03-23-2006, 04:43 PM.

                        Comment


                        • Originally posted by LemonRuMBler
                          Hi, I'm hoping somebody can please help me with my repetition problem.

                          I'm already using the KF switch (but at default settings), mostly because I don't completely understand how to use the switch or rather what numbers I need to change it too.

                          I running agth with just /c /kf for the example pic shown below.

                          If anybody can help me with a good "kf number", fix or suggestion for this problem I'd be very grateful.

                          Thanks
                          What you have there is the "pyramid problem". The solution seems to be, instead of trying to hook GetTextExtentPoint32W, hook GetGlyphOutlineW and use the /H switch. What game is it that you're trying to hook?

                          Comment


                          • Originally posted by LemonRuMBler
                            Thanks, just tried that and...no almost but...no. So I read back into this thread and went over the instructions for using the new /h.

                            Its certainly not easy...but I'm trying and so far not much seems to do it...

                            It SEEMS to work for shorter sentances but the long ones...well I've attached a picture below. As you can see it seems to leave out characters from the text.

                            Suggestions? Oh the game I'm trying to hook is linked below, released just today!

                            http://www.lilith-soft.com/black/product27.html
                            Ooh, looks hot!

                            As far as your current problem is concerned, once you've hooked GetGlyphOutlineW using the /H switch, you should see some UserHookW threads appear in AGTH. Do you see any of those, and if so, do any of them have anything useful looking in?

                            With regard to the /H switch itself... I must confess I don't know whether there is any way other than trial-and-error to work out what settings should be used. From what I've gathered from this thread it seems like the data_offset needs to be a multiple of 4. So in the case of your game, you could try options like this:

                            /HW0@53FD30#1
                            /HW4@53FD30#1
                            /HW8@53FD30#1
                            /HWC@53FD30#1
                            /HW10@53FD30#1
                            ...
                            and so on.

                            I don't know how far you'd need to go, but Fate/Stay Night used a data_offset value of B8, and I seem to recall seeing it mentioned that that was unusually high, so you probably don't need to go much further than that.

                            Comment


                            • Originally posted by LemonRuMBler
                              No I don't see any UserHookW threads...

                              You know I've tried about every kind of change with the /h switch and not one even seems to make a change good or bad...and I still can't see any UserHookW threads...which totally baffles me.

                              I tried with another game (not a lilith one) that I'm having pyramid problems with and same thing, no UserHookW threads or changes...somethings not working here...
                              If you don't specify the address of the function you're wanting to hook actually in the /H switch (as shown in my post above) you have to fiddle around doing the Scroll Lock thing - select the function (e.g. GetGlyphOutlineW), hit scroll lock, click the game window and get it to print some text, then go back to AGTH and look for UserHookW threads.

                              I think I remember seeing somewhere that levels (the number after the #) above 0 need an updated dbghelp.dll, it's a bit of a longshot but maybe installing the Debugging Tools for Windows would help?

                              Comment


                              • Are you sure that your scroll lock key is on? The new keyboards don't have a scroll lock light so you can go to startup > programs > accessories > accessibility > On-screen keyboard and than you can determine if the scroll lock is actually on or not. A big issue with not getting the UserHookW is because scroll lock is not on.

                                Comment

                                Working...
                                X