Custom Auto Assemble Templates

Upload *YOUR* gamehacking tools/helpers here
User avatar
++METHOS
Administration
Administration
Posts: 274
Joined: Thu Mar 02, 2017 9:02 pm
Reputation: 91

Custom Auto Assemble Templates

Post by ++METHOS »

Credit goes to mgr.inz.Player for the CE extension.



This file has not been tested with newer versions of CE, so some modifications may be necessary.

Here are screenshots:



Image

Image
Attachments
++METHOS AA Templates.zip
(5.52 KiB) Downloaded 438 times

astor
Table Makers
Table Makers
Posts: 133
Joined: Mon Apr 20, 2020 12:29 am
Reputation: 117

Custom Auto Assemble Templates

Post by astor »

Thanks.



Edit: The AOB isn't perfect, sometimes it gives more than 2 results which can cause problem. I had to rescan it twice and correct the aob. Also, possible to implement aobscanregion into the template?
Last edited by astor on Wed Jun 24, 2020 11:36 am, edited 1 time in total.

User avatar
++METHOS
Administration
Administration
Posts: 274
Joined: Thu Mar 02, 2017 9:02 pm
Reputation: 91

Custom Auto Assemble Templates

Post by ++METHOS »

If your AOB results are imperfect, then it is up to you to make the necessary modifications in order to remedy that. These templates were created to save time and will work without issues for most targets, but they still require understanding and are not a turn-key solution. You can expand on them or modify them however you wish.



If you would like to expand on the plugin features, you might consider starting with a vanilla copy, as this version has been heavily stripped and has not been updated in a long time. If you are unsure, you can try reaching out to mgr.inz.Player, since he is the original author. I also do not wish to create modified forks of his work here, out of respect to him, and also because my knowledge of LUA is toilet. Please see the original thread [URL='https://www.cheatengine.org/forum/viewtopic.php?t=588038&postdays=0&postorder=asc&start=0&sid=15a0fe1a5ca0912a988ecf6a7d4815b4'][B][U]here[/U][/B][/URL].



To answer your question, implementation of aobscanregion should be possible, so long as your file versions support it.
Last edited by ++METHOS on Thu Jan 01, 1970 12:00 am, edited 1 time in total.

User avatar
aanpsx
Table Makers
Table Makers
Posts: 204
Joined: Thu Apr 12, 2018 4:53 am
Reputation: 817

Re: Custom Auto Assemble Templates

Post by aanpsx »

Hi..
i've been using this tool since 6.8, then 6.8.1~7.3 came out..
but when i try to use it for mono and .net games, (especially 7.2 and 7.3) it can't generate script if mono is on, and i have to disable mono first, then it will work (but it takes time to generate the script)..

would you mind to check it out??

Thank You
Image

Code: Select all

myAOBInjectionTemplates = {}

myAOBInjectionTemplates.Templates = {

-- add this for my custom mono
{
displayName="Mono 64",
submenu='Mono',
group='mono',
templateSections=
[==[
<<INFO>>
define(Mono_%cheatName%,"%monoAddress%")
define(bytes_%cheatName%,db %originalBytes%)
<<INFO_END>>
<<ENABLE>>
alloc(Newmem_%cheatName%,$1000,Mono_%cheatName%)
//assert(Mono_%cheatName%,bytes_%cheatName%)
//aobscan%isModuleScan%(Mono_%cheatName%,%moduleNameC%%searchPattern%)//%injectAddress%
label(Code_%cheatName%,_%cheatName%)
registersymbol(Mono_%cheatName%,Code_%cheatName%,_%cheatName%)
Newmem_%cheatName%:
  mov [_%cheatName%],rcx // Main pointer
//==================== Inject here

Code_%cheatName%:
  readmem(Mono_%cheatName%,%replacedInstructionsSize%)
%CoriginalCodeLines%
  jmp Return_%cheatName%

_%cheatName%:
  dq 0
  
Mono_%cheatName%:
  jmp Newmem_%cheatName%
%_nopLines%
Return_%cheatName%:
//
<<ENABLE_END>>
<<DISABLE>>
unregistersymbol(*)//unreg all
dealloc(*)//dealoc all
//unregistersymbol(Mono_%cheatName%,Code_%cheatName%,_%cheatName%)
//dealloc(Newmem_%cheatName%)
Mono_%cheatName%:
  readmem(Code_%cheatName%,%replacedInstructionsSize%)
%CoriginalCodeLines%

%additionalInfo%
<<DISABLE_END>>
]==]
},

{
displayName="Mono 32",
submenu='Mono',
group='mono',
templateSections=
[==[
<<INFO>>
define(Mono_%cheatName%,"%monoAddress%")
define(bytes_%cheatName%,db %originalBytes%)
<<INFO_END>>
<<ENABLE>>
{$lua}
if syntaxcheck then return end
LaunchMonoDataCollector()
-----------------------
memrec.Color=0x000080ff
-------------- A.B.G.R
{$asm}
alloc(Newmem_%cheatName%,$1000,Mono_%cheatName%)
//assert(Mono_%cheatName%,bytes_%cheatName%)
//aobscan%isModuleScan%(Mono_%cheatName%,%moduleNameC%%searchPattern%)//%injectAddress%
label(Code_%cheatName%,_%cheatName%)
registersymbol(Mono_%cheatName%,Code_%cheatName%,_%cheatName%)
Newmem_%cheatName%:
  push [esp+4]
  pop [_%cheatName%]
  //mov [_%cheatName%],ecx // Main pointer
//==================== Inject here

Code_%cheatName%:
  readmem(Mono_%cheatName%,%replacedInstructionsSize%)
%CoriginalCodeLines%
  jmp Return_%cheatName%

_%cheatName%:
  dd 0
  
Mono_%cheatName%:
  jmp Newmem_%cheatName%
%_nopLines%
Return_%cheatName%:
//
<<ENABLE_END>>
<<DISABLE>>
unregistersymbol(*)//unreg all
dealloc(*)//dealoc all
//unregistersymbol(Mono_%cheatName%,Code_%cheatName%,_%cheatName%)
//dealloc(Newmem_%cheatName%)
Mono_%cheatName%:
  readmem(Code_%cheatName%,%replacedInstructionsSize%)
%CoriginalCodeLines%

%additionalInfo%
<<DISABLE_END>>
]==]
},
---------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------
{
displayName="Default",
submenu='x86',
group=1, 
templateSections=
[==[
<<INFO>>
//Target:  %processName%
//Author:  ++METHOS

<<INFO_END>>
-- and so on..

User avatar
++METHOS
Administration
Administration
Posts: 274
Joined: Thu Mar 02, 2017 9:02 pm
Reputation: 91

Re: Custom Auto Assemble Templates

Post by ++METHOS »

aanpsx wrote:
Wed Jan 19, 2022 10:18 pm
would you mind to check it out??
-I should clarify that I am not the author of this plugin. The purpose of this thread was to share my custom templates.

You would either need to ask mgr.inz.Player himself, or, ask someone that is knowledgeable with LUA. Sorry.

Thanks.

predprey
Expert Cheater
Expert Cheater
Posts: 207
Joined: Thu Mar 02, 2017 8:46 pm
Reputation: 140

Re: Custom Auto Assemble Templates

Post by predprey »

aanpsx wrote:
Wed Jan 19, 2022 10:18 pm
Hi..
i've been using this tool since 6.8, then 6.8.1~7.3 came out..
but when i try to use it for mono and .net games, (especially 7.2 and 7.3) it can't generate script if mono is on, and i have to disable mono first, then it will work (but it takes time to generate the script)..

would you mind to check it out??

Thank You
Can I ask if the original Mono template included in mgr.inz.Player's extension also gives the same error?

User avatar
aanpsx
Table Makers
Table Makers
Posts: 204
Joined: Thu Apr 12, 2018 4:53 am
Reputation: 817

Re: Custom Auto Assemble Templates

Post by aanpsx »

predprey wrote:
Thu Jan 20, 2022 11:49 am
Can I ask if the original Mono template included in mgr.inz.Player's extension also gives the same error?
(use custom v1.3.6) yes, and similar problem when use on .net games too
for mono games it's okay, because i can disable mono to make this tool work, but on .net games will have different story (because i cannot disable it)
Image

ShyTwig16
Expert Cheater
Expert Cheater
Posts: 335
Joined: Thu Apr 06, 2017 7:14 pm
Reputation: 19

Re: Custom Auto Assemble Templates

Post by ShyTwig16 »

aanpsx wrote:
Thu Jan 20, 2022 1:21 pm
...
Basically at some point it goofs up the address, since it is only looking for the first part of the address with isn't an address by it self. Might even be in the CE lua function "generateAOBInjectionScript", since this script mostly uses that as a base to work from. Can you generate an AOB script with mono enabled using that same address with the default CE aob template?

predprey
Expert Cheater
Expert Cheater
Posts: 207
Joined: Thu Mar 02, 2017 8:46 pm
Reputation: 140

Re: Custom Auto Assemble Templates

Post by predprey »

aanpsx wrote:
Thu Jan 20, 2022 1:21 pm
predprey wrote:
Thu Jan 20, 2022 11:49 am
Can I ask if the original Mono template included in mgr.inz.Player's extension also gives the same error?
(use custom v1.3.6) yes, and similar problem when use on .net games too
for mono games it's okay, because i can disable mono to make this tool work, but on .net games will have different story (because i cannot disable it)
Image
Ok, looks likes it's in my purview, thanks for checking. Need to go reinstall some Mono games now.

User avatar
aanpsx
Table Makers
Table Makers
Posts: 204
Joined: Thu Apr 12, 2018 4:53 am
Reputation: 817

Re: Custom Auto Assemble Templates

Post by aanpsx »

ShyTwig16 wrote:
Thu Jan 20, 2022 2:07 pm
...
Can you generate an AOB script with mono enabled using that same address with the default CE aob template?
everything work fine using default CE aob template, but i need to disable mono first if i want to use custom template
(for .net games, i have to use ce 7.1 for this tool to work perfectly)
Image

ShyTwig16
Expert Cheater
Expert Cheater
Posts: 335
Joined: Thu Apr 06, 2017 7:14 pm
Reputation: 19

Re: Custom Auto Assemble Templates

Post by ShyTwig16 »

Open the script for the template generator, goto line 4058. And change this line.

Code: Select all

local injectAddress = newScript:match('INJECTING HERE %-%-%-%-%-%-%-%-%-%-\r\n(.-):')
To this:

Code: Select all

local injectAddress = newScript:match('INJECTING HERE %-%-%-%-%-%-%-%-%-%-\r\n(.-):$')
Basically it captures the address upto the first ":" and stops, but since the address has ":" in it you need to capture upto the last ":" at the end off the line thus we add "$" to tell it to goto the end of the line.

Try it and let me know if that fixes it.

EDIT:
predprey wrote:
Thu Jan 20, 2022 3:22 pm
...
I think the above solution should fix it, but I don't have a mono game installed to test it with. But the capture should work, but the actual capture might need to also be changed from minimum to an all (i.e. "(.-)" to "(.*)")

predprey
Expert Cheater
Expert Cheater
Posts: 207
Joined: Thu Mar 02, 2017 8:46 pm
Reputation: 140

Re: Custom Auto Assemble Templates

Post by predprey »

aanpsx wrote:
Thu Jan 20, 2022 1:21 pm
...
ShyTwig16 wrote:
Thu Jan 20, 2022 6:11 pm
...
Thanks @ShyTwig16, tried it but that isn't the fix. But Csimbi's v1.3.9 works.

@aanpsx try this [Link]. I tried on CE7.4 and it works, if not report back here.

@++METHOS If you want to fix your version, Csimbi's fix is probably this, didn't do a full test, but quite sure it's this based on ShyTwig16's reply.
local injectAddress = newScript:match('INJECTING HERE %-%-%-%-%-%-%-%-%-%-\r\n(.-): ')

User avatar
aanpsx
Table Makers
Table Makers
Posts: 204
Joined: Thu Apr 12, 2018 4:53 am
Reputation: 817

Re: Custom Auto Assemble Templates

Post by aanpsx »

ShyTwig16 wrote:
Thu Jan 20, 2022 6:11 pm
...
local injectAddress = newScript:match('INJECTING HERE %-%-%-%-%-%-%-%-%-%-\r\n(.-):$')
still have same problem with this ($)
predprey wrote:
Thu Jan 20, 2022 6:51 pm
...
local injectAddress = newScript:match('INJECTING HERE %-%-%-%-%-%-%-%-%-%-\r\n(.-): ')
Whoaaa.. today I witnessed the power of a space :D

thank you guys, glad to be here..

User avatar
Rhark
Expert Cheater
Expert Cheater
Posts: 2805
Joined: Tue Apr 16, 2019 1:27 am
Reputation: 1213

Re: Custom Auto Assemble Templates

Post by Rhark »

There seems to be an issue in every AA script:

Code: Select all

aob_example:
jmp newmem_example
dbnop 2               <----

User avatar
++METHOS
Administration
Administration
Posts: 274
Joined: Thu Mar 02, 2017 9:02 pm
Reputation: 91

Re: Custom Auto Assemble Templates

Post by ++METHOS »

Rhark wrote:
Sat Jan 22, 2022 10:25 pm
There seems to be an issue in every AA script:
-Edit everywhere in the lua script:

From this:

Code: Select all

jmp newmem_%cheatName%
%db90s%
return_%cheatName%:
To this:

Code: Select all

jmp newmem_%cheatName%
%nopLines%
return_%cheatName%:

Post Reply

Who is online

Users browsing this forum: siferff81990