TheyCallMeTim13 Wiki Contributor Reputation: 50
Joined: 24 Feb 2017 Posts: 976 Location: Pluto
|
Posted: Sun Dec 31, 2017 8:27 pm Post subject: I2 Cheat Engine CEA File Assembler |
|
|
I2 Cheat Engine CEA File Assembler
A Lua module for using external CEA files in a Cheat Engine table.
Version: 2.0.3
The Doc String.
Code: |
--[====================================================================================================================[
I2 Cheat Engine CEA File Assembler
Version: 2.0.2
1.0.1:
* First release.
1.0.2:
* Fixed load error.
1.0.3:
* Added reset function, to reset the state of all assembled scripts.
* Changed "autoAssembleFile" to work as toggle, with optional "forceDisable".
2.0.1:
* Reworked to work with "memrec" variable.
2.0.2:
* Fixed Toggle Error.
Author: Matt - TheyCallMeTim13 - MattI2.com
Features:
- A Lua module for assembling CEA files be it, table files or local files, in a Cheat Engine table.
Note: Local files will override the table files, this is meant for updating scripts.
- Really the only function meant to be used is autoAssembleFile(ceaFile, targetSelf, disable)
Settings:
CEAFilesDirectory : The directory to check for local files.
Can be set to nil to look in current folder.
i.e.: 'ceaFiles'
Install / Setup Method:
This is a Lua module so place it in the Cheat Engine 'lua' folder or in the same directory as the cheat table
then just import (require) the module to use
Examples:
require 'I2CETableCEA'
I2CETableCEA.autoAssembleFile('CoordHook.CEA', memrec)
Note:
The "Table Require" template in my "pluginI2CELuaScriptTemplateGenerator.lua" plug-in will also allow for
Lua modules to be added as table files then imported, but local files will override the table files.
Table Require Code:
--------
-------- CE Table Require
--------
local TableLuaFilesDirectory = 'luaFiles'
function CETrequire(moduleStr)
if moduleStr ~= nil then
local localTableLuaFilePath = moduleStr
if TableLuaFilesDirectory ~= nil or TableLuaFilesDirectory ~= '' then
local sep = package.config:sub(1,1)
localTableLuaFilePath = TableLuaFilesDirectory .. sep .. moduleStr
end
local f, err = io.open(localTableLuaFilePath .. '.lua')
if f and not err then
f:close()
return require(localTableLuaFilePath)
else
local tableFile = findTableFile(moduleStr .. '.lua')
if tableFile == nil then
return nil
end
local stream = tableFile.getData()
local fileStr = nil
local bytes = stream.read(stream.Size)
for i = 1, #bytes do
if fileStr == nil then
fileStr = ''
end
fileStr = fileStr .. string.char(bytes[i])
end
if fileStr then
return assert(loadstring(fileStr))()
end
end
end
return nil
end
CETrequire('I2CETableCEA')
-- I2CETableCEA.autoAssembleFile('CoordHook.CEA', false, false)
]====================================================================================================================]--
|
And as always, Code Happy, Code Freely, Be Awesome.
Description: |
I2 Cheat Engine CEA File Assembler v: 2.0.2 |
|
Download |
Filename: |
I2CETableCEA.lua |
Filesize: |
9.13 KB |
Downloaded: |
8451 Time(s) |
_________________
Last edited by TheyCallMeTim13 on Sat Mar 10, 2018 2:26 pm; edited 2 times in total |
|