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 


Scanning Help.

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

Joined: 22 Sep 2019
Posts: 3

PostPosted: Sun Sep 22, 2019 4:51 pm    Post subject: Scanning Help. Reply with quote

I’ve been working on a game that has a perk where when you mine a block, sometimes two blocks pop out instead of one. I’ve been attempting to make it so the blocks double every time you mine one no matter what. But, I’m having a tough time creating this. Does anyone have any suggestions how I could scan for the section of memory that makes the blocks occasionally double?
Back to top
View user's profile Send private message
Csimbi
I post too much
Reputation: 94

Joined: 14 Jul 2007
Posts: 3110

PostPosted: Tue Sep 24, 2019 2:10 am    Post subject: Reply with quote

Is there an item/spell/etc that gives you a boost for that?
If so, I'd try hacking the stat boosted when you equip that.
Back to top
View user's profile Send private message
1001wjb
How do I cheat?
Reputation: 0

Joined: 22 Sep 2019
Posts: 3

PostPosted: Tue Sep 24, 2019 3:25 pm    Post subject: Reply with quote

There isn’t sadly. Just the one perk I mentioned.
_________________
Hello
Back to top
View user's profile Send private message
Csimbi
I post too much
Reputation: 94

Joined: 14 Jul 2007
Posts: 3110

PostPosted: Wed Sep 25, 2019 12:42 am    Post subject: Reply with quote

Can the perk be upgraded?
Slim chance, but I suppose you'll take anything you can get.

Other than that, you could check what calls are made to random() when the block is mined and trace it back out the call that makes the decision based on the random value.
Back to top
View user's profile Send private message
1001wjb
How do I cheat?
Reputation: 0

Joined: 22 Sep 2019
Posts: 3

PostPosted: Wed Sep 25, 2019 2:12 pm    Post subject: Reply with quote

There is three level of the perk actually. Level 1 is a 5% chance, level 2 is a 10% chance, and level 3 is a 15% chance. But, it would be difficult for me to scan for an increased/changed value because the three levels come at different points in the game.
_________________
Hello
Back to top
View user's profile Send private message
Csimbi
I post too much
Reputation: 94

Joined: 14 Jul 2007
Posts: 3110

PostPosted: Thu Sep 26, 2019 12:32 am    Post subject: Reply with quote

Well, that's your chance right there - however slim.
Take a save where you have no perk.
At this point search for three things:
- a zero pointer
- a float 0.0
- a float 1.0

Keep playing an every now and then, continue each search for 'unchanged value'.

When you get no reductions in the number of results, buy the first level of the perk.
- the zero pointer will have become non-zero -> 'changed value'
- the float 0.0 will have become 0.05
- the float 1.0 will have become 1.05

Keep playing an every now and then, continue each search for 'unchanged value'.

When you get no reductions in the number of results, buy the second level of the perk.
- the pointer may or may not change anymore -> see how many results you have left, if just a handful, you might be lucky.
- the float 0.05 will have become 0.1
- the float 1.05 will have become 1.1

Keep playing an every now and then, continue each search for 'unchanged value'.
When you get no reductions in the number of results, buy the second level of the perk.
- the pointer may or may not change anymore -> see how many results you have left, if just a handful, you might be lucky.
- the float 0.1 will have become 0.15
- the float 1.1 will have become 1.15

At this point, you should have a pretty low number of results.
Start with the floats.
I don't recommend changing the value directly because it might cause a crash and then you have to start from scratch.
Instead, set a breakpoint on each value, one by one (you can set a number of breakpoints, not just one).
Now mine and see if the value was accessed.
Forget the ones that are not accessed and keep sieving through the ones that are and focus on those that are accessed only when mining.
Then, see what the code does with the value - if it's compared to a random value, you might have found it.
Change the value to 1.0 or 2.0 and see if it does what you need.

Sometimes, instead of a float, you have a double.
Sometimes, instead of a pointer, you have a list or just flags.

There is no golden bullet, thorough analysis is the key to success.

Good luck!
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Discussions 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