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 


Find Weapons Damage?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Tutorials
View previous topic :: View next topic  
Author Message
GreatUnknown
Cheater
Reputation: 0

Joined: 19 Oct 2014
Posts: 47

PostPosted: Mon Jan 26, 2015 8:56 am    Post subject: Find Weapons Damage? Reply with quote

I have a game where all guns except ones in floats share same addy, a one hit kill isn't possible without modifying the value of the damage each gun puts out.
As the game has multiple classes for enemies, how would I go about this?
Back to top
View user's profile Send private message
Krampus
Cheater
Reputation: 0

Joined: 22 Nov 2014
Posts: 41

PostPosted: Mon Jan 26, 2015 11:34 am    Post subject: Reply with quote

Codecave the damage-to-ent function, and just add more damage, causing a 1 hit kill.

So maybe you have a sub eax,ecx. Just codecave there, and replace ecx with something like 64. It would also be a good idea to do a compare so that you aren't taking the damage as well. If you want, just call the function through a dll, sending in the amount of damage and the enemies ID to kill them instantly. http://www.codeproject.com/Articles/29527/Reverse-Engineering-and-Function-Calling-by-Addres Good site to learn how to do that Smile

_________________
There is no spoon.
Back to top
View user's profile Send private message
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4197

PostPosted: Mon Jan 26, 2015 6:54 pm    Post subject: Reply with quote

Even if the weapons are sharing the same address as you swap them out, each weapon should have a data structure with different values in them...for example...to determine which weapon it is, or how much ammo the weapon has etc. With this information, you can filter out the weapons that you do not want to increase damage on by creating a conditional jump in your script that checks what that 'ID' value is.

Look at videos/tutorials regarding data structure dissection. The last step in the CE tutorial covers this.
Back to top
View user's profile Send private message
GreatUnknown
Cheater
Reputation: 0

Joined: 19 Oct 2014
Posts: 47

PostPosted: Thu Jan 29, 2015 3:04 am    Post subject: Reply with quote

Still no idea guys, I've seen this in CE tables before or am I mistaken? Thanks btw!
Back to top
View user's profile Send private message
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4197

PostPosted: Thu Jan 29, 2015 5:01 am    Post subject: Reply with quote

Almost always, one-hit-kill cheats are achieved by manipulating health...not weapon damage. For example, instead of altering the weapon damage, just alter the instruction that reads the health value for all characters. Easy.
Back to top
View user's profile Send private message
GreatUnknown
Cheater
Reputation: 0

Joined: 19 Oct 2014
Posts: 47

PostPosted: Fri Jan 30, 2015 2:16 am    Post subject: Reply with quote

I gotcha, sadly this game Wolfenstein NWO is complex with spawning enemies. But must be a base/main class for all enemies to spawn off logic would dictate.
Back to top
View user's profile Send private message
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4197

PostPosted: Fri Jan 30, 2015 2:24 am    Post subject: Reply with quote

Generally, there is a single instruction that accesses ALL health values...whether enemies are constantly spawning or not. Study guides for completing the last step of the CE tutorial to learn how to make use of data structure dissection to filter out your hero's health from the enemy's health. From there, simply write a script by injecting at that instruction and manipulating it so that it gives all enemies 1 health (or something). Just make sure to perform a check in there so that when health becomes 1, the originalcode gets executed so that the death sequence can play out. In order for this to be effective, you will have to inject using an instruction that 'reads' health values...which is generally going to be the case, anyways.

This is the case for nearly ALL games.
Back to top
View user's profile Send private message
GreatUnknown
Cheater
Reputation: 0

Joined: 19 Oct 2014
Posts: 47

PostPosted: Fri Jan 30, 2015 3:03 am    Post subject: Reply with quote

Cheers, I tried disarming one time but had a massive problem. So I must've done something wrong, will study last step!
This reading health value how do you mean, of course if I set it to 1 the death animation won't play so I would then add the original code along with my newmem code for it to work correctly?
Or wouldn't all enemies have one health and they would just die easily?
Back to top
View user's profile Send private message
GreatUnknown
Cheater
Reputation: 0

Joined: 19 Oct 2014
Posts: 47

PostPosted: Fri Jan 30, 2015 1:55 pm    Post subject: Reply with quote

Also struggling to find the enemies address and dissect them...
Back to top
View user's profile Send private message
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4197

PostPosted: Fri Jan 30, 2015 7:05 pm    Post subject: Reply with quote

For most games, if you are going to set the health value to 1 (for example), you must put a check in your script that will run the originalcode if the health value is 1 (as I previously noted, in order for a death sequence to play out). For example:

Code:
cmp [eax+04],(float)1.0     //compare all health values to 1
je originalcode             //if health value equals 1, run originalcode for death sequence, otherwise, manipulate health to be 1
mov [eax+04],(float)1.0
jmp originalcode


In order for this to work, you must inject your code using an instruction that 'reads' the health value constantly, as opposed to just 'writes' to it. For some games, you can even create a 'kill all' cheat by setting the health value to 0 instead of 1...with no need for a health check at all.

To find enemy health...first find hero health and check to see which instructions 'access' that address. The rest can be learned by studying the last step of the CE tutorial. Geri wrote a guide for this...follow the link in his signature.
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 Tutorials 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