View previous topic :: View next topic |
Author |
Message |
LongBeardedLion Expert Cheater
Reputation: 0
Joined: 10 Apr 2020 Posts: 173
|
Posted: Thu Apr 23, 2020 12:45 pm Post subject: How to get address units that are created in the game? |
|
|
Im learning how to reverse engineer with Age of Empires. And old RTS.
I have already learned lots of cool things.
But im stuck in a step. It seems i cant get pointers to specific units. Because they are created in game.
So it seems their addresses are created and are non existent at first.
So how am i going to get a pointer for them? Seems quite hard.
Following my noob intuition. I think the way to go would be, to get to the pointer of whatever it is that creates units. Or whatever it is that registers the new units.
Then make a script that registers these addresses. And then reorganizes them. And finds the other important addresses. Like unit hp. Etc...
Can anyone help me with this pls?
|
|
Back to top |
|
 |
happyTugs Cheater
Reputation: 0
Joined: 23 Apr 2020 Posts: 26
|
Posted: Mon Apr 27, 2020 6:15 am Post subject: How to get address units that are created in the game? |
|
|
Quote: | Because they are created in game. |
You are correct.
Every time you spawn a unit, you instantiate an object(i.e the unit) from a class(i.e Archer, Solider, Warrior,etc.).
Therefore, it's difficult to find pointers to these units since these objects are presumably destroyed when they die, or when you restart the game.
Quote: | So how am i going to get a pointer for them? Seems quite hard. |
Instead of finding pointers, try to find the instruction, or opcode, that accesses the value of interest.
Afterwards, make a script from there.
_________________
This is a block of text that can be added to posts you make. There is a 300 character limit |
|
Back to top |
|
 |
LongBeardedLion Expert Cheater
Reputation: 0
Joined: 10 Apr 2020 Posts: 173
|
Posted: Mon Apr 27, 2020 11:34 am Post subject: |
|
|
Thanks.
So for example if i want to make a script that accesses all the Archers that i have selected.
I need to first find the pointer for the type of unit: Archers.
And then somehow automate a script so that it gets all the archers created? By searching for them and storing them in an array?
I tried doing this but it seems that the creation of units. Meaning the address that they are assigned to is completely random, and follows no pattern. So i cant predict the offset of the unit.
Sounds extremelly complex.
Or the solution has more to do with Ultimap ? Or code filter?
There is another messy alternative, that is. I found the pointer that accesses the selected unit. Meaning if any selected unit. Will give me its position in that pointer.
So what i can do is. Code a script even if outside of cheat engine. With lets say AHK. And make it so that when i fire the script. It goes through all the units i have selected and gets all their addresses. Its messy and not the best route. But its still an alternative.
The best thing would be. To be able to get the address of every single archer right at the spot and time they are created. Without so much complications.
Pls help me.
|
|
Back to top |
|
 |
happyTugs Cheater
Reputation: 0
Joined: 23 Apr 2020 Posts: 26
|
Posted: Mon Apr 27, 2020 7:07 pm Post subject: |
|
|
Quote: | I need to first find the pointer for the type of unit: Archers. | I think there's a misconception here. A pointer references a location in memory. I think you meant to say the instructions, or opcodes, that pertain to the units themselves whether it be health, or their stats in general. Quote: | Meaning the address that they are assigned to is completely random, and follows no pattern. So i cant predict the offset of the unit. | These addresses are random as they are dynamic addresses and will change every time you restart the game.
Alternatively, if you can't find those values, then perhaps modify your resources, construction, research, etc. instead, which ultimately allows you to make such units.
_________________
This is a block of text that can be added to posts you make. There is a 300 character limit |
|
Back to top |
|
 |
LongBeardedLion Expert Cheater
Reputation: 0
Joined: 10 Apr 2020 Posts: 173
|
Posted: Mon Apr 27, 2020 11:59 pm Post subject: |
|
|
>Alternatively, if you can't find those values, then perhaps modify your resources, construction, research, etc. instead, which ultimately allows you to make such units.
That sounds like a job for Function Hacker? Or with cheat engine, Ultimap. But Ultimap does not work in my laptop .
What else can i do?
|
|
Back to top |
|
 |
Dark Byte Site Admin
Reputation: 470
Joined: 09 May 2003 Posts: 25784 Location: The netherlands
|
Posted: Tue Apr 28, 2020 2:07 am Post subject: |
|
|
Find the code that accesses a unit (doesn't have to be a write)
Then hook there to get the addresses of all units in the game
You'll have to find a way to distinguish between unit types and team. Use dissect data and compare structure for that
Also, selection is usually a pointer or pointer array. You can use a pointerscan for that and once you've found some pointers, see what happens when you adjust one of the offsets
_________________
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 |
|
 |
|