Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Question about unit health

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
IMT
How do I cheat?
Reputation: 0

Joined: 04 Jan 2015
Posts: 3

PostPosted: Sun Jan 04, 2015 3:21 pm    Post subject: Question about unit health Reply with quote

Hi ya!

To learn a bit about Cheat Engine and assembly, I am trying to make a trainer for a game.

Now I stumbled on a problem.
In this game there is a player (me, obviously) and the AI. The units in the game need to eat and have a "hunger bar".

It was easy finding the addresses (screenshot 1).

Screenshot 1
Attachment 1 (can't add URL's yet Sad)

Now if I check what wrote the "Player health" address it showed me "sub dword ptr [esi+1C],01", now this makes sense.

When I open the Auto Assembler and add the "Cheat Table framework code" and the "Code injection" template, I comment the subtraction away and add it to my table.

When I activate it, it works fine. However the AI's units also do not get hungry anymore (the bastards).

When I dissect the data I find similarities though. (Screenshot 2)

Screenshot 2
Attachment 2 (can't add URL's yet Sad)

As you can see the 0008 goes from 0 to 1 and 2. Now I might be wrong but I guess that this is the player or AI number.

How can I implement this in my code injection that it only affects my units.

Thanks in advance,

IMT



screenshot2.PNG
 Description:
 Filesize:  3.23 KB
 Viewed:  7424 Time(s)

screenshot2.PNG



screenshot1.PNG
 Description:
 Filesize:  3.28 KB
 Viewed:  7424 Time(s)

screenshot1.PNG


Back to top
View user's profile Send private message
aikoncwd
Grandmaster Cheater
Reputation: 23

Joined: 21 Dec 2012
Posts: 591
Location: Spain (Barcelona)

PostPosted: Sun Jan 04, 2015 3:33 pm    Post subject: Reply with quote

Hi

If you try to beat CE tutorial step 9 you will learn how to do it Very Happy There are many ways to achieve this:

- Stackview info
- struct dissect
- registers compare

First try to beat step 9, if you continue with problems I will help you more deeper.

EDIT: Your 2nd screenshot is a bad dissection point, you must dissect ESI, not ESI+1C

EDIT2: Use groups in dissection tool, CE will tell you (using colors) which offset is used to difference the player or IA

_________________
Hey Hitler
Test here your skill with CheatEngine, I coded a challenge for you. Try to beat it!
HERE
Back to top
View user's profile Send private message
IMT
How do I cheat?
Reputation: 0

Joined: 04 Jan 2015
Posts: 3

PostPosted: Mon Jan 05, 2015 7:58 pm    Post subject: Reply with quote

Thanks for the reply.

I did the tutorial (needed YouTube though) but now I get it.
Already found it, thanks for helping.

And for dissecting I used "0B19737C", "0B197404" and "0B19748C".

Anyway thanks for helping me out.
Back to top
View user's profile Send private message
aikoncwd
Grandmaster Cheater
Reputation: 23

Joined: 21 Dec 2012
Posts: 591
Location: Spain (Barcelona)

PostPosted: Mon Jan 05, 2015 8:29 pm    Post subject: Reply with quote

IMT wrote:
Thanks for the reply.

I did the tutorial (needed YouTube though) but now I get it.
Already found it, thanks for helping.

And for dissecting I used "0B19737C", "0B197404" and "0B19748C".

Anyway thanks for helping me out.


Just a tip:

0B19737C is the address of player health, you showed [ESI+1C]. This means:

ESI = B197360 = Player Base Structure
+1C is the offset pointing to Health
+24 is the offset that determine player or IA

Then just add this:

Code:
label(enemy)
cmp [esi+24],0
jne enemy
//here, [esi+1C] will point at player's health
mov [esi+1C],A //set player's healt  = 10
jmp return
enemy:
//here, [esi+10] will point to a enemy health
mov [esi+1C],0 //set enemy's healt  = 0
jmp return


It's better to use the base pointer (ESI) in the structure dissect rather than ESI+OFFSET. You used ESI+1C, imagine that the offset to determine player or IA is located at ESI+2... doing this you will never find that offset on the tool

Smile

anyway; Congrats Very Happy

_________________
Hey Hitler
Test here your skill with CheatEngine, I coded a challenge for you. Try to beat it!
HERE
Back to top
View user's profile Send private message
IMT
How do I cheat?
Reputation: 0

Joined: 04 Jan 2015
Posts: 3

PostPosted: Tue Jan 06, 2015 2:12 am    Post subject: Reply with quote

But how do I know what ESI is? Because I searched for the value of health and got that address.

Edit: Already found it. Embarassed
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites