Cheat Engine How To Find Debug Stuff In Games

Most of you are having a problem when trying to cheat Windows 8 Store or Metro games with Cheat Engine. And the problem is Cheat Engine can't list the Window. DO NOT WATCH THIS VIDEO!!! DO THE NEW ONE: this tutorial is going to show you the basics of how to mod any game using chea. Debug menu - when activated, press Tab to open the debug menu. check 17684's post for debug mode for the original script. How to use this cheat table? Install Cheat Engine; Double-click the.CT file in order to open it. Click the PC icon in Cheat Engine in order to select the game process. Shortcut key to enable the debug HUD. My next plan was to use Cheat Engine to make cheats and enable debug HUD. But it's already done. In the next part, I will write my thoughts about some questions that I was asked about such cheating. Maybe after that, I will return and do the Cheat Engine part but I will need to re-learn the tool again.

How

In this part, I am going to use dnSpy to enable the Debug HUD. We will analyze how it's enabled and how it can be accessed.

Looking at StatsModificator.intelligence, I went down this rabbit hole to see how items are created.

Item creation call analysis

And I saw these two methods in a class named HUDDebug. They have curious names GiveItemToWill and GiveWeaponToWill. If my guess is correct, there's a debug UI somewhere in the game that allows spawning items.

HUDDebug Class

It has a Start() method, we can analyze it to see what calls it.

Seems like nothing calls it, same with Awake().

HUDDebug analysis

These are unity methods. According to this video https://unity3d.com/learn/tutorials/topics/scripting/awake-and-start:

  1. Awake(): Called first even if the script is not enabled. Used for initialization.
  2. Start(): Called only once after awake and before update if the script is enabled.
  3. Update(): Called after the script is enabled and can be called multiple times.
Cheat engine how to find debug stuff in games to play

These are called by the engine, so the Analyze tab will not have the chain.

Inside Update() we can see:

HUDDebug.Update()

Pay attention to line 76. There's an if condition that enables everything. We can analyze IsDebugEnabled:

IsDebugEnabled analysis

Woot. It seems like we found it. Now we need to modify this to only return true.

IL instructions for get_IsDebugEnabled

To return true, we need to return 1. We can delete lines 0 to 6 and only keep lines 7 and 8:

Highlight lines 0 to 6 and press delete (or use the context menu) to remove them. Press Ok to get the modified C# code.

Modified get_IsDebugEnabled

This enables debug mode for every run. But what else is out there?

Debug Shortcuts

Let's go back to the analysis results for GameManager.IsDebugEnabled

IsDebugEnabled analysis

We have already looked at HUDDebug.Update, now we look at the other two.

HeroMerchant.Update() has some shortcuts.

HeroMerchant.Update()

KeyCodes

Input.GetKeyDown detects when a key is pressed and released. The parameter to the method is an enum of type KeyCode or a string. It took me a while to find out the associated numbers.

I found it in the decompiled code at:

Here's a local copy, in case the repository is taken down.

It's based on ASCII-Hex decimal values with extra keys (e.g. gamepad) in the end.

Now we can decipher some debug shortcuts:

Potion Shortcut
  • 104: H
  • 304: LeftShift
Games

Note we can also change the item granted with anything we want.

We can teleport to the last room of any dungeon floor:

  • 98: B
  • 304: LeftShift

And so on.

Controller Shortcuts

Cheat Engine How To Find Debug Stuff In Games Fortnite

HeroMerchantController.Update() defines controller shortcuts.

Controller shortcuts

Save/Reset Shortcuts

There are a couple of more shortcuts inside HUDDebug.Update():

Save/reset shortcuts
  • Save: LeftShift + S
  • Reset: LeftShift+ R

Enabling Debug HUD

We still need to enable the HUD. It must have a shortcut key. Searching the internet tells us it's Tab.

See this page about a CheatEngine trainer:

Cheat Engine How To Find Debug Stuff In Games Online

How can we find it ourselves? Back inside HUDDebug.Update() we can see a block that enables and disables consoleDebugPanel:

Enabling and disable consoleDebugPanel

Inside the if we can see that GameManager.Instance.consoleDebug is referenced. Let's analyze that.

consoleDebug analysis

Double-click on GameManager.Update():

GameManager.Update()

We can see it's triggered by holding the ButtonRightStick for a second (I think). A bit further up we can see the equivalent keyboard shortcut.

It's the Tab key which confirms what we found online. We can press Tab in the game to enable debug HUD.

Debug HUD

And it's quite extensive.

We learned:

  • How to use dnSpy's Analyze feature to track variables/methods/etc.
  • How to enable debug mode.
  • Shortcut keys for various things such as potions.
  • Shortcut key to enable the debug HUD.

My next plan was to use Cheat Engine to make cheats and enable debug HUD. But it's already done. In the next part, I will write my thoughts about some questions that I was asked about such cheating. Maybe after that, I will return and do the Cheat Engine part but I will need to re-learn the tool again.