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 


I'm 110% sure I am going about this the hard way...

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Discussions
View previous topic :: View next topic  
Author Message
CodeRipper
Newbie cheater
Reputation: 0

Joined: 07 Apr 2023
Posts: 13

PostPosted: Mon Apr 10, 2023 6:50 pm    Post subject: I'm 110% sure I am going about this the hard way... Reply with quote

I'm 110% sure I am going about this the hard way but I am learning as I go so it is not a wasted journey...

Anyhow, I have (simplified version) 3 player stats, lets say Health, Stamina and Food; If after the first scan I find that Health has an address of 1C6182B5808 and Stamina has an address of <health address>+18, the 18 is an offset, correct? And I go on to find all the other offsets that I am interested in using health's address as my starting point.

How do I get all of the stats to just use health's address as their starting point and then add their respective offsets withing me needing to go to each entry and manually enter the health address.

So far I have been going in an entering the health address + offset like so... (see attachment)

But feel confident there is a much simpler, automated way to do this; I tried suing the Pointer checkbox but that gave me a very different result than I expected and did not put me in the correct end address's.

Would I need to do it through a LUA script?
If so does anyone have a quick guide on how to do this rather than a more in-depth tutorial on LUA scripting. I will come back to learning LUA in more detail shortly, but for now I would just like to get to the point where I scan for and update the address list entry for just Health, and then all the others get their new addresses automagically.



Screenshot 2023-04-10 203802.png
 Description:
 Filesize:  15.81 KB
 Viewed:  2186 Time(s)

Screenshot 2023-04-10 203802.png


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

Joined: 29 Oct 2010
Posts: 4197

PostPosted: Mon Apr 10, 2023 7:26 pm    Post subject: Reply with quote

CodeRipper wrote:
but for now I would just like to get to the point where I scan for and update the address list entry for just Health, and then all the others get their new addresses automagically.
-Instead of scanning and updating each time, you can have it work every time without any effort on your part:

Check this thread.

After you manually add your address to the cheat table and you set it up for health (or whatever you choose as your base), you would simply copy/paste it as many times as you need and adjust the offset and data type accordingly.

You can also use Lua, but someone else will need to chime in for that.
Back to top
View user's profile Send private message
CodeRipper
Newbie cheater
Reputation: 0

Joined: 07 Apr 2023
Posts: 13

PostPosted: Mon Apr 10, 2023 8:19 pm    Post subject: Reply with quote

++METHOS wrote:
CodeRipper wrote:
but for now I would just like to get to the point where I scan for and update the address list entry for just Health, and then all the others get their new addresses automagically.
-Instead of scanning and updating each time, you can have it work every time without any effort on your part:

Check this ]thread.

Following your steps brings me back to a shared instruction (VCRUNTIME140.DLL)

Is it still possible to use injection?
Back to top
View user's profile Send private message
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4197

PostPosted: Mon Apr 10, 2023 8:38 pm    Post subject: Reply with quote

Yes. There are many ways to isolate the address that you are targeting.

You might look at the last step of the CE tutorial.

There are many video and written tutorials, step-by-step instructions, that will show you different ways of doing this.

Search for tutorials about filters and ID's.

++METHOS wrote:

There are many ways to filter out addresses:
  • 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 (or the use the new commonalities feature).
  • 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.
  • You can backtrace from injection point to determine of there are any instructions that are exclusive to the value or address that you are trying to manipluate
    et al.

CodeRipper wrote:
Following your steps brings me back to a shared instruction (VCRUNTIME140.DLL)

-When you follow these steps:

++METHOS wrote:

1. Once you have found your health address, you will add it to your cheat table and right-click on it to check to see what is accessing it.

2. A window should pop up and a list of instructions should populate the list. From here, you can right-click in the empty white area of the new window and check to see if the instructions are accessing any other addresses. You will see a number show up for each entry, ranging from 1 to 8. If you see any entries that are 'constantly' accessing health, and are only accessing (1) address, then you can use that instruction for your injection point, to permanently capture the health address.


... do any instructions have a (1) next to it?

What about if you target one of the other stats? So instead of checking to see what is accessing health, you check to see what is accessing stamina or food etc.. If there are any instructions that are exclusive to these addresses, then you may be able to use that for your injection point.

Likewise, if there are ANY addresses inside of the same data structure as health that are being exclusively accessed (preferably constantly), then you may be able to use that as your injection point.
Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 138

Joined: 06 Jul 2014
Posts: 4275

PostPosted: Mon Apr 10, 2023 9:38 pm    Post subject: Reply with quote

Response to first post:
CodeRipper wrote:
Health has an address of 1C6182B5808 and Stamina has an address of <health address>+18, the 18 is an offset, correct?
It's an offset from health, but that probably doesn't mean much to the game. The offset from the start of the structure it's in is probably more important. Look at what instructions access that address to get an idea of what that offset probably is.

CodeRipper wrote:
And I go on to find all the other offsets that I am interested in using health's address as my starting point.
In general, no. The only reason stamina might be related to health is because they're so close to each other in memory and are semantically related. This means they're probably stored in the same structure. If something is far away (0x10, 0x100, 0x1000- "far away" varies), it's probably not in the same structure, and the difference between these addresses is up to the randomness of the memory allocator used by the game.

CodeRipper wrote:
How do I get all of the stats to just use health's address as their starting point and then add their respective offsets withing me needing to go to each entry and manually enter the health address.
I like to create a header w/ address support (right click address list) and add child memory records (click + drag) w/ addresses "+14", "+2C", etc.

There's also "recalculate new addresses"

_________________
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
Csimbi
I post too much
Reputation: 92

Joined: 14 Jul 2007
Posts: 3102

PostPosted: Wed Apr 12, 2023 12:56 pm    Post subject: Reply with quote

Create an AA or LUA script to grab the pointer in runtime, store it to a memory location, register a symbol for that location and use that symbol in the memory record for a pointer an enter your offset(s).
Tada, automatic.
Back to top
View user's profile Send private message
CodeRipper
Newbie cheater
Reputation: 0

Joined: 07 Apr 2023
Posts: 13

PostPosted: Wed Apr 12, 2023 4:09 pm    Post subject: Reply with quote

Thank you all for the continued assistance.
ParkourPenguin wrote:
Look at what instructions access that address to get an idea of what that offset probably is.

ParkourPenguin, you may recall my other post(s) asking about this, the issue I was having was trying to see what other instructions access this address brought me to that shared code (VCRUNTIME140.DLL). I was not able to get beyond that point.
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 Apr 12, 2023 4:27 pm    Post subject: Reply with quote

As mentioned, you may not need to use those instructions. You can use the data structure dissection tool to analyze the data structure for your targeted address. In doing so, you may find that there is an address inside of that structure that has an instruction accessing it, that is exclusive to that address. You may be able to use that instruction to alter your target address.

For example, your data structure may look something like this:

Code:
0000 - 4 Bytes (Hex)   DEADBEEF : 00013039
0004 - 4 Bytes (Hex)   DEADBEF3 : 000A30A2  <-- RANDOM ADDRESS FOR INJECTION
0008 - 4 Bytes (Hex)   DEADBEF7 : 000230E1
000C - 4 Bytes (Hex)   DEADBEFB : 000330C5  <-- TARGET ADDRESS
0010 - 4 Bytes (Hex)   DEADBEFF : 000B3033
...
...


So when you create your script using the random address (and instruction), you just adjust the offset so that you can manipulate your target address. You can also store your target address using a symbol and use it as a filter so that you can inject somewhere else if you want.
Back to top
View user's profile Send private message
CodeRipper
Newbie cheater
Reputation: 0

Joined: 07 Apr 2023
Posts: 13

PostPosted: Wed Apr 12, 2023 5:10 pm    Post subject: Reply with quote

I guess I need to go back to Cheat Engine 101 class, no idea what a 'symbol' is or how to create one, along with many other suggestions on how to find a reliable address to work from.

I was just hoping to find a simple way to freeze my health and a few other stats in this game I am playing but this is proving to be far more in-depth than I had expected. Not sure if it is just that this game is one of the more complex games to hack, or if I am just missing a few required basics in my knowledge of using Cheat Engine.

If anyone has the game Jaws of Extinction or $20 burning a hole in their pocket and wants to give it a try, and maybe create a tutorial based on this game, I would be eternally grateful.

I'm enjoying using CE, but this game is proving I still have a lot to learn about hacking games.
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 Apr 12, 2023 6:50 pm    Post subject: Reply with quote

In my experience, the best way to learn is by doing. Do not feel overwhelmed. It takes time, but if you are willing to put in the work, then people will be willing to help you along the way with whatever questions that you may have.

That being said, as ParkourPenguin explained, you can do this the easy way, which is what you were asking for in the first place. Simply search for your first stat, then, once found, add your other stats using the appropriate offsets. Also as mentioned, you can recalculate new addresses so that you do not have to manually update the other stats each time.

The pointer scanner is another option.
Back to top
View user's profile Send private message
CodeRipper
Newbie cheater
Reputation: 0

Joined: 07 Apr 2023
Posts: 13

PostPosted: Wed Apr 12, 2023 11:02 pm    Post subject: Reply with quote

++METHOS wrote:
In my experience, the best way to learn is by doing. Do not feel overwhelmed. It takes time, but if you are willing to put in the work, then people will be willing to help you along the way with whatever questions that you may have.

Thank you for the words of encouragement; I am far from giving up on learning. I'm just wondering if I chose the right candidate for learning with.

++METHOS wrote:
Simply search for your first stat, then, once found, add your other stats using the appropriate offsets.

I believe I am at that point, I have found a stat and then calculated all of the offsets for the others from that first address.

I will give the 'recalculate addresses' option a try and see how that improves my life. Currently I have been finding the address for 'Energy' as it changes every second, typically decreasing unless you just ate/drank something. So I find the address for this and have calculated all of the offsets from this address for things like health, stamina, hunger, hydration, and so on, there's like 8 of them that I consider player status stats. Then with each reload I find the address for Energy and have been manually copy and pasting that address into the address for every other entry followed by the offset.

Thank you all for the support, it has helped me a great deal and rest assured I will not quit learning more about Cheat Engine.
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