| View previous topic :: View next topic |
| Author |
Message |
LongBeardedLion Expert Cheater
Reputation: 0
Joined: 10 Apr 2020 Posts: 174
|
Posted: Fri Sep 04, 2020 6:45 am Post subject: Address of queued unit training bar timer/percentage? |
|
|
In Age of Empires 2 and most RTS, when you train a unit, there is a timer/percentage in the building that is time that will take for the unit to train.
So im trying to know where is this percentage that starts each time you queue a unit.
But i cant find it exactly.
All i can find is the percentage when you select a building. But not when the building is not selected. As if its just a display counter. So if i deselect the building the value defaults to 0.
Any tips?
Here is a screenshot with the percentage below in the bar in red:
https://gamefabrique.com/screenshots2/pc/age-of-empires-2-expansion-the-conquerors-03.big.jpg
|
|
| Back to top |
|
 |
LongBeardedLion Expert Cheater
Reputation: 0
Joined: 10 Apr 2020 Posts: 174
|
Posted: Sun Sep 06, 2020 1:22 pm Post subject: |
|
|
Bumpity bump?
BUMP BUMP
|
|
| Back to top |
|
 |
atom0s Moderator
Reputation: 205
Joined: 25 Jan 2006 Posts: 8587 Location: 127.0.0.1
|
Posted: Sun Sep 06, 2020 10:56 pm Post subject: |
|
|
Few general ways of something like that being stored:
- 1 byte - 0 to 100
- 2-4 byte - 0 to 100 (wasted memory but depends on the game and such.)
- float - 0 to 100
- float - 0 to 1, where decimal value amounts are used. (ie. 0.5 = 50% etc)
If the game does any means of protection to the data as well, could be issues with that, such as adding more to the value while its stored, xor'ing it, etc.
If it's a value you can influence easily, best bet is to look for unknown and search for increased/decreased along with specifically for 0 when possible.
_________________
- Retired. |
|
| Back to top |
|
 |
LongBeardedLion Expert Cheater
Reputation: 0
Joined: 10 Apr 2020 Posts: 174
|
Posted: Mon Sep 07, 2020 11:43 pm Post subject: |
|
|
Thank you.
I tried all your suggestions. None worked. It shows weird numbers. And none of them seem related.
I made the first search with unknown initial value.
Then i increase value as it increases the percentage.
I tried it as byte, float, 4 bytes. Nothing
What should i do? I really wanted to find this address.
Is there any other way?
I can make a video soon to show what is going on.
|
|
| Back to top |
|
 |
atom0s Moderator
Reputation: 205
Joined: 25 Jan 2006 Posts: 8587 Location: 127.0.0.1
|
|
| Back to top |
|
 |
LongBeardedLion Expert Cheater
Reputation: 0
Joined: 10 Apr 2020 Posts: 174
|
Posted: Wed Sep 09, 2020 12:15 am Post subject: |
|
|
Thank you atomos. I found it.
But its the weirdest value storing i ever found.
Basically its a timer, that depends on the type of unit you are training.
For example, trebs in the castle are 0 to 50.
Whereas vils are 0-25. Why? Who knows .
But the worst is yet to come :p.
This value changes each time you create a new unit.
So basically. There is a function that grabs a new random address out of nowhere, and starts the counter there.
I dont know how predictable that will be.
But i think i will get to do some work arounds and be able to patch it somehow.
A little injection there, with some if conditions, and probably i will be able to have some control over this.
Thank you so much.
|
|
| Back to top |
|
 |
|