Scripting

From Cheat Engine
Jump to navigation Jump to search


Scripting in general is creating/using a small piece of code to perform a required tasks. Scripts are usually interpreted not compiled.

In Cheat Engine, with the use of Auto Assembler Editor you can write 10s, 100s or even a 1000s lines of instructions using either Assembly or Lua languages to be injected in a process memory to do some modifications. Auto Assembler Editor is the IDE where you write your code and there is nearly no limitations, you have the choice to either mix your code using both Assembly and Lua or to use one of them.

The script can be saved as a stand-alone script in a *.CEA file or can be attached to a cheat table and saved as part of a *.CT file. In the latter case your script will be embedded under the XML tag <AssemblerScript>, in a new <CheatEntry> tag. You can use any text editor to create/edit your script but the CE IDE is by far the most productive/interesting choice.

The Cheat Engine Auto Assembler (or shortly CE AA) is the internal tool provided by CE to interpret and generate opcodes in real-time from an Auto Assembler Script.

Some definitions:[edit]

Opcode
Binary data composed by machine operational bytes and can be execute by any host CPU.
Source Code
Text file/data descripting in a high or low level language future instructions/operations to be executed.
Script
Source code easy to edit/modify/execute. To be quick interpreted or converted to opcode then executed.
Assembly language
Any low level programming language that is processor specific.
Assembly code (ASM files)
Source code written in an assembly language. To be converted to opcode and executed.
Assembler
Any program or tool that converts assembly code to opcode.
Compiler
Any program or tool that converts script/source code to opcode, and saves it as an executable file.
Interpreter
Any program or tool that interpret in real-time or converts script/code to opcode, and executes the opcode.
Injection
Replacing bytes in a processes memory, this term is most often used when referring to redirecting running opcode.
Auto Assembler
A super sweet interpreter and assembler, that Dark Byte made.
Lua
A super sweet programming language, with lots of extra stuff that Dark Byte added. (Note: The language is not written by Dark Byte)