Unable to evaluate offsets with symbols?

Anything Cheat Engine related, bugs, suggestions, helping others, etc..
Post Reply
User avatar
Marcus101RR
Table Makers
Table Makers
Posts: 162
Joined: Fri Mar 03, 2017 6:04 pm
Reputation: 17

Unable to evaluate offsets with symbols?

Post by Marcus101RR » Fri Aug 17, 2018 6:47 pm

[curArmor+8]*8+08
Source: https://imgur.com/a/tfK9ZvI
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?

User avatar
koderkrazy
Fearless Donors
Fearless Donors
Posts: 248
Joined: Sun Jun 17, 2018 2:14 pm
Reputation: 157

Re: Unable to evaluate offsets with symbols?

Post by koderkrazy » Tue Aug 21, 2018 11:05 am

Marcus101RR wrote:
Fri Aug 17, 2018 6:47 pm
[curArmor+8]*8+08
Source: https://imgur.com/a/tfK9ZvI
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.

User avatar
koderkrazy
Fearless Donors
Fearless Donors
Posts: 248
Joined: Sun Jun 17, 2018 2:14 pm
Reputation: 157

Re: Unable to evaluate offsets with symbols?

Post by koderkrazy » Tue Aug 21, 2018 12:30 pm

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.
Attachments
UpdateCalculatedOffsets-solution.CT
Demo table
(5.55 KiB) Downloaded 14 times

Eric
Hall of Famer
Hall of Famer
Posts: 66
Joined: Thu Mar 02, 2017 11:01 pm
Reputation: 15

Re: Unable to evaluate offsets with symbols?

Post by Eric » Wed Aug 29, 2018 6:06 pm

you can also rightclick offsets with symbols and choose the way they are updated

Post Reply

Who is online

Users browsing this forum: No registered users