View previous topic :: View next topic |
Author |
Message |
sgsgwv$6263 Advanced Cheater
Reputation: 0
Joined: 05 Aug 2020 Posts: 84
|
Posted: Fri Aug 07, 2020 2:17 am Post subject: Using description as an address |
|
|
I just wanted to try this new feature where we can use the description of the address in the cheat table as an address elsewhere.
Can I use description of address B (as addrB) in a hotkey of another address (A) and then do "set value to" to "[addrB]" (which represents the value of B)
.
Also can I "set the value to" to "2*[addrB]" which represents twice the value of B?
If no, then please inform me the correct syntax to do all this?
|
|
Back to top |
|
 |
Dark Byte Site Admin
Reputation: 470
Joined: 09 May 2003 Posts: 25785 Location: The netherlands
|
Posted: Fri Aug 07, 2020 2:32 am Post subject: |
|
|
I think you want the old function of "set value to value of other entry" (the new function is setaddress by description which is useful for pointer entries)
Let's say you have 2 addresses in the list:
health and maxhealth
You can then set the value of health to
to set the health to the same value as maxhealth.
If you combine it with freeze and then set the value, it will constantly set the value, even when maxhealth changes it will freeze it properly
The ( ) notation for setvalue currently doesn't support math, but there is a luamode for set value as well, [] , which can do what you want, although a bit chunky
to set the value to 2xaddrB you'd do
Code: |
[AddressList.getMemoryRecordByDescription('addrB').Value*2]
|
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
Back to top |
|
 |
sgsgwv$6263 Advanced Cheater
Reputation: 0
Joined: 05 Aug 2020 Posts: 84
|
Posted: Fri Aug 07, 2020 2:43 am Post subject: |
|
|
So this (maxhealth) thing will work in "set value to" on ce 7.1?
Plz in next update , extend the support of math on that too..
|
|
Back to top |
|
 |
predprey Master Cheater
Reputation: 24
Joined: 08 Oct 2015 Posts: 486
|
Posted: Sun Aug 09, 2020 12:47 am Post subject: |
|
|
Dark Byte wrote: | I think you want the old function of "set value to value of other entry" (the new function is setaddress by description which is useful for pointer entries)
Let's say you have 2 addresses in the list:
health and maxhealth
You can then set the value of health to
to set the health to the same value as maxhealth.
If you combine it with freeze and then set the value, it will constantly set the value, even when maxhealth changes it will freeze it properly
The ( ) notation for setvalue currently doesn't support math, but there is a luamode for set value as well, [] , which can do what you want, although a bit chunky
to set the value to 2xaddrB you'd do
Code: |
[AddressList.getMemoryRecordByDescription('addrB').Value*2]
|
|
The luamode gives parsing error when one or both of the entries are set to show in hexadecimal.
|
|
Back to top |
|
 |
Dark Byte Site Admin
Reputation: 470
Joined: 09 May 2003 Posts: 25785 Location: The netherlands
|
Posted: Sun Aug 09, 2020 1:54 am Post subject: |
|
|
you need to add an 0x in front for math to work on hexadecimal in lua mode
so
Code: |
[('0x'..AddressList.getMemoryRecordByDescription('addrB').Value)*2]
|
Also, why have it in hexadecimal ?
out of curiosity. If a float type is set as "show as hexadecimal" Do you want math applied on the hexadecimal value or the actual value?
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
Back to top |
|
 |
predprey Master Cheater
Reputation: 24
Joined: 08 Oct 2015 Posts: 486
|
Posted: Sun Aug 09, 2020 3:13 am Post subject: |
|
|
Dark Byte wrote: | you need to add an 0x in front for math to work on hexadecimal in lua mode
so
Code: |
[('0x'..AddressList.getMemoryRecordByDescription('addrB').Value)*2]
|
Also, why have it in hexadecimal ?
out of curiosity. If a float type is set as "show as hexadecimal" Do you want math applied on the hexadecimal value or the actual value? |
I was just testing the luamode out since I didn't know of this before and just so happens I had my entries set to show in hexadecimal. I'm guessing if I want it done on actual float value I would have to use string.pack+string.unpack or readFloat(mr.Address)?
|
|
Back to top |
|
 |
Dark Byte Site Admin
Reputation: 470
Joined: 09 May 2003 Posts: 25785 Location: The netherlands
|
Posted: Sun Aug 09, 2020 3:22 am Post subject: |
|
|
readFloat or readDouble yes
and use mr.CurrentAddress , it's faster and free of parser issues
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
Back to top |
|
 |
|