Sunday, January 16, 2011

[Tutorial] ITH (Interactive Text Hooker)

Interactive Text Hooker - new text extraction tool

Interactive Text Hooker (ITH) is a tool to help you extract text from Japanese games.
It works very like AGTH...if you are familiar with AGTH you will find it easy to work with ITH.
Right now ITH is not quite stable and under developing....
any Ideas on ITH can be submitted through hongFire thread here

NOTE: Any Question can be submitted at our fanpage (at the Wall or wherever, just don't write it off on my profile wall) well, as long as it's within my reach, I'll try to help ^^

http://i.imgur.com/bor0f.jpg
hell... no other pic, so I'm using this one...
why? coz the tutor below using Damegane as an example ^^


Why Using ITH??
-------------------------------------------------------------------------------------------------------------------------------
(taken from Hongfire, with a little correction... coz common people can't understand hard things...)
AGTH is a big success in text extraction. With UserHook function it can solve more than 95% current text extract issues. But new games usually need H-code to help AGTH working, and common users have no way to write one. ITH is designed to recognize much more game engines than AGTH and insert proper hooks automatically.

1)ITH now can detect some popular game engine.
Currently KiriKiri, BGI, RealLive, ShinaRio, CMVS, MAJIRO, rUGP, Malie, NitroPlus,
System40, CIRCUS, AtelierKaguya, Waffle, TinkerBell, Lune, SofthouseChara.

2)ITH has a graphic attach/hook insert interface through system process (Task manager, process)... You don't need to pass parameters to ITH via cmd or link target line (via shortcut)

3)ITH is able to insert multiple UserHooks into target process, while AGTH only one.

4)ITH can join threads together as your wish(Link function), while AGTH will join many together, sometimes with useless threads.
Since ITH is able to insert multiple UserHooks, this also mean you can join text from different hooks together. This is useful when the text process function appears in different place.

5)ITH can detach from process, remove/modify UserHook while the process is running.
You don't need to restart the process when you find you have inserted wrong hooks.
Bad hooks won't crash the process, just yield error message. This means you can use try-error method to guess hook code more efficiently.

6)ITH is open source and is under developing. More features will be add to ITH in future versions.
-AGTH has option to hook common system routine(/X?), ITH currently only hook APIs in GDI32.dll

ITH User Manual (Read this!)

Introduction

Interactive Text Hooker (ITH) is a tool to help you extract text from Japanese games. It's the first building blocks of a auto-translating system. The main purpose of ITH is to intercept text processed by a program and arrange text into clean form. Main idea of ITH comes from AGTH. ITH works very like AGTH, and has some advantage over AGTH.

System requirement

Intel Pentium4 or later processor. Recommend OS is Windows XP or later. Your processor must support SSE2. Or you may get an error message.

Basic Usage

Setup and start ITH

ITH contains 3 files, namely ITH.exe, ITH.dll and ITH_engine.dll. These 3 files need to be put into same folder. ITH requires administrative privilege to function properly. If you are using Vista/7, you need to run ITH as administrator.

UI layout

The first line contains 8 buttons.
Process: opens the Process Explorer.
Thread: opens the Thread Editor.
Hook: opens the Hook Editor.
Profile: opens the Profile Manager.
Option: opens the Option Dialog.
Top: let ITH stay on top of other windows.
Clear: clears text of current thread.
Save: save current profile.

The second line contains a short drop-down list and a editable area.
The short drop-down list is called Process List. This list contains Process ID and name of all attached process.
The editable area is called Command Line. You can type command here to let ITH perform actions.

The third line is a long drop-down list called Thread List. This list contains all available thread. You can select one thread to change content of the Text Area.

Under the Thread List is the Text Area. This area contains text of one thread.

Attach ITH

The first step of text extraction is attaching ITH to a game. Open the Process Explorer. On the left you can see a list of processes that ITH is able to attach. This list is sorted by creation time of the process. So the latest created process is at the top of this list. Select the process you want to attach ITH, then click Attach button. ITH will give a message if it attach successfully. Click OK to close the dialog.

Select text thread

After ITH receive some text, it will put text into threads. A thread contains certain piece of the text. If you select one from the Thread List, the text in the main window is changed to that thread. By default, there's only one named ConsoleOutput. Usually as the game display some text, more threads should be added to this list. If you can't see any thread other than ConsoleOutput while the game is flashing text, you will need to insert custom hook.

Copy to clipboard

ITH can copy received text to clipboard, then other translation software monitors clipboard can read the text and translate it into other language. You can simply select text in the Text Area by clicking and dragging. Then the selected text is copied to clipboard. ITH is able to copy the last sentence to clipboard automatically. You need to enable this function in the Option Dialog by checking Auto copy to clipboard.

Save you selection

It's bothersome to attach ITH and select text every time you start the game. After you have attached ITH and selected some thread for the first time, click Save to save your selection. ITH will record necessary information in ITH.pro. The next time you start this game, ITH will attach to the game and select thread automatically.

Link threads together

When your see text appears in different threads, you don't need to switch between them every time. ITH provide a flexible mechanism to handle this case. Namely Thread Linking. You can find thread name in the Thread List. Every thread's name begins with its unique 4-digit identifier. You use this number to tell ITH which threads to link. Notice that thread number is hexadecimal. So character A-F stands for decimal number 10-15 (you won't see decimal number in Thread List). You will need 2 numbers to perform a link operation. Namely From and To. There are 2 ways to link threads.

  • Open the Thread Editor by clicking Thread. Select thread with the number From from the list in the top. Select thread with the number To from the shorter list. Then click Set.
  • Type L"From"-"To" in the Command Line and press enter. No quotes, only number. Example LA-4.

Additional hook

If you couldn't get any useful text thread, you will have to insert additional hook to generate more threads. You need a small piece of text called H-code to inform ITH about the desired hook. H-code looks like this /HA-8:-14@402050. Type H-code in the Command Line and press enter, a new hook will be inserted. As the game goes advance, you may see new text threads in Thread List. This code is game and usually version dependent. To create such a code, you should be familiar with programming and x86 assembly. If you don't know what these things are, you must wait someone else to create one. You can request it at the Hongfire forum.



-------------------------------------------------------------------------------------------------------------------------------
the Latest Version is: 2.2 update May 5 2011 at MediaFire
Update 20 May 2011 MediaFire
older version:
ITH 2.0 (MF mirror)

after download, extract the file...
Please put ITH.exe, ITH.dll and ITH_engine.dll in the same folder... in order for ITH to executed...

and now let the simple tutorial start...
the pic below are not mine, they're belong to Shouenga... (I already got his permission)

Tutorial

1. Open the folder and double click ITH.exe


2. Open your VN / galgame /eroge / otoge / game that you need to be hooked


3. Click "Process" at ITH tab, and attach your Game
in this case, attach damegane.exe
and if you want easier access later, click "add profile"



4.Open your translation engine...
in this tutorial, we use Translation Aggregator


5. Play/Read your VN until you got some dialog text... move on to ITH, and click at the dropdown menu console output... and choose the "sane" one...


6. here's the sample of wrong choice... the text are double aren't they?


and here's the right one


7. Click Option, and check the "Auto copy to Clipboard" in order to have the text at ITH imported to your Clipboard, and TA / Atlas will translate it automatically


8. Wait till TA / Atlas receive the text and translate it...

and... it's done... hehe...


9. Last... how to add /h code to ITH...
at profile tab, after you attach a process of VN, add your hook code as seen below

http://i.imgur.com/RVRVM.jpg
Note:
1. Mecab is used as an additional program which will help you to understand the somewhat "broken" Translation of Atlas... (at least if you don't understand kanji, you can help it by learning the Romaji) look above... contain some easy words heh??

2. This tutorial made in order to teach you basic usage of ITH... on some bothersome VN / Galge, maybe you need to combine several /h code to get the right text extracted...
please study them yourself... coz I can't explain everything here...

3. Please leechers, don't just Copy-paste-ing my post here... at CraneAnime...
coz we have copyrights to... (see below)
I'm making this tutor myself... not copying from other blog / forum...

if you want to share this to your site / forum, please link to our post/site... I don't need any of your money or material thing... just put: Credit to=¤Dwi_Edge¤ or just Dwi_Edge
I don't care which, but do put it ...

for now, let me forbid you a goodbye... ^^
ah.. before I forgot about this one...
SPOILER for NEXT PROJECT!
http://i1041.photobucket.com/albums/b419/Dimdom89/uni1.jpg

last edited by Dwi_Edge 2011/xx/xx
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


No comments:

Post a Comment

Collection