Page 1 of 1

Hollow Knight Script Issue

Posted: Tue Mar 07, 2017 9:47 pm
by Kalas
So I made a script, doesn't really matter the code inside, a code that's simply nop the Health.

But my issue is when I restart my game the script is not working, what could cause that, I'm using an aobScan template on my Script, does anyone know?

Re: Hollow Knight Script Issue

Posted: Fri Mar 10, 2017 7:18 pm
by FreeER
If it uses Just-In-Time aka JIT code (C#/Unity almost always does) then you may have to get hit before the game actually loads the code that you want to change, and of course you can't change it until it is loaded.

There might be a way to use CE's mono features to force load the function at the start and then modify it, but I honestly don't know what CE allows you to do very well when it comes to that...

Re: Hollow Knight Script Issue

Posted: Fri Mar 10, 2017 8:20 pm
by panraven
If it is a mono game, the function if its class name, function name, and may be its namespace name known, it can be force compiled by CE by referencing the said function's symbolic form in AA or Lua script, as FreeER said.

eg a function TakeDamage at the class HeroController,
the symbolic form is : HeroController:TakeDamage
in AA, this can be force compiled the said function like:

Code: Select all

useMono() //     -- activate CE Mono Feature, Lua equipvaent : LaunchMonoDataCollector()
assert("HeroController:TakeDamage",55) //  <- the bytes should check at the actual address
The symbolic "HeroController:TakeDamage" is actually the address of starting address of the function, usually in 32bit game, it is a push ebp, which is 55 in hex.

Next time located the script address, try activate mono feature (by menu MONO/activate etc.), note the function name show in disassembler, so that next time yet the function can be force compiled like above script~

Re: Hollow Knight Script Issue

Posted: Sat Mar 11, 2017 4:00 am
by ++METHOS
Be sure to make use of wildcard variables in your AOB signature to account for any dynamic bytes. You also want to ensure that the signature is still unique on subsequent runs.