| View previous topic :: View next topic |
| Author |
Message |
LongBeardedLion Expert Cheater
Reputation: 0
Joined: 10 Apr 2020 Posts: 174
|
Posted: Thu Apr 30, 2020 2:18 am Post subject: Changing value only happens when i move unit? |
|
|
All i need is a little hint on how to solve this.
I made an awesome script that makes units attack at a specific time. The only problem is, the value does not update until i touch the unit or move the unit.
That makes the whole thing pointless.
Because then even if i automatically update the value that makes them move. They only actually move if i update something in them. Sometimes just clicking them. Which is not good.
So nothing happens until i actually move them somewhere or click them.
I know this is a typical thing because i have also noticed this happening in other games.
In other situations for example for turned based games, i have seen in some games it is needed a end turn for the game to actually update a score or gold. It does not update live.
How do i make it so that it updates live, or refresh without having to select my units manually? Because if this doesnt happen then the whole thing is pointless. Please help me.
|
|
| Back to top |
|
 |
Dark Byte Site Admin
Reputation: 471
Joined: 09 May 2003 Posts: 25840 Location: The netherlands
|
Posted: Thu Apr 30, 2020 2:49 am Post subject: |
|
|
While it doesn't show it has had an effect, it actually does, it's just not being rendered because the game has had to need to render it as it think it hasn't been changed (so saving cpu cycles not redrawing something)
You can go really deep into the game code to find out where the graphical rendering routine is, then find another routine that runs in the same thread as the rendering engine but a lot more often like every second or less. Then when you change something do a hook into that fast running code, let it run the rerender engine (and set the state that it has to re-render the unit values) and afterwards stop to save cpu time.
in short: It is not worth it
_________________
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 |
|
 |
LongBeardedLion Expert Cheater
Reputation: 0
Joined: 10 Apr 2020 Posts: 174
|
Posted: Thu Apr 30, 2020 1:37 pm Post subject: Video showing the problem |
|
|
| Dark Byte wrote: | While it doesn't show it has had an effect, it actually does, it's just not being rendered because the game has had to need to render it as it think it hasn't been changed (so saving cpu cycles not redrawing something)
You can go really deep into the game code to find out where the graphical rendering routine is, then find another routine that runs in the same thread as the rendering engine but a lot more often like every second or less. Then when you change something do a hook into that fast running code, let it run the rerender engine (and set the state that it has to re-render the unit values) and afterwards stop to save cpu time.
in short: It is not worth it |
Thanks Dark Byte. But i will not quit until i have this working. I will learn whatever is necessary. I want to make a great mod that makes tactics and i need this to happen first. And i need this to happen.
I made the video showing exactly all the process behind what im trying to do. And what fails to happen.
Basically im trying to do a circle tactic with my units. And make them attack only on specific times. Like this historical cavalry archer tactic.
The problem is that they dont respond to the No Attack Stance, unless i click them. Which makes it pointless then to make it automated. Because the point is to make it work without clicking.
I put some effort into this. And please i will take any time and any effort to make it happen. And then i will make a video on youtube showing how cheat engine made me achieve it.
Cheat engine is a great tool, and im sure this is no challenge to it. So there is only some little thing here that is escaping us.
Please watch my video, make it fast forward. Help me.
Thanks so much for all the support so far. I learned a lot.
Video:
vimeo. com/413716232
|
|
| Back to top |
|
 |
LongBeardedLion Expert Cheater
Reputation: 0
Joined: 10 Apr 2020 Posts: 174
|
Posted: Fri May 01, 2020 8:50 pm Post subject: |
|
|
bumpity bump
|
|
| Back to top |
|
 |
ParkourPenguin I post too much
Reputation: 152
Joined: 06 Jul 2014 Posts: 4722
|
Posted: Fri May 01, 2020 11:04 pm Post subject: |
|
|
There's not much other people can easily do besides tell you to figure it out.
I doubt what you're trying to do is as easy as changing a single value. Try scanning for unknown initial value then changed/unchanged (not increased/decreased) for a single unit's stance until you can't narrow it down any further. You'll need to look at every single one of those values and figure out what each value is (pointer? integer? float? when is it accessed? what is done with the value in code?). This won't find any memory reallocated by the game when the stance is changed.
If that doesn't work out, find the code that handles mouse clicks on change stance buttons and figure out what that code does. Ultimap / ultimap 2 / call filter might help with the right hardware. Otherwise, look at accesses to related values (changed / unchanged scans) and work your way up the callstack reverse engineering those functions along the way. (actual reverse engineering, not just knowing what the assembly does)
Some other software more tailored to reverse engineering would be better than CE (e.g. IDA, ghidra...)
_________________
I don't know where I'm going, but I'll figure it out when I get there. |
|
| Back to top |
|
 |
LongBeardedLion Expert Cheater
Reputation: 0
Joined: 10 Apr 2020 Posts: 174
|
Posted: Fri May 01, 2020 11:55 pm Post subject: |
|
|
Thanks parkourpenguin. I have been coming here to check my post every hour.
It seems it will be a complicated journey. But sure it will pay off. Because im learning.
I did as you said. And i installed OllyDbg.
I found the function that works on the changing stance. Or so i think. I used hardware breakpoints.
But now i dont really now what do. Im still a beginner.
I tried nopping some lines and it crashed
I post you a screenshot of the function.
All i need to do is how to fire this function, so that it refreshes my value.
How do i fire that function? What tutorials should i watch to master this part?
I need to fire that function. Or at least the part of it that refreshes the one stance that is not getting refreshed when i change the value of the stance address.
The Opcode that changes stance is mov [esi+00000169],cl
The 4 addresses before it, they all pause when making them hardware breakpoint.
Thanks. Please help me.
| Description: |
| Cheat Engine Function that changes stance |
|
| Filesize: |
510.56 KB |
| Viewed: |
2499 Time(s) |

|
| Description: |
| Ollydbg Function that changes stance |
|
| Filesize: |
565.71 KB |
| Viewed: |
2499 Time(s) |

|
|
|
| Back to top |
|
 |
ParkourPenguin I post too much
Reputation: 152
Joined: 06 Jul 2014 Posts: 4722
|
Posted: Sat May 02, 2020 11:14 am Post subject: |
|
|
You're asking people to teach you knowledge they've accumulated over years of experience... that's not going to happen in a few forum posts.
Start reading books. Maybe look at some CTFs or crackmes for more practical information. In a few weeks/months/years, you can come back to this.
Some random links I found:
https://github.com/onethawt/reverseengineering-reading-list
Also see guidedhacking on youtube. They sometimes do some things right. In this video they use IDA.
The reason why I recommended scanning for values first is that you could get lucky and have a solution in a few minutes/hours/days.
If you're looking to make a career out of this, then sure, learn it. But if it's just to save a few mouse clicks in a game, DB already gave great advice:
| Dark Byte wrote: | | in short: It is not worth it |
_________________
I don't know where I'm going, but I'll figure it out when I get there. |
|
| Back to top |
|
 |
|