Skip to content

Extracts text from video games and visual novels. Highly extensible. Baidu Fanyi/Translation extension added.

License

Notifications You must be signed in to change notification settings

moonlightelite/Textractor

 
 

Repository files navigation

Textractor - Baidu Fanyi/Translate Edition

Baidu Fanyi in action

Added Baidu Fanyi extension. Note that the extension uses Windows named pipe to communicate with another application that does the communication with Baidu Fanyi.

Textractor should be run with Locale Emulator set to Chinese(Simplified), while the target application should be run with the Japanese Locale.

The translation script BaiduTranslator should be run before Textractor to ensure the named pipe is setup. Run the script in daemon mode -d and wait until the script says 'Waiting for Client to connect.'

Once the script is up and running, then you can start Textractor.

If you change the extension To Language setting to something other than engish, when Textractor starts up, you might get an assertion error. Just press ignore. It's not going to affect the app.

Try to make sure you are hooking the correct thread. Baidu Fanyi doesn't like it when you try to spam the servers with thousands of phrases in a short period of time...

Finally, I wrote this fork mostly for my own usage. If you find use in this extension, then great. I won't be doing much maintainence on it.

Original Textractor README page

How it looks

EnglishEspañol简体中文Русский한국어ภาษาไทยItaliano日本語BahasaPortuguês

Textractor (a.k.a. NextHooker) is an open-source x86/x64 video game text hooker for Windows/Wine based off of ITHVNR.
Watch the tutorial video for a quick rundown on using it.

Download

Releases of Textractor can be found here.
The last release of ITHVNR can be found here.
Try running vcredist if you get an error when starting Textractor.

Features

  • Highly extensible and customizable
  • Auto hook many game engines (including some not supported by VNR!)
  • Hook text using /H "hook" codes (most AGTH codes supported)
  • Directly extract text using /R "read" codes

Support

Please let me know of any bugs, games that Textractor has trouble hooking, feature requests, or other suggestions.
If you have trouble hooking a game please email me a place where I can freely download it, or gift it to me on Steam.

Extensions

See my Example Extension project to see how to build an extension.
See the extensions folder for examples of what extensions can do.

Contributing

All contributions are appreciated! Please email (no, I'm not busy!) me at [email protected] if you have any questions about the codebase.
You should use the standard process of making a pull request (fork, branch, commit changes, make PR from your branch to my master).
Contributing a translation is easy: just translate the strings in text.cpp as well as this README.

Compiling

Before compiling Textractor, you should get Visual Studio with CMake support, as well as Qt version 5.13
You should then be able to simply open the folder in Visual Studio, and build. Run Textractor.exe.

Project Architecture

The host (see GUI/host folder) injects texthook.dll (created from the texthook folder) into the target process and connects to it via 2 pipe files.
Host writes to hostPipe, texthook writes to hookPipe.
texthook waits for the pipe to be connected, then injects a few instructions into any text outputting functions (e.g. TextOut, GetGlyphOutline) that cause their input to be sent through the pipe.
Additional information about hooks is exchanged via shared memory.
The text that the host receives through the pipe is then processed a little before being dispatched back to the GUI.
Finally, the GUI dispatches the text to extensions before displaying it.

About

Extracts text from video games and visual novels. Highly extensible. Baidu Fanyi/Translation extension added.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C++ 97.7%
  • C 1.2%
  • Other 1.1%