Page 1 of 1

Structure dissect

Posted: Fri Dec 24, 2021 2:14 pm
by AlexS
(Google translation)

CE automatically detects the data type in the structure window. How can I turn off automatic data type detection and manually set the data type I need when creating and filling out a structure?
For example, I need to create a "Structure dissect" window, where all data would be only of type "float", and all addresses are multiples of 4 bytes. How to do it?

Sorry for the bad english ...

Re: Structure dissect

Posted: Sun Dec 26, 2021 8:51 am
by Paul44
^ check out my 'Kena' table, and follow [Tools ~ Error & Settings ~ Maintenance scripts ~ Run All Form Scripts].
Inside that script, check out the 'openStructure' function. What is important here is, that you'll find the proper "keywords" for you to search @CEF for more details...
ps: i recall finding some of that stuff @CE's github; and part from a table posted by #FreeER @CEF. (basically, he made a table that "converts your struct to mr records" ~ iow you'll find most/all details in there)

oh yeah: i do not frequent these parts @FRF, so if i do not reply back within a couple of days then just pm me...

-EDIT-
found the reference back in my MM table: google "cheat engine Generate Memory Records From Structure"

Re: Structure dissect

Posted: Wed Dec 29, 2021 8:15 am
by aSwedishMagyar
Use this:

Code: Select all

function aGuess(address,guessType)
	return vtSingle
end
onAutoGuess(aGuess)
List of datatypes that make sense for the structure autoguess:
  • vtByte
  • vtWord
  • vtDword
  • vtQword
  • vtSingle
  • vtDouble
  • vtString
  • vtUnicodeString
  • vtByteArray
  • vtPointer
Change vtSingle to whatever datatype you want to populate the structure with. You can reset it to normal operation by having it return guessType.

What you are doing is creating a function that is called when CE is guessing the type and then registering it with onAutoGuess(), so you need to call onAutoGuess() whenever you reset the function.