cheat-engine / cheat-engine

Cheat Engine. A development environment focused on modding
http://cheatengine.org
14.1k stars 2.15k forks source link

AOBScan not working (.net 8.0 ) #2892

Closed Y-A-K-E closed 2 months ago

Y-A-K-E commented 2 months ago

game : tModLoader

Steam Link
Steam--Library--tModLoader--Bates --Last option (The Bates version of the game is using .net 8.0)

20240425001658


.net info , working.

20240425123241


memory viewer ,working .

20240425124046


gui scan, not working

20240425124648


code injection or full injection , AA script is workging

20240425125025

aobscan or aobscanregion , AA script not workging.

20240425131349


Use lua function getAddressSafe and readByte. is working.

local start_addr = getAddressSafe('Terraria.Main::get_LocalPlayer')
local end_addr  = start_addr + 0xD0
printf("addr : %X ~ %X",start_addr,end_addr) 
printf('readByte:%X',readByte(start_addr)) 

output print

addr : 7FFB37898C60 ~ 7FFB37898D30 
readByte:55 

use Lua AOBScan or createMemScan , not working

local ms = createMemScan()
local fl = createFoundList( ms )
local aob_str = [[55]]

ms.firstScan(
  soExactValue, --scanOption
  vtByteArray, --vartype
  nil, --roundingtype
  aob_str, --input1  If required by the scanoption this is a string of the given variable type
  nil,  --input2 If requires by the scanoption this is the secondary input
  start_addr,  --startAddress
  end_addr,  --stopAddress
  "", --protectionflags  --  "" = Find everything (is the same as "*X*C*W" )
  0, --alignmenttype  -- 0 = No alignment check
  nil, --alignmentparam
  true, --isHexadecimalInput
  false,--isNotABinaryString
  false, --isunicodescan
  false --iscasesensitive
   )
ms.waitTillDone()
fl.initialize()
local result = nil
if fl ~= nil and fl.getCount() > 0 then
  result = createStringlist()
  for i = 1, fl.getCount() do result.add( fl.getAddress( i - 1 ) ) end
end
fl.destroy()
ms.destroy()
return result

return nil

cheat-engine commented 2 months ago

Try this: Go to settings->scan settings and make sure mem_private, mem_image and mem_mapped are checked and when scanning for an aob, also make the copy-on-write checkbox grey

Y-A-K-E commented 2 months ago

Try this: Go to settings->scan settings and make sure mem_private, mem_image and mem_mapped are checked and when scanning for an aob, also make the copy-on-write checkbox grey

yes,is working!