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 


"Connecting/relating" far data structures together

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking
View previous topic :: View next topic  
Author Message
Tatsu808
Newbie cheater
Reputation: 0

Joined: 15 Nov 2014
Posts: 20

PostPosted: Sat Feb 06, 2016 1:23 pm    Post subject: "Connecting/relating" far data structures together Reply with quote

Hi, I was wondering, are there good techniques for connecting and/or relating data structures that are far apart from each other in memory? Let's say for example we found the data structures for the following entity in the game:

1. Coordinate structure which holds X, Y, Z coordinates of the entity.
2. Health structure which holds the HP of the entity.
3. Faction structure which indicates whether this entity is friendly or an enemy.

These structures can sometimes be a million bytes away from each other with no set pattern between their distances from each other in memory.

Let's say we found the instruction which writes the HP to all entities in the game. Using this instruction, we can find the Health structures of all entities in the game.... but what if we want to find the coordinates and faction of the entities FROM their health structure, how can we do this? Could it be, the only method is to be lucky and somehow discover a pointer(s) that is at a predictable offset apart within the health structure which points to the Faction and Coordinates structure?


Last edited by Tatsu808 on Sat Feb 06, 2016 1:35 pm; edited 1 time in total
Back to top
View user's profile Send private message
Zanzer
I post too much
Reputation: 126

Joined: 09 Jun 2013
Posts: 3278

PostPosted: Sat Feb 06, 2016 1:34 pm    Post subject: Reply with quote

One easy method is to just use CE's pointer scanner.
Have it find pointers on each structure.
Then look through each jump in each pointer.
See if they all share a common structure at one point.
Back to top
View user's profile Send private message
Tatsu808
Newbie cheater
Reputation: 0

Joined: 15 Nov 2014
Posts: 20

PostPosted: Sat Feb 06, 2016 1:50 pm    Post subject: Reply with quote

Thanks for the reply. I think I understand. When you say look through each jump, you mean look at all the offsets right? Just want to make sure I understand.

FML: I did a pointer scan at an entity's health structure with max level 8, no results were returned Sad I'm fairly certain that I was at the start of the health structure.


Last edited by Tatsu808 on Sat Feb 06, 2016 2:43 pm; edited 1 time in total
Back to top
View user's profile Send private message
Zanzer
I post too much
Reputation: 126

Joined: 09 Jun 2013
Posts: 3278

PostPosted: Sat Feb 06, 2016 2:28 pm    Post subject: Reply with quote

Yea, that is what I meant.

With CE, you just find a pointer for the health address itself. It will guess the base.

When you right-click the address and find out what accesses it, what's the instruction that pops up?

If the instruction is something like mov ***,[***+100], then the base of the structure is -100 (hex) from the health address.

You can provide CE with that value and tell it that the last offset is 100.
Back to top
View user's profile Send private message
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4197

PostPosted: Sat Feb 06, 2016 2:58 pm    Post subject: Reply with quote

You can also look inside data structure pointer trees or use the structure spider.
Back to top
View user's profile Send private message
Tatsu808
Newbie cheater
Reputation: 0

Joined: 15 Nov 2014
Posts: 20

PostPosted: Sat Feb 06, 2016 3:13 pm    Post subject: Reply with quote

Quote:
You can also look inside data structure pointer trees or use the structure spider.


Thanks for the reply. I tried looking at various pointer trees within the health data structure as well the coordinates data structure in hopes that I will find a pointer which links the two structures together, but haven't found one. This is using dissect data structures. I haven't used structure spider yet. I'm not sure how to use that, but I shall search the forums to learn.
Back to top
View user's profile Send private message
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4197

PostPosted: Sat Feb 06, 2016 3:22 pm    Post subject: Reply with quote

Sometimes, it can be difficult to find a connection. Sometimes, the structures may not be connected. You can still use the base of each structure to create your own structures and build on them as you identify important variables. If you are having a hard time trying to find an ID or establish a reliable filter for your script(s), you can try these things.
Back to top
View user's profile Send private message
Tatsu808
Newbie cheater
Reputation: 0

Joined: 15 Nov 2014
Posts: 20

PostPosted: Sat Feb 06, 2016 3:30 pm    Post subject: Reply with quote

Quote:
Yea, that is what I meant.

With CE, you just find a pointer for the health address itself. It will guess the base.

When you right-click the address and find out what accesses it, what's the instruction that pops up?

If the instruction is something like mov ***,[***+100], then the base of the structure is -100 (hex) from the health address.

You can provide CE with that value and tell it that the last offset is 100.


These instructions pop up when I right click the address of an enemy entity's health. Btw, the game is Fallout4.
Back to top
View user's profile Send private message
Daijobu
Master Cheater
Reputation: 13

Joined: 05 Feb 2013
Posts: 301
Location: the Netherlands

PostPosted: Sat Feb 06, 2016 5:19 pm    Post subject: Reply with quote

I'd wager the second one from the top is the instruction which writes health.

If the enemy health is located in a table like structure it's likely something like this:

Code:
base + index x 4 == [rcx+rdx*4]


Example:

00AABB00 + 1 x 4 = 00AABB04
00AABB00 + 2 x 4 = 00AABB08
00AABB00 + 3 x 4 = 00AABB0C


That should already give you an idea of the structure for the enemies.
Find multiple of these addresses and compare them to your player address to find common traits.

_________________
Scripts/tables from scratch. Relation to other scripts is coincidental. Use of posted code is credited properly.
Euro Truck Simulator 2 Backwards Compatible Cheat
American Truck Simulator Backwards Compatible Cheat
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