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 do i find the Team a player belongs to?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking
View previous topic :: View next topic  
Author Message
LongBeardedLion
Expert Cheater
Reputation: 0

Joined: 10 Apr 2020
Posts: 172

PostPosted: Sun Oct 25, 2020 4:18 pm    Post subject: How do i find the Team a player belongs to? Reply with quote

Im working on a RTS, age of empires 2.
You can have up to 4 teams in each game. You can select the team of each player before starting the game.

I have searched in Unit objects, and list of units of players, and compared data structures. I put two players of each team in a group and compared the data structures looking for green addresses, meaning that the players in the same team will have the same value, but different when compared to the others in the other team.

But i cant find anything. Is there other way?

Please help.
Back to top
View user's profile Send private message
LongBeardedLion
Expert Cheater
Reputation: 0

Joined: 10 Apr 2020
Posts: 172

PostPosted: Tue Oct 27, 2020 3:30 pm    Post subject: Reply with quote

bumpity bump?

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

Joined: 14 Jul 2007
Posts: 3110

PostPosted: Tue Oct 27, 2020 4:46 pm    Post subject: Reply with quote

The player flag is either in the units themselves or in some player data (that represents either a side with all player or just a single player).
Back to top
View user's profile Send private message
LongBeardedLion
Expert Cheater
Reputation: 0

Joined: 10 Apr 2020
Posts: 172

PostPosted: Fri Nov 20, 2020 11:25 am    Post subject: Reply with quote

Thank you csimbi. But how do i detect that? All i can detect is the player object, but not the team itself. Could you give me some hint?
As i said before i tried to compare data structures. But it seems like finding a needle in a haystack.
Back to top
View user's profile Send private message
Csimbi
I post too much
Reputation: 94

Joined: 14 Jul 2007
Posts: 3110

PostPosted: Fri Nov 20, 2020 12:35 pm    Post subject: This post has 1 review(s) Reply with quote

Try to get two valid players - a humie and an AI.
Put them in the same data dissect window and look for small numbers - from 0 to 16 - usually 0 for the human and 1, 2 ,3, 4 for the AI.
The value might not be obvious because often time it's a single byte shown as part of a DWORD.
Try to see what reads/writes the byte.
If you see a lot of reads/check on the byte when you hover the mice over a unit/building, then chances are good you have found it.

In some games, there is no such thing, they check the owner of the unit.
To flash this out, put the player's base address into the address list and check what reads it when you hover the mouse over a unit/building (or click it).

Good luck!
Back to top
View user's profile Send private message
LongBeardedLion
Expert Cheater
Reputation: 0

Joined: 10 Apr 2020
Posts: 172

PostPosted: Sun Nov 22, 2020 8:50 am    Post subject: Reply with quote

Thank you csimbi.
The problem is that in Age of Empires 2. You have the player number, that is 1 2 3 4 5 6 7 8. That corresponds to colors blue, red, green, yellow, cyan, purple, white, orange.

But when it comes to teams. You can have 4 teams. 1, 2, 3, 4. Or you can simply choose no team in FFA.

So what im trying to see is what team a player belongs to. Not necessarily if it is AI or human. Although maybe that would do it too.

i did compare the AI and hummies objects. And i cant find anything coherent. Its like a needle in a haystack.

But i will try again.
Back to top
View user's profile Send private message
Csimbi
I post too much
Reputation: 94

Joined: 14 Jul 2007
Posts: 3110

PostPosted: Sun Nov 22, 2020 2:02 pm    Post subject: Reply with quote

In any game, there will be only 1 humie - the local player.
If you can find a way to identify it (for example, some pointers are always zero or some pointers that are always non-zero), then you are good.
From there, you can get the team or whatever.
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