Artikash / Textractor

Extracts text from video games and visual novels. Highly extensible.
GNU General Public License v3.0
2.14k stars 205 forks source link

Two problems when hooking SiglusEngine #34

Closed tinyAdapter closed 6 years ago

tinyAdapter commented 6 years ago

Firstly, there are some hooks that continuously get senseless texts and never stop.

For example, windowbtn_windowbtn_windowbtn_windowbtn_windowbtn_... or menu_menu_menu_menu_menu_menu_...

siglusengine_2018-10-02_16-28-18 siglusengine_2018-10-02_16-40-30

(you can have a glance at how many texts are get from the size of scrollbar)

The second one is, when new dialogue comes, a new thread created and output the text.

And when the next dialogue comes, a second thread created, output the text, and the first thread just does not output anything.

textractor_2018-10-02_16-39-28

(many threads created)

BTW, I use AlphaROMdiE to crack the game, so I have no idea whether these could only happen on the cracked version or not.

Mars132 commented 6 years ago

ITHVNR worked fine for me with this game(金色ラブリッチェ), if that matters. The garbage hooks kept coming sometimes, but there always was at least one from the start which kept giving all the text needed.

Artikash commented 6 years ago

@Mars132 Does Textractor get any good hook on this game for you?

Mars132 commented 6 years ago

@Artikash just tested with 3.2.2 a couple of times, seems to be pretty much the same as I had with ITHVNR. Just have to be more careful when searching for the hook, as it gives you list of about 40 hooks right away. I was able to firsttry finding the right one quite a lot by selecting about 3rd-7th number from the end. About 2-4 working hooks among the mess. image

Artikash commented 6 years ago

Ok, looks like this isn't an issue

...jk it is. Kind of. Since every hook creates a new thread as well, and Windows only allows me to create at most a few hundred threads, Textractor will crash after going through a few hundred lines of this game. I'll fix ASAP (but RL is picking up for me about now, so ASAP might be a ways off).

Mars132 commented 6 years ago

Also, I might suck at this terminology, those lines on the screenshot image each represent a different thread, right? And the right half of each line is a hook name. If that's how things work, replace "hook" in my previous post with "thread". image Here I tried to break it, after adding aprox as much threads as on the screenshot it gave up with an error. 1 @tinyAdapter Finished the novel with no infinite adding and no crashes on ITHVNR. If you just want to read the thing, use the old way for now.

Artikash commented 6 years ago

Yeah, each line is a thread. Having too many crashes. ITHVNR handled it with a hard cap on the number of threads that it would allow, I removed that. I have a better solution in mind.

Artikash commented 6 years ago

Scratch that. I've tried implementing my idea and it's bad for some other reasons. Gonna go back to ITHVNR method of thread count hard cap.

Artikash commented 6 years ago

Alright, fixed.