<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.cheatengine.org/index.php?action=history&amp;feed=atom&amp;title=Talk%3ATutorial%3AMono%3ABasic</id>
	<title>Talk:Tutorial:Mono:Basic - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.cheatengine.org/index.php?action=history&amp;feed=atom&amp;title=Talk%3ATutorial%3AMono%3ABasic"/>
	<link rel="alternate" type="text/html" href="https://wiki.cheatengine.org/index.php?title=Talk:Tutorial:Mono:Basic&amp;action=history"/>
	<updated>2026-06-28T00:09:49Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.32.0</generator>
	<entry>
		<id>https://wiki.cheatengine.org/index.php?title=Talk:Tutorial:Mono:Basic&amp;diff=7270&amp;oldid=prev</id>
		<title>Knx: /* Basic mono cheat Workflow */ new section</title>
		<link rel="alternate" type="text/html" href="https://wiki.cheatengine.org/index.php?title=Talk:Tutorial:Mono:Basic&amp;diff=7270&amp;oldid=prev"/>
		<updated>2022-10-31T21:20:42Z</updated>

		<summary type="html">&lt;p&gt;‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Basic mono cheat Workflow: &lt;/span&gt; new section&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== Basic mono cheat Workflow ==&lt;br /&gt;
&lt;br /&gt;
The workflow to create a script with this tutorial seems a bit odd.&lt;br /&gt;
&lt;br /&gt;
I am not an expert, but hopefully this will help someone, for me the creation of a simple script goes like this:&lt;br /&gt;
:1.-Turn on mono&lt;br /&gt;
:2.-Search for '''desired address''' to edit.&lt;br /&gt;
:3.-attach debugger to look what is accessing the address.&lt;br /&gt;
:4.-right Click the accessing address in the debugger to dissemble(in the dissembler, instead of an addresses it should show the monoclass and method[or you screwed up and mono is not enabled]).&lt;br /&gt;
:5.-search upward for the instruction that is modifying the value that is '''supplied''' to the desired address (often an inc, dec, add or sub to a register).&lt;br /&gt;
:6.-in the dissembler select the address with the instruction you wish to edit.&lt;br /&gt;
:7.-Select copy to clipboard-&amp;gt; Addresses only&lt;br /&gt;
:8.-open script editor (ctl+alt+A) and select  Template-&amp;gt;Full injection&lt;br /&gt;
:9.-in the address prompt paste the address from the disassembler(it should consist of monoClass:monoMethod+hexoffset)&lt;br /&gt;
:10.-insert the text below between [ENABLE] and  assert(address,bytes).&lt;br /&gt;
  &lt;br /&gt;
 {$lua}&lt;br /&gt;
 if syntaxcheck then return end&lt;br /&gt;
 if LaunchMonoDataCollector() ~= 0 then&lt;br /&gt;
    local mId = mono_findMethod('Assembly-CSharp', 'monoClass', 'monoMethod')&lt;br /&gt;
    mono_compile_method(mId)&lt;br /&gt;
 end&lt;br /&gt;
 {$asm} &lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
:11.-edit the monoClass and monoMethod values in mono_findMethod('Assembly-CSharp', 'monoClass', 'monoMethod')(to JIT the method).&lt;br /&gt;
:12.-Edit the code in the code section of the template to the new instructions you desire.&lt;br /&gt;
:13.-Click save-&amp;gt;assign to current table.&lt;br /&gt;
:14.-Close editor and activate cheat.&lt;br /&gt;
:15.-The final product should look like this(As can be observed in the code dump from the template, the instruction that saves to the original address is +40 or '''mov [rax+60],ecx''' and i went a bit above and changed +3a '''add ecx,[rbp-10]''' for '''mov ecx,FFFFFF''' [This ignores the calculated value and inserts a constant]):&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 {$STRICT}&lt;br /&gt;
 define(address,scene_manager:increaseMoney+3a )&lt;br /&gt;
 define(bytes,03 4D F0 83 38 00)&lt;br /&gt;
 [ENABLE]&lt;br /&gt;
 {$lua}&lt;br /&gt;
 if syntaxcheck then return end&lt;br /&gt;
 if LaunchMonoDataCollector() ~= 0 then&lt;br /&gt;
    local mId = mono_findMethod('Assembly-CSharp', 'scene_manager', 'increaseMoney')&lt;br /&gt;
    mono_compile_method(mId)&lt;br /&gt;
 end&lt;br /&gt;
 {$asm}&lt;br /&gt;
 assert(address,bytes)&lt;br /&gt;
 alloc(newmem,$1000,scene_manager:increaseMoney+3a )&lt;br /&gt;
 label(code)&lt;br /&gt;
 label(return)&lt;br /&gt;
 newmem:&lt;br /&gt;
 code:&lt;br /&gt;
  mov ecx,FFFFFF&lt;br /&gt;
  cmp dword ptr [rax],00&lt;br /&gt;
  jmp return&lt;br /&gt;
 address:&lt;br /&gt;
  jmp newmem&lt;br /&gt;
  nop&lt;br /&gt;
 return:&lt;br /&gt;
 [DISABLE]&lt;br /&gt;
 address:&lt;br /&gt;
  db bytes&lt;br /&gt;
  // add ecx,[rbp-10]&lt;br /&gt;
  // cmp dword ptr [rax],00&lt;br /&gt;
 dealloc(newmem)&lt;br /&gt;
 {&lt;br /&gt;
 // ORIGINAL CODE - INJECTION POINT: scene_manager:increaseMoney+3a&lt;br /&gt;
 scene_manager:increaseMoney+13: 48 8B 40 18                    - mov rax,[rax+18]&lt;br /&gt;
 scene_manager:increaseMoney+17: 48 8B C8                       - mov rcx,rax&lt;br /&gt;
 scene_manager:increaseMoney+1a: 48 89 4D E8                    - mov [rbp-18],rcx&lt;br /&gt;
 scene_manager:increaseMoney+1e: 48 8B C8                       - mov rcx,rax&lt;br /&gt;
 scene_manager:increaseMoney+21: 83 38 00                       - cmp dword ptr [rax],00&lt;br /&gt;
 scene_manager:increaseMoney+24: 66 90                          - nop 2&lt;br /&gt;
 scene_manager:increaseMoney+26: 49 BB C0 92 F3 FF 4F 01 00 00  - mov r11,CharacterStats:get_Money&lt;br /&gt;
 scene_manager:increaseMoney+30: 41 FF D3                       - call r11&lt;br /&gt;
 scene_manager:increaseMoney+33: 48 8B C8                       - mov rcx,rax&lt;br /&gt;
 scene_manager:increaseMoney+36: 48 8B 45 E8                    - mov rax,[rbp-18]&lt;br /&gt;
 // ---------- INJECTING HERE ----------&lt;br /&gt;
 scene_manager:increaseMoney+3a: 03 4D F0                       - add ecx,[rbp-10]&lt;br /&gt;
 // ---------- DONE INJECTING  ----------&lt;br /&gt;
 scene_manager:increaseMoney+3d: 83 38 00                       - cmp dword ptr [rax],00&lt;br /&gt;
 scene_manager:increaseMoney+40: 48 8B 40 18                    - mov rax,[rax+18]&lt;br /&gt;
 scene_manager:increaseMoney+44: 89 48 60                       - mov [rax+60],ecx&lt;br /&gt;
 scene_manager:increaseMoney+47: 48 8D 65 00                    - lea rsp,[rbp+00]&lt;br /&gt;
 scene_manager:increaseMoney+4b: 5D                             - pop rbp&lt;br /&gt;
 scene_manager:increaseMoney+4c: C3                             - ret &lt;br /&gt;
 14FFFFC80FD: 00 00                          - add [rax],al&lt;br /&gt;
 14FFFFC80FF: 00 01                          - add [rcx],al&lt;br /&gt;
 14FFFFC8101: 04 02                          - add al,02&lt;br /&gt;
 14FFFFC8103: 05 04 03 01 50                 - add eax,50010304&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Knx</name></author>
		
	</entry>
</feed>