|
Cheat Engine The Official Site of Cheat Engine
|
View previous topic :: View next topic |
Author |
Message |
gibberishh Cheater Reputation: 1
Joined: 30 Aug 2021 Posts: 45
|
Posted: Tue Jun 21, 2022 1:39 am Post subject: Simplify Table Updates by Linking Memrecs |
|
|
Maybe I'm already late to the party, but I don't see many tables using these tricks, so I'm going to explain them. Maybe someone will benefit. I don't know what it is technically called, but this is a way to 'link' addresses across memory records, just like we can 'link' dropdown lists.
Most table makers (from tables I've seen) currently create memory records in one of these ways:
1. Somehow find a 'base' address and copy-paste that across all pointers. E.g. Health: Pointer = game.exe+3120A, Offset = 20. Mana: Pointer = game.exe+3120A, Offset = 24. Stamina = game.exe+3120A, Offset = 28.
2. Use aobscans to find the 'base' address. That base address is assigned to a memory region (let's call it MyPlayer) which is then used to build all pointers. E.g., Health: Pointer = MyPlayer, Offset = 20, Mana: Pointer = MyPlayer, Offset = 24, Stamina: Pointer = MyPlayer, Offset = 28.
There are 2 very good tricks for simplifying basic tables, especially if you don't want to (or can't) use aobscans:
1. Nesting: Find your base address and create a memory record (let's name it Base): Address = $process+3120A. Note that you can do this even if you use aobscans. Just create your base memory record as an address or pointer, whichever is applicable. Now, nest all your other memory records under it in the following way: Health: Address = +20. Mana: Address = +24. Stamina: Address = +28. Note that these are NOT pointers. Enter these offsets into the Address field. Your table will look like:
Base
-|--Health
-|--Mana
-|--Stamina
Thus, when the game is updated and the base address changes, you need to update it in only one place.
2. Linking: This is the big one. Once you've found your base address, create its memory record just like in the previous example. Let's again name it Base.
Now create your other memory records this way:
Health: Pointer = (Base), Offset = 20.
Mana: Pointer = (Base), Offset = 24.
Stamina: Pointer = (Base), Offset = 28.
That is, enter the name of your base record within parentheses, just like you would do for linking dropdowns. AFAIK, you cannot have spaces or special characters in the record name for this to work, but it's still awesome because there is no nesting involved. You can place your memory record wherever you wish, and still need to update only one record when the game version changes. (Nesting has its own uses and advantages though, so don't ignore that!)
My intention is not to present these as alternatives to aobscan-based pointers (though they work for that too). But if you find yourself copy-pasting hard-coded pointer addresses every time your games update, please switch to one of these methods!
* I don't know how far back in time the nesting and linking methods go. I'm using CE 7.2, but possibly a few versions earlier might also support these structures.
_________________
It's not cheating. It's playing by my rules. |
|
Back to top |
|
|
mece Newbie cheater Reputation: 2
Joined: 29 Jun 2014 Posts: 17
|
Posted: Tue Jun 21, 2022 1:55 pm Post subject: |
|
|
There was an issue with the first trick (nesting): values of record which addresses were defined with this method update with significant (5-10 seconds) lag.
|
|
Back to top |
|
|
ParkourPenguin I post too much Reputation: 147
Joined: 06 Jul 2014 Posts: 4518
|
Posted: Tue Jun 21, 2022 2:35 pm Post subject: |
|
|
mece wrote: | There was an issue with the first trick (nesting): values of record which addresses were defined with this method update with significant (5-10 seconds) lag. | I can't replicate that behaviour.
Code: | [ENABLE]
{$lua}
if syntaxcheck then return end
if memrec.Count == 0 then
local header = AddressList.createMemoryRecord()
header.IsAddressGroupHeader = true
header.Address = 'foo'
header.Description = 'Header'
header.appendToEntry(memrec)
local child = AddressList.createMemoryRecord()
child.Address = '+800'
child.Type = vtDword
child.Description = 'Value'
child.appendToEntry(header)
end
{$asm}
globalalloc(foo,4096)
createthread(foo)
foo:
add dword ptr [foo+800],1
ret
[DISABLE]
| This updates instantly.
_________________
I don't know where I'm going, but I'll figure it out when I get there. |
|
Back to top |
|
|
gibberishh Cheater Reputation: 1
Joined: 30 Aug 2021 Posts: 45
|
Posted: Tue Jun 21, 2022 6:39 pm Post subject: |
|
|
ParkourPenguin wrote: | mece wrote: | There was an issue with the first trick (nesting): values of record which addresses were defined with this method update with significant (5-10 seconds) lag. | I can't replicate that behaviour.
|
I concur with ParkourPenguin. I have a couple of tables with 20+ nested entries (created using the Add Address Manually button not through code). Some of my nestings are two levels deep. All updates are instant.
In fact, I even have a tree with 40 recs all nested under each other. Each record is of type 64-byte AoB and each address is +40 (which is hex for 64). I use it to get very wide and manipulatable 'memory views' at any given address. It's handy for finding data that's usually close together. E.g., once I find Health, I might see Mana and Stamina in the same neighborhood. I can change and/or freeze the record to reflect changes in the game. Then I just count the distance and use that as my offset.
Maybe you noticed this lag with a particular (old) version of CE and/or a particular game. Those are just guesses.
_________________
It's not cheating. It's playing by my rules. |
|
Back to top |
|
|
mece Newbie cheater Reputation: 2
Joined: 29 Jun 2014 Posts: 17
|
Posted: Thu Jun 23, 2022 1:29 am Post subject: |
|
|
ParkourPenguin wrote: | I can't replicate that behaviour. |
Now I can't replicate that behaviour too on 7.4.
That time I forced repaint of the address list as workaround.
|
|
Back to top |
|
|
MarcRené Newbie cheater Reputation: 0
Joined: 20 Mar 2017 Posts: 15
|
Posted: Sun Jun 26, 2022 10:37 am Post subject: |
|
|
Had the problem of a 5-10 seconds delay, too.
DB pointed out that, when using a code injection to get the address, it is faster to make the base adress a pointer.
So instead of [base] as adress, make the base entry a pointer with the address "base" (not the missing [] in the adress) and offset +0.
|
|
Back to top |
|
|
|
|
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
|
|