Page 1 of 1

Unable to evaluate offsets with symbols?

Posted: Fri Aug 17, 2018 6:47 pm
by IcyPurpose99
[curArmor+8]*8+08
Source: [Link]
Offsets can be either numbers, or you could end up using a symbol with registered offsets. However, using the latter works first hand, but if you did a restart, and tried it, it would not update. To update it, you would have to open the pointer and hit OK, for it to update.

What gives? Any fixes, advice?

Re: Unable to evaluate offsets with symbols?

Posted: Tue Aug 21, 2018 11:05 am
by koderkrazy
Marcus101RR wrote:
Fri Aug 17, 2018 6:47 pm
[curArmor+8]*8+08
Source: [Link]
Offsets can be either numbers, or you could end up using a symbol with registered offsets. However, using the latter works first hand, but if you did a restart, and tried it, it would not update. To update it, you would have to open the pointer and hit OK, for it to update.

What gives? Any fixes, advice?
Unfortunately offsets are parsed only when you press OK on pointer edit box. Rest of the time they remain same(calculated values) in memrec object
There is reinterpret() method on memrec but it's of no use in this context because it picks up only parsed values. If they had exposed offset objects in cheat scripts then we could've set unparsed=true and called reinterpret()...

So, in your code, even if curOffset changes , without game restart, the 'Set Skill' pointer won't change.

I think only workaround is to have one pointer(base+offset) for each cheat, and calculate them in code. I mean there are only 6 cheats there so have 6 calculated pointers for each cheat.

Re: Unable to evaluate offsets with symbols?

Posted: Tue Aug 21, 2018 12:30 pm
by koderkrazy
God news! I've created a solution for the problem.
Get the attached table and try it on any 32-bit process. Read the table extras for more details.
Update the offset and hit refresh script it updates the calculated pointer :mrgreen:

Add the LUA script from 'Refresh Pointers' in your main cheat script so that when users open your table they run the script.

Here is the update script for ready reference :
Image
This updates pointers in entire table. If you want to update children of particular cheat like 'Current Armor' then iterate over memrec instead of getAddresList.

Re: Unable to evaluate offsets with symbols?

Posted: Wed Aug 29, 2018 6:06 pm
by Eric
you can also rightclick offsets with symbols and choose the way they are updated