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 


Timer code
Goto page 1, 2, 3, 4  Next
 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking
View previous topic :: View next topic  
Author Message
bknight2602
Grandmaster Cheater
Reputation: 0

Joined: 08 Oct 2012
Posts: 586

PostPosted: Sun Mar 13, 2016 11:47 am    Post subject: Timer code Reply with quote

I have an address list loaded with opCodes, it is a timer that counts down from 60 to 0.
What I'm looking for is code to stop the timer without crashing the game.
ETA: I tired injecting code to do nothing, but that crashed the game.



2016-03-13_choc_timer.png
 Description:
 Filesize:  40.45 KB
 Viewed:  8690 Time(s)

2016-03-13_choc_timer.png


Back to top
View user's profile Send private message Yahoo Messenger
realrbn
Expert Cheater
Reputation: 3

Joined: 22 Jan 2016
Posts: 112

PostPosted: Sun Mar 13, 2016 2:06 pm    Post subject: Reply with quote

Have you tried doing it so it constantly sets the Timer to for example 20?
Have you tried making it so it Increases the Number instead of Decreasing?

_________________
My +14 Factorio Table: *Click*
Back to top
View user's profile Send private message
bknight2602
Grandmaster Cheater
Reputation: 0

Joined: 08 Oct 2012
Posts: 586

PostPosted: Sun Mar 13, 2016 2:13 pm    Post subject: Reply with quote

Only tried the "do nothing" approach. I'm not sure which stack variable would have to be set to your example of 20.
I have no knowledge of which stack variable or how to make it increase, but that might be a good idea, although intuitively seems like this may crash the game also.
Back to top
View user's profile Send private message Yahoo Messenger
realrbn
Expert Cheater
Reputation: 3

Joined: 22 Jan 2016
Posts: 112

PostPosted: Sun Mar 13, 2016 2:46 pm    Post subject: Reply with quote

You could try to do [code] mov [youradress+offset],#20 or mov [youradress+offset],(Float)20 If it's a Float Value...
_________________
My +14 Factorio Table: *Click*
Back to top
View user's profile Send private message
bknight2602
Grandmaster Cheater
Reputation: 0

Joined: 08 Oct 2012
Posts: 586

PostPosted: Sun Mar 13, 2016 2:54 pm    Post subject: Reply with quote

Pardon the question, but what [youradress+offset] are you referring?
I suspect it is an integer number since it is counting down from 60 seconds(60000) to 0.
Back to top
View user's profile Send private message Yahoo Messenger
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4197

PostPosted: Sun Mar 13, 2016 3:32 pm    Post subject: Reply with quote

Have you checked to see if the instruction is accessing other addresses? Chances are, you'll need to filter them out.
Back to top
View user's profile Send private message
bknight2602
Grandmaster Cheater
Reputation: 0

Joined: 08 Oct 2012
Posts: 586

PostPosted: Sun Mar 13, 2016 3:51 pm    Post subject: Reply with quote

No I guess just a single level(?) as all I did is search for what writes to the address I found that represents the clock time shown in the game.
Back to top
View user's profile Send private message Yahoo Messenger
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4197

PostPosted: Sun Mar 13, 2016 3:58 pm    Post subject: Reply with quote

Right-click on the instruction inside the memory viewer. You have the option to see what addresses that instruction is accessing. If it's more than one, you'll have to filter them out.
Back to top
View user's profile Send private message
bknight2602
Grandmaster Cheater
Reputation: 0

Joined: 08 Oct 2012
Posts: 586

PostPosted: Sun Mar 13, 2016 4:01 pm    Post subject: Reply with quote

I should have included that in the first post, sorry. The top image is of all the stack.


2016-03-13_Write2.png
 Description:
 Filesize:  20.61 KB
 Viewed:  8630 Time(s)

2016-03-13_Write2.png



2016-03-13_Write.png
 Description:
 Filesize:  21.09 KB
 Viewed:  8631 Time(s)

2016-03-13_Write.png


Back to top
View user's profile Send private message Yahoo Messenger
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4197

PostPosted: Sun Mar 13, 2016 4:06 pm    Post subject: Reply with quote

No. I'm not talking about the address. The instruction that you get in those two pictures...

Click on 'show in disasembler'. From the memory viewer, right-click on the instruction to see what addresses are being accessed by it.

Alternatively, in the debugger window that you're showing in your pictures, you can right-click on an empty, white space to check if opcodes are accessing other addresses. This will generate a number ( 1 to 8 ), which will tell you if the instruction is accessing multiple addresses.
Back to top
View user's profile Send private message
bknight2602
Grandmaster Cheater
Reputation: 0

Joined: 08 Oct 2012
Posts: 586

PostPosted: Sun Mar 13, 2016 4:48 pm    Post subject: Reply with quote

I haven't done this too often, so I hope I imaged what you were looking for.


2016-03-13_Addresses.png
 Description:
 Filesize:  23.86 KB
 Viewed:  8610 Time(s)

2016-03-13_Addresses.png


Back to top
View user's profile Send private message Yahoo Messenger
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4197

PostPosted: Sun Mar 13, 2016 5:11 pm    Post subject: Reply with quote

Since the instruction that you are wanting to manipulate is accessing several other addresses besides the one that you're interested in, you'll have to write a script that filters out the bad addresses so that the nop only affects the address that you're interested in. Doing so should keep the target from crashing, assuming that the address that you're interested in isn't critical.

You can study the last step of the CE tutorial that covers data structure dissection. Other ways for finding filter ID's:

++METHOS wrote:

  • You can use a pointer address for your filter, inside of your script, for the value that you are trying to manipulate.
  • You can use pointer trees inside of the data structure to find something viable.
  • You can shift the data structure (+ or -) and/or expand its size to find something useful.
  • You can use the structure spider to find workable strings and/or for comparative analysis.
  • You can check the register values by attaching the debugger or setting a breakpoint to see if something can be used for your filter.
  • You can check to see if there are any instructions that are exclusive to the address/value that you are trying to manipulate and store the address for your filter by creating a second injection point.
  • You can check to see if there are any instructions that are exclusive to any other address/value inside of the data structure for the address/value that you are trying to manipulate and store the address for your filter by creating a second injection point.
  • You can analyze assembly code to see if an identifier is being checked or assigned somewhere.
  • Et al.


Before doing anything, I would check to see which instructions 'access' your timer address, then, in the debugger window, do as stated above...right-click to see if opcodes access other addresses. If there is an opcode that is only accessing 1 address (your timer address), then that can be used for your filter.
Back to top
View user's profile Send private message
bknight2602
Grandmaster Cheater
Reputation: 0

Joined: 08 Oct 2012
Posts: 586

PostPosted: Sun Mar 13, 2016 5:24 pm    Post subject: Reply with quote

From tutorial determining pointers forward I have failed miserably, and never acquired any proficiency in those lessons. Thus if you would give me what you think might be a good starting place I would be appreciative.
Back to top
View user's profile Send private message Yahoo Messenger
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4197

PostPosted: Sun Mar 13, 2016 5:34 pm    Post subject: Reply with quote

I have outlined everything that you need to do, above. Aside from walking you step-by-step through the process, there's nothing more that I can do. There are written guides and videos that will walk you through each step of the tutorial. If you have any questions, just ask.

If you don't want to do the tutorial, I would start here:
++METHOS wrote:
Before doing anything, I would check to see which instructions 'access' your timer address, then, in the debugger window, do as stated above...right-click to see if opcodes access other addresses. If there is an opcode that is only accessing 1 address (your timer address), then that can be used for your filter.
Back to top
View user's profile Send private message
bknight2602
Grandmaster Cheater
Reputation: 0

Joined: 08 Oct 2012
Posts: 586

PostPosted: Sun Mar 13, 2016 8:01 pm    Post subject: Reply with quote

Quote:
Before doing anything, I would check to see which instructions 'access' your timer address, then, in the debugger window, do as stated above...right-click to see if opcodes access other addresses. If there is an opcode that is only accessing 1 address (your timer address), then that can be used for your filter.

1. How do I check to see which instructions may access the table location?
2. How do I check to see if the opcodes access other addresses?

You have done this many times and therefore it is easy and understandable for you. I'm lost to even start with any of the instructions you presented, so yes A step by step walkthrough would be appreciated.
When the "changed Addresses" debugger? is open the game shuts down like a pause, after starting the timer then those addresses populate it, but the game freezes until the "changed addresses" is turned off or closed.

So where to start?
Back to top
View user's profile Send private message Yahoo Messenger
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking All times are GMT - 6 Hours
Goto page 1, 2, 3, 4  Next
Page 1 of 4

 
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