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 


Need help with finding certain ASM functions

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

Joined: 18 May 2016
Posts: 1

PostPosted: Wed May 18, 2016 7:26 am    Post subject: Need help with finding certain ASM functions Reply with quote

Greetings,

I've recently hit an unexpected roadblock. Normally, I'd simply attach a debugger to see what functions alter given variable and then change its value with in-game methods. That would usually yield a few functions, each being called in a different scenario. For example, HP in any RPG could be increased with "using a potion" or decreased with "taking damage" - and those events would usually have separate functions in assembly.

However, I've just encountered a variable which is being written to each frame. Since the function that writes to it references the variable itself, it can still be changed manually. When the game wants to change it, it stores the difference in another, temporary variable, and then adds up the original and the difference right before writing to it.

The problem - how do I catch various events that change the variable, if by "listening" to the variable changes I can only find a single asm instruction which gets called every frame? Is there a way to conveniently and unambiguously trace the "difference" to see what instructions populate it?

Specifically, I'm talking about Dark Souls 3. I'd like to know whether the Souls counter is increased by killing enemies, by items use, by selling or decreased by dying. I'd like to disable Souls gain on enemy kills as well as Souls loss on player death, so the only options to gain Souls is by using and selling items.

Thanks in advance ~
Back to top
View user's profile Send private message
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4197

PostPosted: Wed May 18, 2016 12:59 pm    Post subject: Reply with quote

I don't quite understand your question/problem. You can use 'what writes' or 'what accesses' to see which instructions are handling your targeted value. If you can't tell when the value is getting changed in real time, you can set up a breakpoint to catch those changes. You may have to incorporate a filter if the instruction is not exclusive to your targeted address.

For example, if the value is getting changed and reverting back so quickly, that you are unable to notice these changes in real time, you can write a simple script that will check for those changes (e.g. if the value has increased or decreased), and have the code jump to a special section of code when that happens, and just set a breakpoint in that special section of code so that the game breaks whenever a change occurs.
Back to top
View user's profile Send private message
FreeER
Grandmaster Cheater Supreme
Reputation: 53

Joined: 09 Aug 2013
Posts: 1091

PostPosted: Sat Jun 18, 2016 5:51 pm    Post subject: Reply with quote

Probably by finding out what calls the function that changes the value you care about. Presumably each event calls the souls change code separate so you'd find where the events you don't want to happen makes that call and nop it out or change the condition that causes the call etc.

Since I can't post links yet and there are several I want to mention (regarding finding what calls a function) I moved them to notehub so I can just put one (spaced out one) here notehub . org/ m5z6p rather than figuring out how to fix 5 of them Smile

BTW, If you've tried everything you can think of then there's no shame in looking at a table someone else made and seeing what they did and then trying to discover how they figured it out from that point, though if you share yours then you should give credit (and maybe/probably ask permission if you don't want to be rude).

Disclaimer: I don't consider myself an expert, but this still sounds like a logical way to do what you want.
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 Gamehacking 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