LongBeardedLion Expert Cheater
Reputation: 0
Joined: 10 Apr 2020 Posts: 174
|
Posted: Sat Sep 12, 2020 9:04 pm Post subject: RTS detect specific worker working/tied to a farm? |
|
|
In the game im working on, age of empires 2. Workers (villagers), get their food from a farm. You send the worker to this farms, and they become tied to them, and never leave.
Like you can see here:
https://i.redd.it/fsmrlh4xzad01.png
or here:
https://holygeekola.files.wordpress.com/2010/08/aoe-farm.jpg
Im trying to find out what is the address of the unit that is currently working in a specific farm in age of empires 2. Specifically that unit.
In other words. Lets say i have the farm unit address that i obtained through the health of the farm. How do i find the address of the villager connected to it?
Or if thats not possible, then the other way around. If i have the vil address, and i need find the farm he is working on. How should i do?
Its been hours trying to solve it
I tried making many searches. Looking for what writes to address. Comparing structures. And going on browse memory to see the changes in both the farm and the unit.
The best i could find was a very obscure address completely out of the both the unit object and the farm object. That changed if the farm was worked on or was not. And the value in that address was of the villager.
That address seems completely disconnected from the farm and the vil, and seems to be randomly generated, and i dont know how do i get a pointer that connects to them.
What method should i use to solve this challenge?
Please help.
|
|