To add templates from a directory:
I2CEAutoAssemblerScriptTemplates.loadTemplatesDirectory([[x:\SomeOddDirectory]])

Install / Setup Method 1:
- Put file in CE autorun folder.

Install / Setup Method 2:
- Put in CE lua folder (it isn't created by default).
And in a file in the CE autorun folder import and add tables.

Example:
local TemplatesTable = {
...
}
local I2CEAASTG = require 'pluginI2CEAutoAssemblerScriptTemplateGenerator'
---- You could rename the file if you go this route.
I2CEAASTG.loadTemplates(TemplatesTable)

AddMainSeperator : boolean - Set to true to have a separator added to the menu before adding
template menu items.

InjectionInfoCount : integer - The number of lines before and after injection point in injection info.
i.e.: 10 will generate 21 lines of disassembler output.
10 before (addresses less then injection address)
1 injection point
10 after (addresses greater then injection address)

PlaceHolderKey : string - The Place holder key used in templates for generic replacement prompts.
** See: 'Template Place Holders' for more info.

AutoLoad : boolean - Set to false to stop auto loading of templates.
TemplatesDirectory : string - The templates directory to use.
** *** Template files use a unique format, (my change to template files matched with json files for
settings) so this should be in a unique spot (IT CAN CLASH with other template generators
if in same folder).
NopASM : string - ASM for nops.
i.e.: 'nop' or 'Nop' or 'nop //// No Operation'
* There is a separate template key for nops as data bytes. (i.e.: 'db 90 90 90')

AOBScanByteLengthMin : The min number of bytes that will be accepted with out being prompted for approval.
* This is to stop from accidentally scanning for to few bytes
(in large games this can that a little while).
* But will prompt for approval to allow for scanning
(in smaller games scanning for 5 bytes is not a problem).
* NOTE: Scan is preformed on generated scan signature filled with wild cards.

AOBSignatureLength : integer - The minimum number of bytes for AOB signatures.
UseMemoryViewFormSelectionForAOBSignature : Set to true to use memory view form selection instead
of "AOBSignatureLength" plus selected address.

BringCheatEngineToFrontOnCreateMemoryRecords : Set to true to bring Cheat Engine from to front on adding
memory records to table.

Name : string - The name of the template.
*** Used in menu item creation, also in injection information and logging.

GetAddress : boolean - Set to true to be prompted for an address.
* Address is pulled from disassembler view form selection. So this is a formality.

IsFullHook : boolean - Set to true to have no less then 5 bytes for a full jump.

GetHookName : boolean - Set to true to be prompted for a hook name.
* All template hook keys will be empty strings if not set to true.
HookTag : string - The tag to use for prompts.
i.e.: 'Hook', 'Hack', 'Cheat', 'Exploit', or what have you.
AppendHookTag : boolean - Set to true to have the hook tag appended to the hook name.
Unless the hook tag is already in the hook name.
FixInputData : boolean - Set to true to fix sloppy input data.
* Only affects hook name.
* Title cases and removes spaces from input.

GetAOBSignature : boolean - Set to true to have an aob signature generated.

HotkeyCount : integer - Number of hot-keys attached to this memory record
Hotkey[] : array - Array to index the hot-keys

DontSave : boolean - Don't save this memoryrecord and it's children

Async : boolean - Set to true if activating this entry will be asynchronious. (only for AA/Lua scripts)

Collapsed : boolean - Set to true to collapse this record or false to expand it. Use expand/collapse methods for recursive operations.

OnActivate : function(memoryrecord, before, currentstate)
: boolean - The function to call when the memoryrecord will change
(or changed) Active to true. If before is true, not returning true
will cause the activation to stop.
OnDeactivate : function(memoryrecord, before, currentstate)
: boolean - The function to call when the memoryrecord will change
(or changed) Active to false. If before is true, not returning true
will cause the deactivation to stop.
OnDestroy : function()
: Called when the memoryrecord is destroyed.

Template Keys:
- Keys to be used in templates and memory record strings.
format:
${TemplateKey}

ProcessName - The process name.
ProcessAddress - The process address.

Module - The address's module, if it is in a module.
ModuleAddress - The address's module address, if it is in a module.
ModuleSize - The address's module size, if it is in a module.
ModuleBitSize - The address's module bit size, if it is in a module.
i.e.: '(x32)' or '(x64)'
ModuleStr - Will be set to the word 'Module' if the address is in a module.
* Used with aob scan.
i.e.: 'aobScan${ModuleStr}(...'
ModuleDecl - Will be set to the module name with a comma in front, if the address is in a module.
* Used with aob scans, and memory allocation.
i.e.: 'alloc(SomeUserSymbol, 0x400${ModuleDecl})'

Address - The address, will be in module with offset format, if the address is in a module.
* Pulled from disassembler view form selection.
AddressHex - The address in hex format, length is based on pointer size.

HookTag - The hook tag word.
i.e.: 'Hook', 'Hack', 'Cheat', 'Exploit', or what have you.
HookName - The, human readable, hook name.
i.e.: 'Ammo DEC Hook', or 'Ammo DEC'
HookNameBase - The hook name with out the hook tag appended.
* Even if 'AppendHookTag' is set to 'true'.
* If 'AppendHookTag' is set to 'false' it will be the same as 'HookName'.
HookNameParsed - The, machine readable, hook name.
i.e.: 'AmmoDECHook', or 'AmmoDEC'
HookNameParsedBase - The parsed hook name with out the hook tag appended.
* Even if 'AppendHookTag' is set to 'true'.
* If 'AppendHookTag' is set to 'false' it will be the same as 'HookNameParsed'.

AOBBytes - AOB byte signature string.
AOBMessage - Used if more then one match was found.
** Adds a new line character if there is a message.
i.e.: '\n// Matches Found: 25'

AOBOffset - The AOBs calculated offset from injection point.
This will include a '+' or '-'.
AOBAddress - The address of the AOB starting point.

OriginalCode - The original code (pulled from disassembler view form)
OriginalBytes - The original bytes (pulled from disassembler view form)
InstNOPS - Nops matching the original number of bytes.
InstNOP90S - Nops, in data byte format, matching the original number of bytes.
i.e.: 'db 90 90 90'
NOPS - Used if nops are needed.
NOP90S - Used if nops are needed.

BaseAddressRegistry - Registry pulled form original code of the first line (uses lua matching).
BaseAddressOffset - Offset for registry pulled form original code of the first line (uses lua matching).
* Looks for most instructions followed by brackets with a registry and offset. Kinda works!
i.e.: mov eax,[rsi+10]
BaseAddressRegistry will be 'rsi'
BaseAddressOffset will be '+10'
BaseAddressOffsetValue - The decimal value of the offset for registry pulled form original code.

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