 |
Cheat Engine The Official Site of Cheat Engine
|
| View previous topic :: View next topic |
| Author |
Message |
phpjunkie Cheater
Reputation: 0
Joined: 26 Dec 2022 Posts: 26 Location: Wasilla, Ak
|
Posted: Mon Dec 26, 2022 11:53 am Post subject: Assigning an address |
|
|
| Code: |
alloc(MedicineCap,4,"HorizonZeroDawn.exe"+1020F5A)
registersymbol(MedicineCap)
label(returnhere)
newmem:
movss xmm2,[rdi+5C] // My Code: Bypass calculate value from game to medicine cap
movss [rdi+58],xmm2 // Game Code: Copies calculated value into the current medicine pouch
jmp returnhere
"HorizonZeroDawn.exe"+1020F5A:
jmp newmem
returnhere:
|
How can I assign this to my MedicineCap?
When I try this | Code: | | movss [MedicineCap],[rdi+5C] | Cheat Engine says it can't be compiled.
Last edited by phpjunkie on Mon Dec 26, 2022 1:51 pm; edited 1 time in total |
|
| Back to top |
|
 |
LeFiXER Grandmaster Cheater Supreme
Reputation: 20
Joined: 02 Sep 2011 Posts: 1069 Location: 0x90
|
Posted: Mon Dec 26, 2022 1:17 pm Post subject: |
|
|
I presume the medicine cap is the limitation of how many medicinal items you can carry at any one-time? If so you can override the value referenced by [rdi+5C]
| Code: |
alloc(MedicineCap,4,"HorizonZeroDawn.exe"+1020F5A)
alloc(medCap,8)
registersymbol(MedicineCap)
label(returnhere)
medCap:
dq (float)999
newmem:
movss xmm2,[medCap] // My Code: Bypass calculate value from game to medicine cap
movss [rdi+58],xmm2 // Game Code: Copies calculated value into the current medicine pouch
jmp returnhere
"HorizonZeroDawn.exe"+1020F5A:
jmp newmem
returnhere:
...
[DISABLE]
...
dealloc(medCap)
|
| Quote: | When I try this
Code:
movss [MedicineCap],[rdi+5C]
Cheat Engine says it can't be compiled. |
That's because you can't copy a deferenced value to the address of another section of memory with a single instruction.
|
|
| Back to top |
|
 |
phpjunkie Cheater
Reputation: 0
Joined: 26 Dec 2022 Posts: 26 Location: Wasilla, Ak
|
Posted: Mon Dec 26, 2022 1:24 pm Post subject: |
|
|
is the value of the medicine and is the cap.
The code works as far as capping the medicine. What I'm trying to do, is display the cap in the address list of cheat engine with my script so when I enable the script it shows the cap.
|
|
| Back to top |
|
 |
ParkourPenguin I post too much
Reputation: 152
Joined: 06 Jul 2014 Posts: 4718
|
Posted: Mon Dec 26, 2022 3:03 pm Post subject: |
|
|
memory-to-memory operations generally can't happen. Most of the time, it must be done through a register.
After `movss xmm2,[rdi+5C]`, xmm2 now contains the float at [rdi+5C]. Simply move xmm2 into [MedicineCap] via `movss [MedicineCap],xmm2`
It might be better to copy the address instead of the value. i.e.:
| Code: | ...
alloc(MedicineData,8,"HorizonZeroDawn.exe"+1020F5A)
registersymbol(MedicineData)
MedicineData:
dq 0
newmem:
mov [MedicineData],rdi
movss xmm2,[rdi+5C]
movss [rdi+58],xmm2
jmp returnhere
...
| After that, add a new address to the address list, check the "Pointer" checkbox, use MedicineData as the base address, and use 5C for the only offset.
_________________
I don't know where I'm going, but I'll figure it out when I get there. |
|
| 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
|
|