Distance between two addresses is offset.
Address 4C - address 44 = offset 8
Imagine below.
address >>> value >>> type
0004 >>> 11223344 >>> dword -- static
0008 >>> 84 >>> float -- current health
000C >>> 100 >>> dword -- max health(static)
In this case, we can search two static value as group search. They two are away at offset 8.
gg.searchNumber('11223344;100::9', 4)
gg.refineNumber('100') -- refine one static code
p = gg.getResults(gg.getResultCount())
--Let it be we get 1 result
--now we have static code 100.but we want edit above its address.need to subtract offset 4 to get address of current health
--Let build a table for current health.
--we'll use gg.setValues(). to use it,we need two info atleast.
--address and type. about value? we can get by gg.getValues().
hi = {}
hi[1] = {}
hi[1].address = p[1].address - 0x4
hi[1].flags = gg.TYPE_FLOAT -- health is float
hi = gg.getValues(hi) --attempt to get value
print(hi[1].value) -->output is 84
hi[1].value = 445566
gg.setValues(hi)
--now health will be edited as 445566.
This is some usage of offset edit. If results are more than 1 ,you can set a loop.
Idk its a need to you. But you will .