-
Notifications
You must be signed in to change notification settings - Fork 59
Added INAZUMA ELEVEN: Heroes' Victory Road #965
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Only dialogue box is hooked
Refactor dialogue handling to avoid duplicate text processing and improve text cleaning.
An option was added to display text that is not part of the dialogues. I implemented it as an option that can be toggled because it generates a lot of text constantly.
| dialogue: true, // Always ON | ||
| extra: false | ||
| }; | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Those hooks will break after a single update and people will complain. You should make patterns so that it works when the game update
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, right. I started with AoB and totally forgot about that when I tried to get the extra text working. I will fix it. Thanks
| setInterval(() => { | ||
| if (GetAsyncKeyState(0x70) & 0x8000) { | ||
| if (!keysPressed.F1) { | ||
| keysPressed.F1 = true; | ||
| hookStates.extra = !hookStates.extra; | ||
| console.log(`[F1] extra: ${hookStates.extra ? 'ON' : 'OFF'}`); | ||
| } | ||
| } else keysPressed.F1 = false; | ||
| }, 100); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd suggest creating an option, maybe with libUI.js, so people can decide whether to have their F1 key have extra functionality or not, since this isn't expected behavior for the average script.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did it that way because I was not able to find separated hooks for every textbox, and that specific hook shows almost all the non-dialogue text. But when there is no "extra" text on screen like the menu or tutorial it start puking random strings from, I guess, near NPCs. Any advice?
| const handler = (msg) => { | ||
| try { | ||
| if (typeof trans !== 'undefined' && trans && typeof trans.send === 'function') { | ||
| trans.send(msg, -100); | ||
| } else if (typeof send === 'function') { | ||
| send(msg); | ||
| } else { | ||
| console.log(msg); | ||
| } | ||
| } catch (e) { | ||
| console.log(msg); | ||
| } | ||
| }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the purpose of all these checks for trans and send?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, ignore that. Some code I left behind when asked chatgpt what was the use of that handler. Chatgpt really likes adding checks. I'm going to fix it next commit, is const handler = trans.send(s => s, -100); enough right?
I changed the addresses by patterns but I'm not really confident about the second one. That function is strange. And I just realized there was a major update recently, so once the download finishes, I’ll confirm whether the patterns are stable. |
Dialogue hook works normally:

Other texts hook is an optional toggle with F1 because the game generates a lot of text in many different ways