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 


Plus before pointer address (what does it mean)?

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

Joined: 21 Feb 2008
Posts: 9

PostPosted: Tue May 09, 2023 12:23 am    Post subject: Plus before pointer address (what does it mean)? Reply with quote

Hey,

I desiccate cheat tables from time to time in order to make autohealing scripts (via AutoHotKey) for games that do not have autohealing by default or via mods.

Anyway, I have found a table with some values I would like to use to make a script for Star Wars Jedi: Survivor.
The problem comes from the address field of the value I want, which simply says '+01A0'.
If I remove the plus, it ceases to function, so I know that it is important, however, I have never seen a pointer like this before, so I need some help deciphering what I'm looking at.
(I have included the window with the address below (the value it equals is not important, I just took the screenshot without the game running))

The table I am using comes from fearlessrevolution (I have been informed that I am not allowed to post urls) and I take no credit whatsoever for making it.
All attempts to disassemble it are for personal use only, I don't share the scripts I make online, and wouldn't without asking permission.



Screenshot 2023-05-09 081408.png
 Description:
 Filesize:  11.92 KB
 Viewed:  1309 Time(s)

Screenshot 2023-05-09 081408.png


Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 457

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

PostPosted: Tue May 09, 2023 1:26 am    Post subject: Reply with quote

if an address starts with a + it will take the address of the parent entry and add the value to that


so if the parent entry has as final address 00400000 (can be a pointer) then the address will be 004001a0

_________________
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
Graesholt
How do I cheat?
Reputation: 0

Joined: 21 Feb 2008
Posts: 9

PostPosted: Tue May 09, 2023 2:02 am    Post subject: Reply with quote

Dark Byte wrote:
if an address starts with a + it will take the address of the parent entry and add the value to that


so if the parent entry has as final address 00400000 (can be a pointer) then the address will be 004001a0


Thank you so much for responding!

So would it be correct to think of it as a sort of multi value pointer?
A single pointer consisting of a number of parents and then the final offset?

New interesting question:
The parent entry has an offset of zero.
In the window (first attachment) it looks like it is pointing to the same address, whether or not the zero is there. However, if I remove the offset (second attachment) the value changes.
What's that about?
(sorry if I am asking dumb questions, I wouldn't if I could make my script without understanding this. Sadly, I cannot.)



Screenshot 2023-05-09 095824.png
 Description:
Parent entry with offset removed
 Filesize:  11.89 KB
 Viewed:  1286 Time(s)

Screenshot 2023-05-09 095824.png



Screenshot 2023-05-09 095756.png
 Description:
Parent entry
 Filesize:  22.08 KB
 Viewed:  1287 Time(s)

Screenshot 2023-05-09 095756.png


Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 457

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

PostPosted: Tue May 09, 2023 5:13 am    Post subject: Reply with quote

that's pointer arithmetic. One if with pointers and the other without

095756:
the base pointer is parentaddress+2308
the value at parentaddress+2308 is 1362867c0
add offset 0 to that and you'll get 1362867c0, so the address it refers to is 1362867c0

1362867c0 has as first byte the value e0



095824:
the address is parentaddress+2308
the value at parentaddress+2308 is 1362867c0 (aka c0 67 28 36 01 .... )
you are reading the 1 byte value at parentaddress+2308, so the value it reads is c0

_________________
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
Graesholt
How do I cheat?
Reputation: 0

Joined: 21 Feb 2008
Posts: 9

PostPosted: Tue May 09, 2023 10:53 am    Post subject: Reply with quote

Dark Byte wrote:
that's pointer arithmetic. One if with pointers and the other without

095756:
the base pointer is parentaddress+2308
the value at parentaddress+2308 is 1362867c0
add offset 0 to that and you'll get 1362867c0, so the address it refers to is 1362867c0

1362867c0 has as first byte the value e0



095824:
the address is parentaddress+2308
the value at parentaddress+2308 is 1362867c0 (aka c0 67 28 36 01 .... )
you are reading the 1 byte value at parentaddress+2308, so the value it reads is c0


Thank you for all your help.
I am not sure I ENTIRELY understand, but I got my thing to work.

Thanks again!
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 Discussions 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