Creating Simple Scripts

Have you ever wanted to create custom cheats or modify in-game values but felt intimidated by assembly language? Don’t worry—it’s easier to get started with Cheat Engine’s Auto Assembler scripting than you might think!

Auto Assembler lets you inject custom assembly code into running processes, giving you control over memory manipulation.


Step 1: Getting Started

  1. Start Cheat Engine and attach it to the game process you want to modify.
  2. Use Cheat Engine to find the value you want to change (e.g., health or currency). You can do this by scanning for the value in memory.

Step 2: Monitor Game Instructions

  1. After locating the memory address (for example, your health), right-click on the address.

  2. Choose either:

    • “Find out what writes to this address”

    or

  3. Cheat Engine will begin monitoring and display any instructions interacting with the value. Play the game for a moment to trigger the instructions.

  4. When you see an instruction that changes or reads the value (like health decreasing when you get hit), then select “Show disassembler”.

  5. Next, to create an Auto Assemble script, go to the top menu and click Tools > Auto Assemble.


Step 3: Use the Auto Assembler Template

  1. In the Auto Assembler window, go to the top menu and click Template > AOB Injection.
  2. The injection point will automatically be set to the instruction you chose in the disassembler.
  3. Enter a name for your script—for example, “BombHook”.
  4. You should receive something that looks just about like this:

Step 4: Writing Your First Script

Now that the template is set, you can customize the script to do what you want. Here’s a basic example to gain Infinite Bombs in The Binding of Isaac: Repentance:

[ENABLE]
; AOB scan for the instruction that reads the bomb value
aobscanmodule(BombHook,isaac-ng.exe,03 88 B4 12 00 00)
; Allocate memory for our injection
alloc(newmem,$1000)  

label(code)
label(return)

newmem:
  ; Set Bombs To 99 (You can change this value)
  mov [eax+000012B4],#99 
code:
  ; Original Code Segment
  add ecx,[eax+000012B4]
  jmp return

BombHook:
  ; Redirect the game's instruction to our custom code
  jmp newmem 
  nop
return:

; Register the BombHook symbol
registersymbol(BombHook)

[DISABLE]

BombHook:
  ; Restore the original instruction on "Disable"
  db 03 88 B4 12 00 00

; Unregister all registered symbols on "Disable"
unregistersymbol(*)
; Free the allocated memory on "Disable"
dealloc(*)

Final Step: Activating the Script:

  • Once you did all that, click File > Assign to current cheat table.
  • Activate the script by ticking the checkbox, and now the bomb count will always stay at 99 or whatever value you set!

This should now effectively give you infinite bombs, as the game will keep adjusting the bomb value to 99 every time the instruction is accessed.


Further Reading:

To dive deeper into assembly language and related topics, explore the following resources:

1 Like