STN wrote: ↑Tue Sep 17, 2019 10:24 am
There's a bug with CE where it can't access some class methods, couldn't make a script for some of those cheats. Need to fiddle with lua and do it other way (time-consuming).
hey STN
yeah its strange...i just gave it a look
your scripts:
Zero Bladder -> BladderMonitor+Instance:NeedsToPee
Full Stamina -> StaminaMonitor+Instance:NeedsToSleep
both are recognized as Instance.NeedsToPee/NeedsToSleep and CE cant access only "Instance" -> strange bug
but i think i know why cheat engine has problems:
Code: Select all
public class Instance : GameStateMachine<StaminaMonitor, StaminaMonitor.Instance, IStateMachineTarget, object>.GameInstance
devs are using something for unity for visual scripting (GameStateMachine), i guess this is too much "non standard mono" code and CE is confused
well, i found a quite simple method to get a symbol
script for copy the addresses of NeedsToPee/NeedsToSleep :
Code: Select all
[ENABLE]
aobscanregion(aobMain,BladderMonitor:<InitializeStates>m__0,BladderMonitor:<InitializeStates>m__0+50,49BB****************41) // should be unique
registersymbol(aobMain)
alloc(iNeedsToPee,8)
registersymbol(iNeedsToPee)
iNeedsToPee:
readmem(aobMain+2,8)
/////
aobscanregion(aobMainSleep,StaminaMonitor:<InitializeStates>m__2,StaminaMonitor:<InitializeStates>m__2+50,49BB****************41) // should be unique
registersymbol(aobMainSleep)
alloc(iNeedsToSleep,8)
registersymbol(iNeedsToSleep)
iNeedsToSleep:
readmem(aobMainSleep+2,8)
[DISABLE]
unregistersymbol(aobMain)
unregistersymbol(iNeedsToPee)
//
unregistersymbol(iNeedsToSleep)
unregistersymbol(aobMainSleep)
activate script ingame (not in the main menu, coz <InitializeStates> needs to generate the addresses for Pee/Sleep while loading a game scene)
now you can use the symbols.
[iNeedsToSleep] has now the correct address of StaminaMonitor+Instance:NeedsToSleep
[iNeedsToPee] has now the correct address of BladderMonitor+Instance:NeedsToPee
example for Full Stamina with symbol only:
Code: Select all
define(address,[iNeedsToSleep]+12)
define(bytes,F3 0F 10 40 48)
[ENABLE]
assert(address,bytes)
alloc(newmem,$1000,[iNeedsToSleep]+12)
label(code)
label(return)
newmem:
code:
mov [rax+48],(float)100
movss xmm0,[rax+48]
jmp return
address:
jmp newmem
return:
[DISABLE]
address:
db bytes
or the even better with aobregion+symbol:
Code: Select all
[ENABLE]
aobscanregion(aobSleep,[iNeedsToSleep],[iNeedsToSleep]+50,F3 0F 10 40 48) // should be unique
alloc(newmem,$1000,aobSleep)
label(code)
label(return)
newmem:
code:
mov [rax+48],(float)100
movss xmm0,[rax+48]
jmp return
aobSleep:
jmp newmem
return:
registersymbol(aobSleep)
[DISABLE]
aobSleep:
db F3 0F 10 40 48
unregistersymbol(aobSleep)
dealloc(newmem)
totalabyss wrote: ↑Fri Sep 27, 2019 11:59 pm
Debug menu seems top keep crashing the game everytime I try to activate it.
Also activating full stamina and no stress a the same time causes the game to crash to desktop.
well JIT Code,
STN's script is using DebugHandler:OnKeyDown+8a
on your system it can be on a different offset
try this region script for DebugMenu:
Code: Select all
[ENABLE]
aobscanregion(aobMonoDebug,DebugHandler:OnKeyDown,DebugHandler:OnKeyDown+200,0F B6 00) // should be unique
alloc(newmem,$1000,aobMonoDebug)
label(code)
label(return)
newmem:
code:
mov byte ptr[rax],1
movzx eax,byte ptr [rax]
test eax,eax
jmp return
aobMonoDebug:
jmp newmem
return:
registersymbol(aobMonoDebug)
[DISABLE]
aobMonoDebug:
db 0F B6 00 85 C0
unregistersymbol(aobMonoDebug)
dealloc(newmem)