  | 
				
				Cheat Engine The Official Site of Cheat Engine   
				
 
				 | 
			 
		 
		 
	
		| View previous topic :: View next topic   | 
	 
	
	
		| Author | 
		Message | 
	 
	
		++METHOS I post too much
  Reputation: 92
  Joined: 29 Oct 2010 Posts: 4197
 
  | 
		
			
				 Posted: Thu Feb 21, 2013 9:28 pm    Post subject: Help with 1-hit kill, dissecting data structures | 
				       | 
			 
			
				
  | 
			 
			
				I'm trying to write a 1-hit kill code for Dynasty Warriors 6. The instruction that accesses the health address is shared, and manipulates the health value for all characters in the game. I am comparing 4 addresses while dissecting data structures. I have grouped two enemy-health addresses vs. two friendly-health addresses (one of them being the hero address).
 
 
The problem is, I cannot find the player ID that identifies each character as enemy or ally. There are no purple addresses anywhere in the list. I have even written the addresses out as: xxxxxxxx-400  :and nothing to indicate that there is a player ID.
 
 
Thanks.
 | 
			 
		  | 
	 
	
		| Back to top | 
		 | 
	 
	
		  | 
	 
	
		Chris12 Expert Cheater
  Reputation: 1
  Joined: 27 Apr 2012 Posts: 103
 
  | 
		
			
				 Posted: Thu Feb 21, 2013 11:47 pm    Post subject:  | 
				       | 
			 
			
				
  | 
			 
			
				Strange, but it's possible that units are stored in arrays per player.
 
So player1 has an array of units belonging to him, player2 has a different array.
 
 
Figure out how the hp is accessed exactly and you'll eventually figure the teamid out.
 | 
			 
		  | 
	 
	
		| Back to top | 
		 | 
	 
	
		  | 
	 
	
		daspamer Grandmaster Cheater Supreme
  Reputation: 54
  Joined: 13 Sep 2011 Posts: 1588
 
  | 
		
			
				 Posted: Fri Feb 22, 2013 5:26 am    Post subject:  | 
				       | 
			 
			
				
  | 
			 
			
				try do this 
 
unknow value, when its ur turn, then when its enemy turn do changed value, when its ur turn do changed value and do also unchanged value (compare to first scan).
 
until you find the  address, then check what writes to it, allocate a new mem +regisersymbol and whenever it changes make it change the allocated mem to that value.
 
And in your script do cmp like
 
cmp [newmem+0],#1
 
jne originalcode
 
je hacked value
 
jmp exit
 _________________
 I'm rusty and getting older, help me re-learn lua.  | 
			 
		  | 
	 
	
		| Back to top | 
		 | 
	 
	
		  | 
	 
	
		Smanettone83 Expert Cheater
  Reputation: 3
  Joined: 21 Feb 2011 Posts: 146 Location: Italia
  | 
		
			
				 Posted: Fri Feb 22, 2013 7:04 am    Post subject: Re: Help with 1-hit kill, dissecting data structures | 
				       | 
			 
			
				
  | 
			 
			
				 	  | GNIREENIGNE wrote: | 	 		  I'm trying to write a 1-hit kill code for Dynasty Warriors 6. The instruction that accesses the health address is shared, and manipulates the health value for all characters in the game. I am comparing 4 addresses while dissecting data structures. I have grouped two enemy-health addresses vs. two friendly-health addresses (one of them being the hero address).
 
 
The problem is, I cannot find the player ID that identifies each character as enemy or ally. There are no purple addresses anywhere in the list. I have even written the addresses out as: xxxxxxxx-400  :and nothing to indicate that there is a player ID.
 
 
Thanks. | 	  
 
 
you can try to search a pointer of your health... so you can write a script into the code that "write" to you address and check if your pointer value it's the same of base address of your health.
 
 
example:
 
 
 	  | Code: | 	 		  
 
cmp baseaddress, Mypointer
 
 | 	  
 _________________
  | 
			 
		  | 
	 
	
		| Back to top | 
		 | 
	 
	
		  | 
	 
	
		++METHOS I post too much
  Reputation: 92
  Joined: 29 Oct 2010 Posts: 4197
 
  | 
		
			
				 Posted: Fri Feb 22, 2013 1:57 pm    Post subject:  | 
				       | 
			 
			
				
  | 
			 
			
				 	  | Chris12 wrote: | 	 		  Strange, but it's possible that units are stored in arrays per player.
 
So player1 has an array of units belonging to him, player2 has a different array.
 
 
Figure out how the hp is accessed exactly and you'll eventually figure the teamid out. | 	  Hi. Thanks for responding. I'm not sure what you mean here when you say 'how the hp is accessed exactly'. The game is an open battlefield. In single player mode, you are playing against the computer. You have an army, the computer has an army. Each side, enemy and ally, have color-coded health bars to indicate friend or foe. You cannot harm your own men and vice verca. That being the case, there should be code somewhere that tells the game which side the player is on. Even if, for example, each general/captain etc. has their own group of men assigned to them, thus have a unique player ID, there should still be, at the very least, a line of code that assigns the color to the health bar - this should be the same, no matter what.
 
 
 
 
 
 	  | Flashacking wrote: | 	 		  try do this 
 
unknow value, when its ur turn, then when its enemy turn do changed value, when its ur turn do changed value and do also unchanged value (compare to first scan).
 
until you find the  address, then check what writes to it, allocate a new mem +regisersymbol and whenever it changes make it change the allocated mem to that value.
 
And in your script do cmp like
 
cmp [newmem+0],#1
 
jne originalcode
 
je hacked value
 
jmp exit | 	  Hi. Thanks for responding. I'm not sure I follow you. Just to clarify, though, this game is an open battlefield. Each soldier carries their own health address. Sometimes, these addresses are shared and reused during battle, such as, when a soldier dies and a new soldier appears on the screen and gets hit. There are way too many addresses to simply manage them individually.
 
 
 
 
 
 	  | Smanettone83 wrote: | 	 		  you can try to search a pointer of your health... so you can write a script into the code that "write" to you address and check if your pointer value it's the same of base address of your health.
 
 
example:
 
 
 	  | Code: | 	 		  
 
cmp baseaddress, Mypointer
 
 | 	 
  | 	  Hi. Thanks for responding. So, you're saying instead of checking player ID and doing a compare, I should check address and do the compare with that? I've never done that before...I'm not sure how to go about it.
 
Based on what you've written, how would I write this to do a proper compare:
 
 
 
 
Thanks, everyone.
 | 
			 
		  | 
	 
	
		| Back to top | 
		 | 
	 
	
		  | 
	 
	
		 | 
	 
 
  
	 
	    
	   | 
	
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
  | 
   
 
		 |