Closed delcol431 closed 4 years ago
The `Remove 30 Repeated Sentences" extension might help. Add it, read through a few lines, and then look through all the hooks again.
Also fixable with this simple extension:
#include "Extension.h"
#include <mutex>
bool ProcessSentence(std::wstring& sentence, SentenceInfo sentenceInfo)
{
if (sentenceInfo["current select"] == 0 || sentenceInfo["text number"] == 0) return false;
static std::mutex m;
static std::wstring previous;
std::wregex reg (L"\\s");
sentence = std::regex_replace(sentence, reg, L""); //Removing all whitespace from the sentence, text does not always match otherwise
m.lock(); //lock mutex before using previous to prevent race conditions
size_t found = sentence.find(previous); //Searches for an exact match in order to avoid unwanted behaviour
if (found != -1) //Case "sentence" matches "previous"
{
sentence.erase(0, previous.length());
previous += sentence;
m.unlock();
return true;
}
else
{
previous = sentence;
m.unlock();
return true; //Returning true in order to keep the removal of the whitespace.
} //Keeps all the sentences consistent, always not needed
}
I'm trying to play this game and having a ton of issues. I also don't get how I get that extension or even the name of it honestly... I don't know coding it's just a wall of code to me.
I also have WAY too many hooks and way too many of them are just a jumble of random english words. Also can't get the regex filter that filters out english words to work. can get any regex filter to work.
In Higurashi when you advance the text all the previous sentences on the screen get extracted again. In the attached picture the red lines indicate where the line break happened, and the text gets repeated in the textractor window. This happens in all the working hooks.
I already tried the various extensions but i could not get a better result.
In addition, the hooks "mono_string_new_utf16", "mono_string_new" and "mono_string_new_len" (altough i'm fairly positive it's mostly because of the first one, which only shows non supported characters) cause huge performance issues on schene changes. Those hooks ignore the configuration file, but removing them manually resolves all performance issues, and greatly improve performance without a configuration file.