|
Cheat Engine The Official Site of Cheat Engine
|
View previous topic :: View next topic |
Author |
Message |
paul44 Expert Cheater Reputation: 2
Joined: 20 Jul 2017 Posts: 152
|
Posted: Wed Aug 03, 2022 11:53 am Post subject: registerAutoAssemblerCommand & aobscanmodule [Solved] |
|
|
a. Issue: a new update changes the offset in opcode; problem is only a few "active" opcodes access focused value. Working with wildcard introduces many more hits, and no way to reduce that to target_opcode.
b. Goal: maintain only 1 table supporting both versions
Solutions:
1. use AutoAssemble(): doable, but AA script less "readeable"
=> unless returned AA_str is "added" to existing Asm code ?! (~ need to test that)
2. use registerAutoAssemblerCommand: came across this while researching another/similar problem. But stumbled on this atm: [ https://imgur.com/a/AMfekb3 ]
(i assumed CE would insert the string in the Asm section (well, it does seem to do that, based on errorline), and then runs it; iow run that scan and assign address to symbol 'Adrenaline')
> on a subnote: what is best way to execute 'unregisterAutoAssemblerCommand(command)' when ?
3. run scanmodule in lua (eg createMemScan), and assign result to symbol; asm should pick this up, no ?! (need to test that)
also tried:
4. pass AOB via global lua_string (eg: $aob_str) to scanfn, but no-go.
Last edited by paul44 on Sat Aug 06, 2022 3:00 am; edited 1 time in total |
|
Back to top |
|
|
ParkourPenguin I post too much Reputation: 138
Joined: 06 Jul 2014 Posts: 4275
|
|
Back to top |
|
|
panraven Grandmaster Cheater Reputation: 54
Joined: 01 Oct 2008 Posts: 941
|
Posted: Wed Aug 03, 2022 1:49 pm Post subject: |
|
|
aa script executed in some phases in order, roughly,
1.preaob : pre processing, remove comment, lua block etc->
2.aob scan ->
3.postaob : custom command and built-in command <eg. alloc>)
->line assembler
-> some finishing process
by the time custom command run, no aobscan line is recognized, so it treat it as assembler line and said that line cannot compile.
You may try execute you aobscan with lua function autoAssemble within your custom command, so hopefully the symbol is registered after the custom command. Effect should be similar as run autoAssemble within a lua block.
May be useful,
Code: |
unregisterAutoAssemblerCommand('spawnAA')
registerAutoAssemblerCommand('spawnAA',function(aa, sc)
if not sc then autoAssemble( (aa:gsub(';;+','\n') )end
end)
|
-- ^not tested, maybe typo
So with this you can run another aa with ';;' to means crlf, return result with registerSymbol (aa version).
eg.
Code: |
spawnAA(aobscanmodule(adrenalin, ...) ;; registerSymbol(adrenalin))
|
_________________
- Retarded. |
|
Back to top |
|
|
paul44 Expert Cheater Reputation: 2
Joined: 20 Jul 2017 Posts: 152
|
Posted: Thu Aug 04, 2022 12:14 am Post subject: to research.... |
|
|
@ParkourPenguin: i actually read both those posts; 1st one i got, but wanted to try out the command_vs. did not (immediately) grasp the 2nd example...
@panraven: i assumed something in those lines; being symbol not registered/initialised/etc. but you bring up an interesting suggestion, passing on the aobscan w/ symbol ?!
=> will take some time to try/test suggestions out (my first intake would be to go for #ParkourPenguin's 1st example though). anyways, i should be able to close this by coming weekend...
|
|
Back to top |
|
|
paul44 Expert Cheater Reputation: 2
Joined: 20 Jul 2017 Posts: 152
|
Posted: Thu Aug 04, 2022 11:41 am Post subject: working solution... |
|
|
i got this working on my side, following #ParkourPenguin's 1st suggestion: [ https://imgur.com/a/bk4ejg7 ]. (~ EDIT: updated solutions)
=> needed to tackle some hurdles obviously, incl the [Disable] section.
Q: can one 'define' a global token (so one does not need to introduce a $lua section there as well) ?
(iow no function and strict local vars)
Notes:
1. topic is considered closed, and will do so once i've tried out #panraven's suggestion
2. FYI: #panraven explained the AA execution sequence in far more detail here: [ https://www.cheatengine.org/forum/viewtopic.php?p=5765665&sid=3db0911196c80f579e5770159a221e0d#5765665 ]
-EDIT-
Tested (and working) #Panraven's solution (pic 3 ~ see above)
|
|
Back to top |
|
|
|
|
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
|
|