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 


How to change a value after it changes in game?

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

Joined: 25 Oct 2019
Posts: 2

PostPosted: Fri Oct 25, 2019 9:35 pm    Post subject: How to change a value after it changes in game? Reply with quote

Hi,

I know next to nothing on how to do this. I am using a table that has the value I want changed, I can set it to a static value and that works, but what I'd really like to do is to be able to set a multiplier. So, after a battle I get 10 Exp, I'd like to have it go up by what ever multiplier I've selected, whether it's 2x, 3x, 1.5x, etc.

How can I go about doing this? Is this something that would be pretty easy to do?

I've attached the table. What I'm wanting to change is in the last group "Battle Related" and I'd like to set up a multiplier for both "AP After Battle" and "Exp After battle"

EDIT:
I apparently can't attach it, but here is a link to the file
filebin(dot)net/pw2icr9mlnaiahsn
Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 152

Joined: 06 Jul 2014
Posts: 4702

PostPosted: Fri Oct 25, 2019 10:05 pm    Post subject: Reply with quote

The first thing that comes to mind is code injection. Complete the CE tutorial for a brief introduction. There are also plenty of tutorials out there of varying degrees of quality.

A Lua script can emulate this behaviour. e.g. save old value, set a break-on-write breakpoint, multiply the difference, save and write the new value (I don't know if recursion would be a problem). A timer could also work if the value isn't written to that often.

_________________
I don't know where I'm going, but I'll figure it out when I get there.
Back to top
View user's profile Send private message
TrickyNick
How do I cheat?
Reputation: 0

Joined: 25 Oct 2019
Posts: 2

PostPosted: Sat Oct 26, 2019 5:10 pm    Post subject: Reply with quote

So, I think I found the line of code that does what I need, but I'm not sure.

mov [ebx+ecx],al

AL contains the value I want, correct? So I would multiply that by say 2 in order to double it?

I don't ,now if it's even possible, cause there are 2 places that write to the memory entry I located, but I think the one above is the most promising.


EDIT:
No worries, I think this is above what I can do on my own. Seems the table value changes so more than 1 thing uses it so I don't think it's easily done so that I only double it at end of a battle.
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 Lua Scripting 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