Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Assembly Problem RPCS3

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking
View previous topic :: View next topic  
Author Message
Arikadoo
How do I cheat?
Reputation: 0

Joined: 09 Dec 2010
Posts: 9

PostPosted: Wed Sep 28, 2022 1:29 am    Post subject: Assembly Problem RPCS3 Reply with quote

Hello I'm trying to make an experience multiplier for this game, and managed to find what writes to the address and make a script to add a fixed value to XP per hit, however i would like to convert code below to a Multiplier as the game gains different xp if playing in hard difficulty, or wearing some equipment.

Original code that determines xp to be sent i found by toggling breakpoint is this:
Code:
add rcx,[rbp+00000100]

however [rbp+00000100] only sends correct value on hitting enemy, and if enemy is not hit this address changes to random values constantly, i tried this:

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

alloc(saver12,8)

newmem: //this is allocated memory, you have read,write,execute access
//place your code here
mov [saver12],r12
mov r12,[rbp+00000100]
imul r12,5
mov [rbp+00000100],r12
add rcx,[rbp+00000100]
mov r12,[saver12]

exit:
jmp returnhere

102D1E214:
jmp newmem
nop 2
returnhere:

[DISABLE]
//code from here till the end of the code will be used to disable the cheat
dealloc(newmem)
102D1E214:
add rcx,[rbp+00000100]
//Alt: db 48 03 8D 00 01 00 00


However this freezes my game as soon as I hit the enemy, sorry for any mistakes in advance.
Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 138

Joined: 06 Jul 2014
Posts: 4275

PostPosted: Wed Sep 28, 2022 10:13 am    Post subject: Reply with quote

Use the aobscan template
You need the third parameter to alloc in 64-bit processes
Use `push` / `pop` instead of `saver12`
Right click the original instruction in the disassembler and make sure it doesn't access more than one address
I'd allow the multiplier to be modified from the address list (registersymbol) and use floating point math to allow for rational multipliers:
Code:
...

label(xpMul)
registersymbol(xpMul)

newmem:
  cvtsi2sd xmm1,rcx
  cvtsi2sd xmm2,[rbp+100]
  mulsd xmm2,[xpMul]
  addsd xmm2,xmm1
  cvttsd2si rcx,xmm2
  jmp return

align 8 CC
xpMul:
  dq (double)5.0

...

[DISABLE]
...
unregistersymbol(xpMul)

_________________
I don't know where I'm going, but I'll figure it out when I get there.
Back to top
View user's profile Send private message
Arikadoo
How do I cheat?
Reputation: 0

Joined: 09 Dec 2010
Posts: 9

PostPosted: Wed Sep 28, 2022 10:03 pm    Post subject: Reply with quote

ParkourPenguin wrote:
Use the aobscan template
You need the third parameter to alloc in 64-bit processes
Use `push` / `pop` instead of `saver12`
Right click the original instruction in the disassembler and make sure it doesn't access more than one address
I'd allow the multiplier to be modified from the address list (registersymbol) and use floating point math to allow for rational multipliers:
Code:
...

label(xpMul)
registersymbol(xpMul)

newmem:
  cvtsi2sd xmm1,rcx
  cvtsi2sd xmm2,[rbp+100]
  mulsd xmm2,[xpMul]
  addsd xmm2,xmm1
  cvttsd2si rcx,xmm2
  jmp return

align 8 CC
xpMul:
  dq (double)5.0

...

[DISABLE]
...
unregistersymbol(xpMul)


Hi , thanks for your help, I will look into that, regarding the third parameter of the alloc memory, I had to delete it as my cheat engine was telling me that failed to allocate memory near that address.

I will post as soon as I implement your tips,

Thanks so much, I'm learning the best I can.

Edit: Games keeps crashing , maybe is because instruction accesses 2 addresses and those addresses change value constantly, also I have been getting this failed to allocate memory in this emulator.

I'll settle with first script I made , thanks for your advice
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites