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 


Dissect data/structures - Save and compare

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

Joined: 25 Aug 2017
Posts: 8

PostPosted: Wed Oct 04, 2017 8:07 am    Post subject: Dissect data/structures - Save and compare Reply with quote

First sorry for my bad english.
Question to Dark Byte.
My idea is:
Find some address (let's say health).Dissect data/structures....blah blah
Save the results (offset+address value) somewhere,restart the game.Find health address again........save and compare.I hope you understand me.
Is this possible? Or maybe in future updates?



Pic1.jpg
 Description:
 Filesize:  143.46 KB
 Viewed:  6718 Time(s)

Pic1.jpg


Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 457

Joined: 09 May 2003
Posts: 25262
Location: The netherlands

PostPosted: Wed Oct 04, 2017 8:16 am    Post subject: Reply with quote

save the memoryblock to a file and then load it back at a different location when the game has restarted (allocate first) (you may even copy/paste)
then compare against that

_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
Blayde
How do I cheat?
Reputation: 0

Joined: 25 Aug 2017
Posts: 8

PostPosted: Wed Oct 04, 2017 8:25 am    Post subject: Reply with quote

Thanks for your answer, but i am not sure if i can make it. Can you show me how? Video or post will be enough.
Back to top
View user's profile Send private message
FreeER
Grandmaster Cheater Supreme
Reputation: 53

Joined: 09 Aug 2013
Posts: 1091

PostPosted: Wed Oct 04, 2017 8:28 pm    Post subject: Reply with quote

If you don't need to restart the game you can grab the structure dissect filter lua extension by predprey here then in the structure dissect window you can

1. add the address twice
2. right click one of them and lock it (causing CE to copy the memory elsewhere)
3. change the locked address to the Shadowcopy address (right click again to see it)
4. change the value(s)
5. right click in the bottom and "Filter out different element(s)"

limitations: you can't close the game (or the saved values disappear) and you, probably, can't do multiple addresses at the same time (unless you want to keep only the values that never change across all of them).


If you do need to restart the game here's a quick script example I tested in the lua engine window:

Code:
local save = true
if save then
  local od = createSaveDialog()
  od.DefaultExt = 'mem'
  od.Filter = 'Mem (*.mem)|*.MEM'
  od.InitialDir = os.getenv("userprofile") .. "\\Desktop"
  local cancled = not od.Execute()
  local FileName = od.FileName
  od.destroy()
  if cancled then return end

  local addr = getAddressSafe(inputQuery('Address','Address',''))
  if not addr then print('canceling'); return end
  local size = tonumber(inputQuery('size','size',''),16)
  if not size then print('canceling'); return end

  local written = writeRegionToFile(FileName, addr, size)
  if written ~= size then
    print(("Warning: Write was incomplete! Asked for 0x%X wrote 0x%X."):format(size, written))
  end
else
  local od = createOpenDialog()
  od.Filter = 'Mem (*.mem)|*.MEM|All (*.*)|*.*'
  od.InitialDir = os.getenv("userprofile") .. "\\Desktop"
  local cancled = not od.Execute()
  local FileName = od.FileName
  od.destroy()
  if cancled then return end

  local file = io.open(FileName)
  if not file then print("Failed to open file"); return end
  local size = file:seek("end")    -- get file size
  file:close()

  local mem = allocateMemory(size)
  if not mem then print('Failed to allocate memory'); return end

  local read = readRegionFromFile(FileName, mem)
  print(("Loaded 0x%X bytes into %x"):format(read,mem))
  if read ~= size then
    print(("Warning: incorrect read, filesize is 0x%X but read 0x%X"):format(size, read))
  end
end


It'll ask for a file to save the memory to, the address of the memory to copy and the size. Then you change the save variable to false and run it again and it'll ask you to reopen the file and it'll print the address it allocated and copied the values to. Note that the values are in hex (you can use symbols for the address or pretty much whatever else CE allows since it's using a CE function to parse it) and sizes are in hex. Note that the size of the struct is the last offset + the size of the last element, so if the last element is a pointer at offset 28 then the size is either 2C for 32 bit or 30 for 64 bit (you can just use 30 and copy an extra 4 bytes in the case of x86).

Once you've reloaded the values you can use the extension mentioned above to filter out what's changed (or what hasn't).
Back to top
View user's profile Send private message
Blayde
How do I cheat?
Reputation: 0

Joined: 25 Aug 2017
Posts: 8

PostPosted: Thu Oct 05, 2017 2:00 am    Post subject: Reply with quote

I will try both methods and report.
Thank you.
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 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