Artikash / Textractor

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

"Honkai: Star Rail" unable to hook; "Couldn't Inject" #1323

Open Mogam181 opened 1 month ago

Mogam181 commented 1 month ago

Honkai Star Rail (HSR for short) is an action RPG game with high importance on story and writing. It has Japanese language settings and I like to use it as a study source for Japanese. I tried hooking it to Textractor (and LunaHook, an inspired and updated software) and it said "couldn't inject". Please tell me what I should do and whats the cause of this issue Screenshot (2040) Screenshot (2041)

storycoolbro commented 1 month ago

I'm not sure if you'll be able to hook HSR or any game where you have to connect to a server to be able to play that has any sort of anticheat system in place. I would think that the server would see the attempt to hook the games text as an attempt to tamper with the game to cheat in some way and would block the attempt possibly also flag the user in some way. also the fact hoyoverse uses their own engine that was originally designed for android going off that HI3 was their first game and was used as a test for building an open world in there engine before they released genshin (I have the pre-registration emblem in HI3 and still play). I may be wrong but I'm pretty sure all their popular games use the same engine HI3, Genshin, HSR, and ZZZ but I've not looked into that at all so they might not. since it's it's own unique engine someone would likely need to figure out how the engine processes game text and from the little I've seen cheat engine is usually used to do this at least for VNs. mind you this is just all me taking a wild guess as to why this is happening besides the reason that textractor probably doesn't have a single clue on how to hook the text from this games engine and doubt that's going to change anytime soon. there are plenty of other games that textractor can hook which you could use for the purpose of studying Japanese. you could possibly try the guys over in the agent community it's a script based text hooker but I imagine the issue with the game server detecting the script as an attempt to cheat would still be an issue but I could be wrong.

Mogam181 commented 1 month ago

I looked it up and it seems Genshin and Honkai Star Rail use the Unity engine. I don't know if unity engine is supported by Textractor or other hooker, but you might be right about the server and anti cheat stuff. It is unfortunate if that's the case since I actually find it a really good game for learning Japanese, as even without a text hooker I still benefit somewhat since I play regularly and sometimes reply quests with Japanese text (and manually look up words). Thanks anyway for the insights and help! I will try the agent hooker and see if it works

On Sun, Aug 11, 2024, 9:18 AM storycoolbro @.***> wrote:

I'm not sure if you'll be able to hook HSR or any game where you have to connect to a server to be able to play that has any sort of anticheat system in place. I would think that the server would see the attempt to hook the games text as an attempt to tamper with the game to cheat in some way and would block the attempt possibly also flag the user in some way. also the fact hoyoverse uses their own engine that was originally designed for android going off that HI3 was their first game and was used as a test for building an open world in there engine before they released genshin (I have the pre-registration emblem in HI3 and still play). I may be wrong but I'm pretty sure all their popular games use the same engine HI3, Genshin, HSR, and ZZZ but I've not looked into that at all so they might not. since it's it's own unique engine someone would likely need to figure out how the engine processes game text and from the little I've seen cheat engine is usually used to do this at least for VNs. mind you this is just all me taking a wild guess as to why this is happening besides the reason that textractor probably doesn't have a single clue on how to hook the text from this games engine and doubt that's going to change anytime soon. there are plenty of other games that textractor can hook which you could use for the purpose of studying Japanese. you could possibly try the guys over in the agent community https://github.com/0xDC00/agent it's a script based text hooker but I imagine the issue with the game server detecting the script as an attempt to cheat would still be an issue but I could be wrong.

— Reply to this email directly, view it on GitHub https://github.com/Artikash/Textractor/issues/1323#issuecomment-2282758864, or unsubscribe https://github.com/notifications/unsubscribe-auth/BKMNYD5BYPE6VTMS2DNGZVLZQ5QCTAVCNFSM6AAAAABMFHXDL6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOBSG42TQOBWGQ . You are receiving this because you authored the thread.Message ID: @.***>

snappie commented 2 weeks ago

Hey. I'm just guessing here, but I know Honkai Star Rail requires administrative privileges to run because of anticheat. But this also means that you need to run your texthooker as an administrator, because else windows will now allow you inject a thread into it.

basically, rightclick your texthooker application, "run as administrator", and windows should allow you to hook into star rail.

Sidenote: the anticheat might not take kindly to you interfering with star rail's memory, I'm not entirely sure how a texthooker works and I think it should be fine since it porbably only reads memory, but use a throwaway account for testing, it might get banned!

Mogam181 commented 2 weeks ago

Hello again! I tried that before, but unfortunately it didn't work. Without running the text hooker w/admin, the game does not show up at all. When in admin, it does show up but "couldn't inject".

It might just be like you said, that it's a problem with the anti cheat. Thanks again for your help

On Sun, Aug 25, 2024, 5:12 PM snappie @.***> wrote:

Hey. I'm just guessing here, but I know Honkai Star Rail requires administrative privileges to run because of anticheat. But this also means that you need to run your texthooker as an administrator, because else windows will now allow you inject a thread into it.

basically, rightclick your texthooker application, "run as administrator", and windows should allow you to hook into star rail.

— Reply to this email directly, view it on GitHub https://github.com/Artikash/Textractor/issues/1323#issuecomment-2308995429, or unsubscribe https://github.com/notifications/unsubscribe-auth/BKMNYD4RZEJOCJW2JSY7PXLZTJCFTAVCNFSM6AAAAABMFHXDL6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMBYHE4TKNBSHE . You are receiving this because you authored the thread.Message ID: @.***>