Current capabilities of GG are more than enough to find values that meet this condition. There are 2 main approaches for this case:
- ordered group search with "placeholder" values;
- searching for target value and checking whether found results meet the condition(s) (like whether value at offset X is equal to Y).
So the task is to find all float values equal to 15.0 for which float value at offset -16 (-0x10) is equal to 2.0.
With the first approach the code may be next:
gg.clearResults()
gg.searchNumber("2.0F;0D~~0D;0D~~0D;0~~0D;15.0F::17")
gg.refineNumber("15.0", gg.TYPE_FLOAT)
And the second approach can be implemented, for example, like this:
gg.clearResults()
gg.searchNumber("15.0", gg.TYPE_FLOAT)
local results = gg.getResults(gg.getResultsCount())
local checkValues = {}
for i, v in ipairs(results) do
checkValues[i] = {address = v.address - 0x10, flags = gg.TYPE_FLOAT}
end
checkValues = gg.getValues(checkValues)
for i, v in ipairs(checkValues) do
if v.value ~= 2.0 then -- exact comparison of float values should be avoided in general, but for particular case of value "2.0" it will work
results[i] = nil
end
end
gg.loadResults(results)