Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


I2 Cheat Engine CEA File Assembler

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Extensions
View previous topic :: View next topic  
Author Message
TheyCallMeTim13
Wiki Contributor
Reputation: 50

Joined: 24 Feb 2017
Posts: 976
Location: Pluto

PostPosted: Sun Dec 31, 2017 8:27 pm    Post subject: I2 Cheat Engine CEA File Assembler Reply with quote


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.



I2CETableCEA.lua
 Description:
I2 Cheat Engine CEA File Assembler v: 2.0.2

Download
 Filename:  I2CETableCEA.lua
 Filesize:  9.13 KB
 Downloaded:  8407 Time(s)


_________________


Last edited by TheyCallMeTim13 on Sat Mar 10, 2018 2:26 pm; edited 2 times in total
Back to top
View user's profile Send private message Visit poster's website
TheyCallMeTim13
Wiki Contributor
Reputation: 50

Joined: 24 Feb 2017
Posts: 976
Location: Pluto

PostPosted: Fri Jan 12, 2018 8:07 am    Post subject: Reply with quote


Update:


Version: 1.0.3

_________________
Back to top
View user's profile Send private message Visit poster's website
TheyCallMeTim13
Wiki Contributor
Reputation: 50

Joined: 24 Feb 2017
Posts: 976
Location: Pluto

PostPosted: Sat Mar 10, 2018 2:27 pm    Post subject: Reply with quote


Update:


Version: 2.0.2

_________________
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Extensions All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites