 |
Cheat Engine The Official Site of Cheat Engine
|
| View previous topic :: View next topic |
| Author |
Message |
Minulino How do I cheat?
Reputation: 0
Joined: 13 Nov 2018 Posts: 2
|
Posted: Sat Oct 10, 2020 10:58 am Post subject: Help tweaking an option from a table |
|
|
Hello.
I've downloaded and tried to use a table for a game (Final Fantasy XIII-2). The option to "sprint", in that table, is tied to holding down the CTRL button, so when the key is held down you sprint, and when it's not held down you run normally. However, I'm using a controller, so it's very inconvenient for me to hold down the CTRL key.
So I was hoping there was a way to modify that particular option, and make it so that toggling the option in cheat engine (when you "tick the box") would make it active without having to hold down CTRL.
The table is the one from this topic:
fearlessrevolution[dot]com/viewtopic.php?t=190
The script would be this one:
| Code: | [ENABLE]
//code from here to '[DISABLE]' will be used to enable the cheat
aobscan(moveSpeedReadAOB,D9 86 94 01 00 00 5E)
registersymbol(moveSpeedReadAOB)
label(fMoveSpeedMultiplier)
registersymbol(fMoveSpeedMultiplier)
label(fDefaultRunSpeed)
registersymbol(fDefaultRunSpeed)
alloc(newmem,2048)
label(returnhere)
label(originalcode)
label(exit)
label(chksprintkey)
label(isflying)
newmem: //this is allocated memory, you have read,write,execute access
//place your code here
fld dword ptr [esi+00000194]//
cmp [pSpeedBase],eax
jne originalcode
mov esi,[pGameMoveFlag]
cmp [esi],1
jne originalcode
//cmp byte ptr [bFlying],1
//je isflying
chksprintkey:
pushad
push 11 //Ctrl
call GetAsyncKeyState
shr ax,#15
cmp ax,1
popad
jne originalcode
fmul dword ptr [fMoveSpeedMultiplier]
//fst dword ptr [ecx+194]
jmp originalcode
isflying:
cmp dword ptr [esi+00000194],0
jne chksprintkey
fadd dword ptr [fDefaultRunSpeed]
jmp chksprintkey
originalcode:
//fld dword ptr [esi+00000194]
exit:
jmp returnhere
///
fMoveSpeedMultiplier:
dd (float)2.0
fDefaultRunSpeed:
dd (float)5.1875
///
moveSpeedReadAOB: //"ffxiii2img.exe"+278F0A:
jmp newmem
nop
returnhere:
[DISABLE]
//code from here till the end of the code will be used to disable the cheat
dealloc(newmem)
moveSpeedReadAOB: //"ffxiii2img.exe"+278F0A:
db D9 86 94 01 00 00
//Alt: fld dword ptr [esi+00000194]
unregistersymbol(moveSpeedReadAOB)
unregistersymbol(fMoveSpeedMultiplier)
unregistersymbol(fDefaultRunSpeed) |
I tried tweaking it myself (I thought about modifying the line where it says "push ctrl", but it didn't seem to affect it), but I'm nowhere knowledgeable enough to understand any of it. So...little help, pretty please?
|
|
| Back to top |
|
 |
Csimbi I post too much
Reputation: 97
Joined: 14 Jul 2007 Posts: 3340
|
Posted: Sat Oct 10, 2020 4:25 pm Post subject: |
|
|
Remove (comment out) these lines and it will work without having to hold CTRL:
| Code: | chksprintkey:
pushad
push 11 //Ctrl
call GetAsyncKeyState
shr ax,#15
cmp ax,1
popad
jne originalcode |
|
|
| Back to top |
|
 |
Minulino How do I cheat?
Reputation: 0
Joined: 13 Nov 2018 Posts: 2
|
Posted: Sun Oct 11, 2020 3:21 am Post subject: |
|
|
That (almost) did it, thanks! The script also warned me about removing three other lines that must have had "references" to the deleted part, namely:
label(chksprintkey)
jne originalcode
jmp originalcode
Removing those three too did it. Thanks a lot again!
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
|
|