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 


How to find list of all units from single unit base pointer?

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

Joined: 02 Nov 2014
Posts: 4

PostPosted: Wed Dec 08, 2021 9:54 am    Post subject: How to find list of all units from single unit base pointer? Reply with quote

I aim to find a static pointer to a list of units. The game in question is 112 Operator and is running on the Unity-Engine (3D).

I already managed to find an opcode which seems to access each unit's y-position on the map. I am certain that each of those addresses represents a respective unit's y-coordinate, which is updated every tick from the main game loop while the game is unpaused.

My goal is to get from this information to a base pointer to a list of units in order to find more unit stats and monitor them.

I know the basics of finding static adresses + offsets. But how do I get from finding the base pointer to one unit to finding the base pointers to all of them?

Is the correct approach to simply "go back" a couple of offsets to get to the base pointer of a list containing all the units?
And most importantly: How do I identify objects stored in said list from just the list's base address?
Is it correct to assume that lists store objects the following way?:
ListBase+[sizeOf(ptr)] = node (where node equals a ptr to a unit + a ptr to the next node in the list)?

Screenshot attached for easier understanding.



ce.PNG
 Description:
 Filesize:  180.99 KB
 Viewed:  1479 Time(s)

ce.PNG


Back to top
View user's profile Send private message
Csimbi
I post too much
Reputation: 92

Joined: 14 Jul 2007
Posts: 3102

PostPosted: Wed Dec 08, 2021 2:26 pm    Post subject: Reply with quote

If it's Unity, chances are good there won't be a static base because all objects are created dynamically, in runtime - including the base game object.
You should find a piece of code that accesses that list and hook onto that code to get the pointer.
Enable mono dissect, and see if you can find an object you can tap into.
Back to top
View user's profile Send private message
fak9r
How do I cheat?
Reputation: 0

Joined: 02 Nov 2014
Posts: 4

PostPosted: Wed Dec 08, 2021 3:54 pm    Post subject: Reply with quote

Maybe my wording was a bit confusing, when I said base address I actually meant a base adress + offsets. I should be able to find a base + offset(s) which will eventually lead to pointer to a list of units though, right?
I already found a function which seems to access all the units' location in an update loop (see OP screenshot).
How can I use that function address to obtain a dynamic list of units? (just found Tutorial:Mono:Basic on CE-wiki - that probably answers it)

Thanks for the Mono tip though, I wasn't even aware that's a thing. I'll look into it.

EDIT: Thanks a lot for pointing me to the Mono feature cheat engine offers. This really helps me out and seems crazy helpful for finding exactly what I'm looking for.
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