hazarada How do I cheat? Reputation: 0
Joined: 16 Sep 2019 Posts: 5
|
Posted: Mon Sep 16, 2019 4:03 pm Post subject: How to filter for arrays of objects? |
|
|
There is an array that lists pointers to all the mob instances within a game level, containing information about their coordinates, hp, type etc.
I know this because I found it once while scanning 5 levels deep for a pair of known mob values and array positions right next to each other. I narrowed it down to around a dozen pointer trails for each and I cross referenced the offsets to find the array index to be 2 levels below the values I scanned for.
Unfortunately this path was unstable and I wasn't able to find it again, probably because of the array positions being right next to each other was a fluke.
In order to find it again, it would be immensely helpful if I could
1. Obtain a value on mob#1 and mob#2
2. pointer scan for known value on mob#1
3. Filter each pointer trail like this (in imaginary code):
Code: |
function(module_name, module_offset, offsets[], value_on_mob2) {
offsets2 = offsets.clone();
idx1 = offsets2[offsets.size() - 2];
for (i = -128; i <= 128; i += 4) {
offsets2[offsets.size() - 2] = idx + i;
if (get_value(module_name, module_offset, offsets2) == value_on_mob2) {
return true;
}
}
return false;
}
|
so basically it would take 2 steps back and try a range of alternative offsets for where I deemed the array index to be and see if it gets a hit on the known value #2. As much as I'd love making my own scan tool and probably tweaking it for a few weeks to have good enough performance to do this task, is it possible to make CE do this?[/code]
|
|