Page 1 of 1
Game address in code injection keeps changing
Posted: Mon Nov 06, 2017 2:53 pm
by Fenekie
Hello there again,
sooo... I came here with another issue... O.o
I'm trying to make another simple code which will "freeze" battery drain for any device/tool in Subnautica.
The problem is, that the game address keeps changing and I dunno what to do about it... >.<
Code: Select all
define(address,2415E868)
define(bytes,E9 93 17 EA DB)
[ENABLE]
assert(address,bytes)
alloc(newmem,E868)
label(code)
label(return)
newmem:
code:
// movss [rsi+1C],xmm5
jmp return
address:
jmp newmem
return:
[DISABLE]
address:
db bytes
// movss [rsi+1C],xmm5
dealloc(newmem)
Any idea how to solve it? ^.^
Re: Game address in code injection keeps changing
Posted: Mon Nov 06, 2017 5:12 pm
by Bloodybone
Fenekie wrote: ↑Mon Nov 06, 2017 2:53 pm
Hello there again,
sooo... I came here with another issue... O.o
I'm trying to make another simple code which will "freeze" battery drain for any device/tool in Subnautica.
The problem is, that the game address keeps changing and I dunno what to do about it... >.<
Code: Select all
define(address,2415E868)
define(bytes,E9 93 17 EA DB)
[ENABLE]
assert(address,bytes)
alloc(newmem,E868)
label(code)
label(return)
newmem:
code:
// movss [rsi+1C],xmm5
jmp return
address:
jmp newmem
return:
[DISABLE]
address:
db bytes
// movss [rsi+1C],xmm5
dealloc(newmem)
Any idea how to solve it? ^.^
Use aob injection instead
Re: Game address in code injection keeps changing
Posted: Mon Nov 06, 2017 7:05 pm
by Squall8
Activate mono features. You can do this through the main UI or with a parent script using the lua call LaunchMonoDataCollector(). Also make sure Show Symbols is checked under View. I think it's checked by default anyways.
Now you can use whatever appears in the address list as a valid address for every restart.
Re: Game address in code injection keeps changing
Posted: Thu Nov 09, 2017 6:27 pm
by Fenekie
Mono features doesn't work for me. Maybe I'm doing something wrong, but code looks still same, maybe it should, but I just don't see any change... O.o
AOB injection works, but it takes some time, before it will still start work - tolerable for me.
But that mono feature could be interesting, but dunno how... O.o
Re: Game address in code injection keeps changing
Posted: Thu Nov 09, 2017 10:36 pm
by Squall8
Of course the instruction will be the same (movss [rsi+1C],xmm5). But with mono features activated, your address (2415E868), or whatever it is at the time, will change to something like
blahblahUpdateBattery+60. You can right click on the instruction in the disassembler window and click Copy To Clipboard>Opcodes and simply paste it over the address in your script. It will also copy the movss part but you can just delete that. It also eliminates the need to update the value in game just to activate the script.
For example:
Code: Select all
assert(blahblahUpdateBattery+60,E9 93 17 EA DB) - You can use your defines here too. You're just changing that initial
address.
Also your bytes used here is for a jmp instruction not a movss. But I'm not here to pick apart your script.
Write the rest of the code how you want.