Skip to content

Commit

Permalink
Update for Cheat Engine 7.5.2
Browse files Browse the repository at this point in the history
Also update README and Dev.CT
  • Loading branch information
JasonGoemaat committed Feb 25, 2024
1 parent 8108604 commit 5ecb57e
Show file tree
Hide file tree
Showing 7 changed files with 1,207 additions and 644 deletions.
28 changes: 22 additions & 6 deletions Dev.CT
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<CheatTable CheatEngineTableVersion="34">
<CheatTable CheatEngineTableVersion="45">
<Forms>
<formMonoClass Class="TCEForm" Encoding="Ascii85">/yXCLBSjP,?7mt4B(XzZcStnuKnO*ZNoPCfi:^XYS#y,V=0vRJ+[}N-$CtRF.J?L_pa9+!KncxNNVJHC]Pg]8oh+c$fP!W^@S/Z3-?JM5KSF47KKRI*@q(t^mh8@OXT(J$$2iZMr!eO;SnU%aizT.rZF_B{;,9ARB.rf@S/}s]loLkVzSQX]rJa6Efbv4,H!INl8/pk::+n;u?f}48kt.l).wi+=vHU6%XE:eUT^;H]EF:-gD31D!?^Gk!YkWl@ds1;mL_aT1w(fR5TTfNcei8H:bkJj21X-Bk8KH_KExcbPDvizQo_LEiwA1B0BhwX!oq[Or*L-H)1n%r}(%*uC^gduR[/Ry5R@k5[PwnKP,QE;^7_mIXIrbI#obcJwapviOTtlR7ezw9f.cG$t;Nvx5t_ddhjv.8z@B#+M6rAHsq[xjtmbt#)NHG[wl%8V;v6srPO!I?XxmA(as,9b7Je,4e#yLx#mD}$=;?63E,w3j%cS@n^*Q4E]w,vK@Zojrv*!!=sZZ^omAP-vjQgGV%QYtw3QibE/OKs-/:y,VEDKnOTSfy(C29)N?RPV^[;OHZW=gUTA)v+dqmn0_C7,e(H%7(?H28S#tmmlkk]g7yv@grm,H{vVP7E,ooGPX+4=AlvQN5GdXDlYh(8a={6tJRIkf.ujab#$9@IE95W%tqCTyO/6L#Dx#5(c#oS!bKa$svtKG,FHA]Zy_+C6tWjkV8czt]hN-U=^yYG+udNG(N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bAQBK^pA{]WMz8HG==b*;Cmfi0WovB98@ovQA!=b?H}Jb8MAH)Qcu}dc@lBUXuzt%l:25eJ#!YxBI1SpAt.^in6EWjNcoTy@_MN/CuiK@3jUYUUW2yd)m{sd2dYpT.S8Pz}6t4z#9pftF]=r0EK]:VyWe0)PGPAKZ1Dw*g0KbHh_h*A?Jnc+QB/#ysMWAyeOlcLM?Z==rV$n?}M9]BqWEqc{O?XGr?:C2kho:).gNRevjtf*v8ls$:fsqGKp?12!rMp^EU,OWNOWdTb0{/f[wKlg0nS}^_Ch#ER.W$oceP_;Qh^O-p^{8*t,3Q3mm_JoCoS7cAn}!/lfD^f=SV2$Jb}@MIml4jnj#iA-13B-NO_}pn(BBL:TGU8whqL+qdVCy*T/qhVYU^0irohcE1v58IUemwSembZD(BTw[^Og5q-NF27u:1f][wEp+.-MD+e3#]z$fQ-QsStRXE)u7SHkrP]8KA=#,81dRz%THs/.-</formMonoSearch>
</Forms>
<CheatEntries/>
<UserdefinedSymbols>
Expand Down Expand Up @@ -67,9 +67,25 @@ mi.OnClick = function()
f:close()
showMessage("Restart CE to see changes")
end
mi.Name = 'miDevBuildToCEAutorunDirectory'
mi.Name = 'miDevBuildAutorunLua'
DevMenu.miTopMenuItem.Add(mi)
DevMenu.miDevBuildLua = mi
DevMenu.miDevBuildAutorunLua = mi

-- menu item will build, then create a new table entry to run the script you
-- can copy to another table
mi = createMenuItem(DevMenu.miTopMenuItem)
mi.Caption = "Build and create table entry"
mi.OnClick = function()
local all, forms, lua = loadfile(getMainForm().openDialog1.InitialDir.."Build/build.lua")()
local aa = "[enable]\r\n{$lua}\r\nLaunchMonoDataCollector()\r\n"..all.."\r\n{$asm}\r\n[disable]\r\n"
local entry = getAddressList().createMemoryRecord()
entry.setDescription("MonoHelper")
entry.Type = vtAutoAssembler -- must be set before setting 'Script'
entry.Script = aa
end
mi.Name = 'miDevBuildTableEntry'
DevMenu.miTopMenuItem.Add(mi)
DevMenu.miDevBuildTableEntry = mi


</LuaScript>
Expand Down
69 changes: 29 additions & 40 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,47 +1,43 @@
## TLDR;
## Quick Start

Copy `monohelper.lua` from the autorun folder in this repo to the autorun
folder where cheat engine is installed. When opening the process of a mono
game you should see a 'Mono Search' menu added to CE.
Open the 'Dev.CT' table and copy the 'MonoHelper' entry to your own table.
Activate it when attached to a game that uses mono and use the new
menu option Mono->Search.

## Cheat Engine Mono Helper
## Quick Build

The purpose of this is to make easier to analyze games that use mono. The default
dissect window is slow and difficult to use. By fetching all the mono information
up front (in just a few seconds) and storing them in LUA tables it is possible to
do things like auto-complete style instant searching.
Source code is split into lua files in the `src/lua` directory
with forms in the `src/forms` directory.

> **NOTE** *this is a work in progress, the basic searching works well, but you
have to use the dissect window to do most things still until I can figure out
how to use pop-ups better
1. Open Cheat Engine (do not double click file to open)
2. Using File->Open, open the table 'Dev.CT' (so that directory is set)
3. Allow the table script to run to create the `Dev (MonoHelper)` menu
4. Click `Dev (MonoHelper)`->`Build and create table entry`
5. Copy the new table entry and paste it into your own table

To use the new forms, select the new 'Search' option from the mono menu. The first
time you do this it will open a window to select the image. I've found that for
mono games you usually want to select `Assembly-CSharp`. This is much easier here
because the list is sorted by name (unlike the dissect window which is sorted
by address) and it is usually the one at the top.
## Cheat Engine Mono Helper

![SelectImage](Docs/SelectImage.png)
There have been some advances with more recent versions of Cheat Engine,
but this will create some forms that I think make it easier to find
classes and functions in games that use Mono.

With the search window you can find things that may be interesting very quickly.
For instance I normally start by typing 'player'. In the normal dissect window
it helps to select the image first and uncheck 'search entire file', but you still
have to click through 'find' over and over to get to something interesting.
The search pre-processes a single image, which defaults to 'Assembly-CSharp',
so do 'Select Image' to pick a different one:

With the search window for Crying Suns I immediately see 'PlayerState' which seems
very interesting. Other things pop up that could quickly lead to cheats such
as the fields "player" on the "Team" class, playerState on the RunState class, and
playerBattleship on BattlefieldUI. In methods we can see Configuration.get_InvinciblePlayer,
GameState.get_PlayerState, Battlefield.set_PlayerBattleship, etc.
![SelectImage](Docs/SelectImage.png)

Use the new 'Mono->Search' menu and start typing to show Classes, Fields,
and Methods that contain your text. Double-clicking on any will open
a 'Class' window.

![Search](Docs/Search.png)

Double-clicking a class, field, or method will open up a window for the class with
tables for Fields, Methods, and Notes. The fields will tell you the offset and let
you sort by name or offset in the 'Options' menu. It also tells you if the field is
STATIC. That would probably be good for this game to help you write a cheat. You
can use commands I'm sure to get the address of GameState.currentRunState. With that
you can get `playerState` at offset 30.
In the 'Class' window you can see fields and methods. Right-clicking on
a method gives you a few options:

1. Hook - Create an injection script for the start of the method
2. Disassemble - jump to the method in the disassembler
3. Create Table Script - Creates table entry hooking the start of the method with a counter for number of times executed and storing the most recent object pointer and parameter values

![Class](Docs/Class.png)

Expand Down Expand Up @@ -124,13 +120,6 @@ unregisterSymbol("CryingSuns:GameState:currentRunState")

See [`/docs/Building.md`](/docs/Building.md)

## So what now?

Unfortunately this was something I wrote a couple years ago and have forgotten
a lot of the CE lua commands and never figured out how to get pop-up menus to work
how I wanted. If you find some interesting classes/methods/fields you need to
go to the built-in dissect window, go to 'Assembly-CSharp' and search for the name
you are looking for.

## What I'd like to do in the future:

Expand Down
Loading

0 comments on commit 5ecb57e

Please sign in to comment.