View previous topic :: View next topic |
Author |
Message |
LongBeardedLion Expert Cheater Reputation: 0
Joined: 10 Apr 2020 Posts: 172
|
Posted: Sun Oct 25, 2020 4:18 pm Post subject: How do i find the Team a player belongs to? |
|
|
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 |
|
|
LongBeardedLion Expert Cheater Reputation: 0
Joined: 10 Apr 2020 Posts: 172
|
Posted: Tue Oct 27, 2020 3:30 pm Post subject: |
|
|
bumpity bump?
BUMP
|
|
Back to top |
|
|
Csimbi I post too much Reputation: 94
Joined: 14 Jul 2007 Posts: 3110
|
Posted: Tue Oct 27, 2020 4:46 pm Post subject: |
|
|
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 |
|
|
LongBeardedLion Expert Cheater Reputation: 0
Joined: 10 Apr 2020 Posts: 172
|
Posted: Fri Nov 20, 2020 11:25 am Post subject: |
|
|
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 |
|
|
Csimbi I post too much Reputation: 94
Joined: 14 Jul 2007 Posts: 3110
|
Posted: Fri Nov 20, 2020 12:35 pm Post subject: |
|
|
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 |
|
|
LongBeardedLion Expert Cheater Reputation: 0
Joined: 10 Apr 2020 Posts: 172
|
Posted: Sun Nov 22, 2020 8:50 am Post subject: |
|
|
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 |
|
|
Csimbi I post too much Reputation: 94
Joined: 14 Jul 2007 Posts: 3110
|
Posted: Sun Nov 22, 2020 2:02 pm Post subject: |
|
|
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 |
|
|
|