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 


Search all memory for value "not" in the curent sc

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

Joined: 21 Dec 2008
Posts: 13

PostPosted: Thu Oct 22, 2015 3:40 pm    Post subject: Search all memory for value "not" in the curent sc Reply with quote

I have a value I am looking for. When I search for it, I get many results. I have a way to cause the results I would have been interested in (which is only 3 or 4 of the total) to change and then be excluded from the search results and create an exclusion set of memory addresses.

So, I need a way to search for my value. Then take action which will cause my values of interest to change. Then search again for the reduced set that contains those locations still containing my initial search value, but are not of interest and are now known to be false positives.

Now, I would like to search for my value again in a new search that would ignore any previously identified "false" positives from my exclusion set.

Is there a way to accomplish this short of writing a script, or is scripting the only solution for this requirement?

Thanks,

Creo
Back to top
View user's profile Send private message
Zanzer
I post too much
Reputation: 126

Joined: 09 Jun 2013
Posts: 3278

PostPosted: Thu Oct 22, 2015 6:53 pm    Post subject: Reply with quote

I'm not certain how the first set becomes an exclusion set.
If you search for your value, change the value and then search for the new value...
That first set still contains the value you want. Why would you exclude it?
If the value for which you want does not change, then why would you rescan for a changed value?

Either way, sounds like you're in need of a script.
Back to top
View user's profile Send private message
creo
Newbie cheater
Reputation: 0

Joined: 21 Dec 2008
Posts: 13

PostPosted: Thu Oct 22, 2015 11:36 pm    Post subject: Reply with quote

The issue is that the first set contains matches that existed at the time of that search. Subsequent searches will only work against that set of initial matches. However, I have no easy way to narrow my search to only what is my actual target, but I can narrow my results to all things that are "not" my target.

So, if I can use those results against a new search to exclude them from future matches, then the net will be only the 2 or 3 that are what I want.

I cannot get to what I want directly from the first set because anything I do to actually identify them will destroy them since the process will force a change of state and the values I am trying to find will no longer exist. I have to find them while they exist and to do that I need a way to have an exclusion list (which I can identify through the process described earlier) to use when starting a net new search.
Back to top
View user's profile Send private message
Rydian
Grandmaster Cheater Supreme
Reputation: 31

Joined: 17 Sep 2012
Posts: 1358

PostPosted: Fri Oct 23, 2015 4:39 am    Post subject: Reply with quote

... then won't the second search "destroy" the results as well?
_________________
Back to top
View user's profile Send private message
Zanzer
I post too much
Reputation: 126

Joined: 09 Jun 2013
Posts: 3278

PostPosted: Fri Oct 23, 2015 10:00 am    Post subject: Reply with quote

Maybe the following will be helpful to get you started.
Still having a hard time identifying your exact requirement.

So lets say the value you want does not yet exist, but when it's created, you will know its starting value.
Do an initial scan for that value and then run the following script:
Code:
local found = getCurrentMemscan().FoundList
addr_check = {}
for i=0,found.Count-1,1 do
  addr_check[found.Address[i]] = true
end

Now go back in game and cause your value to become initialized.
Start a new scan and scan for the same value you did before.
Execute the following script:
Code:
local addrlist = getAddressList()
local found = getCurrentMemscan().FoundList
for i=0,found.Count-1,1 do
  if addr_check[found.Address[i]] == nil then
    addrlist.createMemoryRecord().Address = found.Address[i]
  end
end

This will add only the addresses which were not present in the first scan.
Is this what you require?


Last edited by Zanzer on Wed Nov 30, 2016 2:42 pm; edited 1 time in total
Back to top
View user's profile Send private message
creo
Newbie cheater
Reputation: 0

Joined: 21 Dec 2008
Posts: 13

PostPosted: Sat Oct 24, 2015 1:55 pm    Post subject: Reply with quote

Thanks for the example scripts.

Logically, the two scripts look to capture what I need from what I can tell. Assuming that the object addr from the first script is persistent and will be available when the second script runs.

Not being that familiar with Lua scripting though, I am not entirely sure what this will net me since it does not output any results nor alter the scan results that I have.

What pieces would need to be added to have the second script alter the list of found addresses in the main scan results display to only show those that are net new for this scan?

EDIT:

Ok, I added this to the second scrip you provided:

print(list.Address[i])

And the results I get are as expected, so the second script is finding what I would expect it to find. Now, to add code to have it reduce the displayed "foundlist" to only these values...

Thanks again for the assistance.

Cheers,

Creo

EDIT2:

Ok, I am just now realizing that the results found are being added to the AddressList and tagged with description of "Plugin Address". So this is a suitable solution for my current needs.

For future reference though, I wold still be interested to know if the current Foundlist for the active memscan can be altered via such a script...

Cheers,

Creo
Back to top
View user's profile Send private message
Zanzer
I post too much
Reputation: 126

Joined: 09 Jun 2013
Posts: 3278

PostPosted: Sat Oct 24, 2015 5:20 pm    Post subject: Reply with quote

To my knowledge, you cannot manipulate the FoundList displayed within CE manually.
Best you could do is run the First Scan and Next Scan actions.
Back to top
View user's profile Send private message
creo
Newbie cheater
Reputation: 0

Joined: 21 Dec 2008
Posts: 13

PostPosted: Sun Oct 25, 2015 10:07 am    Post subject: Reply with quote

I was thinking there might be a way to interact with the "next scan" to filter the results at that point which would work for my needs, but I have yet to find it.

I will keep digging, seems that would be something that would be exposed to Lua.

Thanks,

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

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

PostPosted: Sun Oct 25, 2015 3:43 pm    Post subject: Reply with quote

the "Foundlist" object is just a readonly view of a file on disk

you can find the path to it using getCurrentMemscan().ScanresultFolder

to manipulate this list, first release the file lock (foundlist.deinitialize)
and then you can edit the file.
when done, use foundlist.initialize

the tricky parts is editing the files (previous memory, etc...)

_________________
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
creo
Newbie cheater
Reputation: 0

Joined: 21 Dec 2008
Posts: 13

PostPosted: Fri Oct 30, 2015 5:54 pm    Post subject: Reply with quote

Thanks for the information. I will have to look into that a bit. I am guessing the file is XML?

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

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

PostPosted: Fri Oct 30, 2015 6:02 pm    Post subject: Reply with quote

worse, raw binary data.
addresslist is an array of pointers
memory is an array of the type that was used to scan with

_________________
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
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