Page 1 of 1

FoV Interception cannot be compiled - BSG Deadlock

Posted: Mon Dec 24, 2018 11:55 am
by ghostinthecamera
Hi all,

I'm trying to put together a table that will allow control of the FoV of the camera during the battle replays in BSG Deadlock.

So far, i have found the address which contains the FoV value, and the code which writes to the address (and overwrites it if any changes are made to it directly). That code is:

movss [esi+00000138],xmm2

Changing this to NOP and then changing the FoV value in the address works perfectly.

So i have the following issue:
1) The address that this opcode accesses changes everytime a replay is viewed. Therefore, obviously, the address where the FoV value is stored changes everytime.

This shouldn't be too much of an issue, as from my experiments, the opcode remains the same when the game is run.

However, I can't seem to write a script to intercept it so that i can write a fov value to the address referenced by esi+00000138.

What i have is the following:

Code: Select all

[ENABLE]
//code from here to '[DISABLE]' will be used to enable the cheat
alloc(newmem,2048)
label(returnhere)
label(exit)

label(fov)
registersymbol(fov)

fov:
dq 0

newmem:
movss [fov],esi
jmp exit

originalcode:
movss xmm0,[esi+00000138]

exit:
jmp returnhere

"UnityPlayer.dll"+25DE90:
jmp newmem
nop
nop
nop
returnhere:

[DISABLE]
//code from here till the end of the code will be used to disable the cheat
dealloc(newmem)
"UnityPlayer.dll"+25DE90:
movss xmm0,[esi+00000138]
unregistersymbol(fov)
Whenever i try and assign this to the table, i get an error saying that the instruction "movss [00000000], esi" cannot be compiled. I am aware that i need to add the offset of 00000138 manually via "add address manually>>>pointer" but i can't even get to that stage as i get the error above.

I am not quite sure why this error is occurring. I'm not experienced at all with scripting (i'm not quite sure how the above script works) so any help would be appreciated.

Re: FoV Interception cannot be compiled - BSG Deadlock

Posted: Mon Dec 24, 2018 1:03 pm
by Chucky
Use mov ( not movss ).
And put fov under newmem or allocate mem for it.

Code: Select all

[ENABLE]
//code from here to '[DISABLE]' will be used to enable the cheat
alloc(newmem,2048)
label(returnhere)
label(exit)

label(fov)
registersymbol(fov)

newmem:
mov [fov],esi

originalcode:
movss xmm0,[esi+00000138]
jmp exit

fov:
dq 0

exit:
jmp returnhere

"UnityPlayer.dll"+25DE90:
jmp newmem
nop
nop
nop
returnhere:

[DISABLE]
//code from here till the end of the code will be used to disable the cheat
dealloc(newmem)
"UnityPlayer.dll"+25DE90:
movss xmm0,[esi+00000138]
unregistersymbol(fov)

Re: FoV Interception cannot be compiled - BSG Deadlock

Posted: Mon Dec 24, 2018 5:04 pm
by ghostinthecamera
worked perfectly - thank you very much!