Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


How to read the value of a 3 byte address
Goto page Previous  1, 2, 3
 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
bknight2602
Grandmaster Cheater
Reputation: 0

Joined: 08 Oct 2012
Posts: 577

PostPosted: Sun Apr 03, 2022 4:08 pm    Post subject: Reply with quote

I'm done with this project. There appears to be two sets of numbers within the CE structure. I have spent the better part of two days chasing ghosts.
For example, using your code, which I believe should work, doesn't with my table. Why because there are at least two addresses in CE. Using the following code executed in the debug window.
Code:

         local al = getAddressList()
               for x = 1, 4 do
                   exp1addr = addresslist_getMemoryRecordByDescription(al, "Hero " .. x .. " Exp")
                   print(exp1addr)
                   print(exp1addr.Value)
               end;

results:
0EC2C090
53407
0EC2C2D0
53407
0EC2C510
6004
0EC2C750
6004
Now I have searched for exp values fought one battle, I'll show the exp results.
Does anyone see any similarity in the addresses, other than they are 0x######40 apart? That is the same differences I have in my table. Now these addresses may be CE internal addresses.
For my purposes the exp is changed for the first three, and very likely in the fourth, but the fourth address in my table will never change. Now this may be only this game/table as I haven't attempted the code in other games.
You have been very very helpful in your time and patience in attempting to find a work around. When you suggested using a blank CE table with only the four addresses, I believe that process worked.
And it does: I can never get the order correct when posting, however, the first image is searching for exp in Hero 1 and Hero 2, the second image is searching for exp Hero 3 and Hero 4 both of these images are after the one battle so I could narrow down the found addresses. The third image is after inserting these four addresses into the table. The fourth image is after running your slightly modified code to get the choices down to only four, shows all four addresses changed by 399. Something is amiss with my table and we have both spent too much time attempting to fix something that I'm convinced can't be fixed, maybe another gametable.
Thanks again for your ideas and devoted time.



4-3-2022 4-24-46 PM.png
 Description:
 Filesize:  2.28 KB
 Viewed:  601 Time(s)

4-3-2022 4-24-46 PM.png



4-3-2022 4-25-03 PM.png
 Description:
 Filesize:  2.31 KB
 Viewed:  600 Time(s)

4-3-2022 4-25-03 PM.png



4-3-2022 4-28-34 PM.png
 Description:
 Filesize:  3.9 KB
 Viewed:  599 Time(s)

4-3-2022 4-28-34 PM.png



4-3-2022 4-39-20 PM.png
 Description:
 Filesize:  4.04 KB
 Viewed:  599 Time(s)

4-3-2022 4-39-20 PM.png


Back to top
View user's profile Send private message Yahoo Messenger
AylinCE
Grandmaster Cheater Supreme
Reputation: 32

Joined: 16 Feb 2017
Posts: 1260

PostPosted: Sun Apr 03, 2022 5:54 pm    Post subject: Reply with quote

Finally, test the following code instead of filtering byte in addresses or integer results.
This leaves you with the values in the list instead of the addresses. Wink

Code:
local al = getAddressList()
for x = 1, 4 do
exp1addr = addresslist_getMemoryRecordByDescription(al, "Hero " .. x .. " Exp")

local valueX1 = tonumber(exp1addr.Value) + tonumber(addexpvalue)
exp1addr.Value = tonumber(valueX1)
end;

_________________
Hi Hitler Different Trainer forms for you!
https://forum.cheatengine.org/viewtopic.php?t=619279
Enthusiastic people: Always one step ahead
Do not underestimate me Master: You were a beginner in the past
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting All times are GMT - 6 Hours
Goto page Previous  1, 2, 3
Page 3 of 3

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites