Scripting pointers
Posted: Sun Mar 24, 2019 1:33 pm
hi,
I am a little above a total newbie.
I am trying to use cheat engine 6.xx on HMMIII.
I don't know Lua but I do know Pascal/Delphi and assembly for PIC, ATmel etc uP..
Of course this is different from Intel uP asssembly.
I am hardly a professional programmer so ideally if you could explain the steps in as much
detail as possible would be appreciated.
What I am trying to do:
I have pointers to my hero's attributes - Name, level, knowledge, experience, movement, army size etc.
The pointers work 100% every time.
The trouble is I have to edit the offsets for each hero manually. This is a tedious process as there could
be a few heros.and you don't know what heros you will end up with.
Each set of offsets are different for each hero.
What I would ideally like is to make a script to change the pointer offset values according to the hero that I am using.
So this is purely a problem of scripting.
To work out the offset there is an equation that multiplies bytes together like xxxxxxxx +yyy*aaaa+ff+ccc
I have this equation in the add offset box in the "Change Address" Form that pops up when you click on the P->xxxxxxxxx
Now my questions are:
1. Is there a way to programatically change the offset in **this** "Change Address" Form's offset box?
. if so can someone more knowledgable than I am may be able to start me offf.
This method would be ideal as everything is there already just change the offset values programatically.
OR
2. How can read and write to this pointer address programatically without the use of the "Change Address" Form.
. Again can someone more knowledgable than I am may be able to start me offf.
Sudo code I amigine could be:
Read a user-value <- this is for setting values you want. similar to values in tables.
ccc=read from pointer address wwwwwww
variable-offset=xxxxxxxx +yyy*aaaa+ff+ccc
write user-value to variable-offset
exit
Of course I think this is more complicated. To me at least.
Any help would be appreciated.
I am a little above a total newbie.
I am trying to use cheat engine 6.xx on HMMIII.
I don't know Lua but I do know Pascal/Delphi and assembly for PIC, ATmel etc uP..
Of course this is different from Intel uP asssembly.
I am hardly a professional programmer so ideally if you could explain the steps in as much
detail as possible would be appreciated.
What I am trying to do:
I have pointers to my hero's attributes - Name, level, knowledge, experience, movement, army size etc.
The pointers work 100% every time.
The trouble is I have to edit the offsets for each hero manually. This is a tedious process as there could
be a few heros.and you don't know what heros you will end up with.
Each set of offsets are different for each hero.
What I would ideally like is to make a script to change the pointer offset values according to the hero that I am using.
So this is purely a problem of scripting.
To work out the offset there is an equation that multiplies bytes together like xxxxxxxx +yyy*aaaa+ff+ccc
I have this equation in the add offset box in the "Change Address" Form that pops up when you click on the P->xxxxxxxxx
Now my questions are:
1. Is there a way to programatically change the offset in **this** "Change Address" Form's offset box?
. if so can someone more knowledgable than I am may be able to start me offf.
This method would be ideal as everything is there already just change the offset values programatically.
OR
2. How can read and write to this pointer address programatically without the use of the "Change Address" Form.
. Again can someone more knowledgable than I am may be able to start me offf.
Sudo code I amigine could be:
Read a user-value <- this is for setting values you want. similar to values in tables.
ccc=read from pointer address wwwwwww
variable-offset=xxxxxxxx +yyy*aaaa+ff+ccc
write user-value to variable-offset
exit
Of course I think this is more complicated. To me at least.
Any help would be appreciated.