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 


Using description as an address

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
sgsgwv$6263
Advanced Cheater
Reputation: 0

Joined: 05 Aug 2020
Posts: 84

PostPosted: Fri Aug 07, 2020 2:17 am    Post subject: Using description as an address Reply with quote

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
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 470

Joined: 09 May 2003
Posts: 25785
Location: The netherlands

PostPosted: Fri Aug 07, 2020 2:32 am    Post subject: Reply with quote

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
Code:

(maxhealth)

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
View user's profile Send private message MSN Messenger
sgsgwv$6263
Advanced Cheater
Reputation: 0

Joined: 05 Aug 2020
Posts: 84

PostPosted: Fri Aug 07, 2020 2:43 am    Post subject: Reply with quote

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
View user's profile Send private message
predprey
Master Cheater
Reputation: 24

Joined: 08 Oct 2015
Posts: 486

PostPosted: Sun Aug 09, 2020 12:47 am    Post subject: Reply with quote

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
Code:

(maxhealth)

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
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 470

Joined: 09 May 2003
Posts: 25785
Location: The netherlands

PostPosted: Sun Aug 09, 2020 1:54 am    Post subject: Reply with quote

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
View user's profile Send private message MSN Messenger
predprey
Master Cheater
Reputation: 24

Joined: 08 Oct 2015
Posts: 486

PostPosted: Sun Aug 09, 2020 3:13 am    Post subject: Reply with quote

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
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 470

Joined: 09 May 2003
Posts: 25785
Location: The netherlands

PostPosted: Sun Aug 09, 2020 3:22 am    Post subject: Reply with quote

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
View user's profile Send private message MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine 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