Creating a cheat table - Money and Runes Hook

From Cheat Engine
Revision as of 04:54, 31 December 2017 by TheyCallMeTim13 (talk | contribs) (Created page with 'Category:Tutorial <!-- Tutorials:Create_cheat_table_full:runes_coins_hook --> {{DISPLAYTITLE:Creating a cheat table - Money and Runes Hook}} This page is a sub page of: [[Tut…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search


This page is a sub page of: Creating a cheat table - Full guide

Now after a restart, this is what my table looks like.

Tutorials.Dishonored.MoneyRunesHook.01.png


Step 1

So let's start with seeing what accesses the Coins address and have a look at the instruction that fires when we enter the player menu (not pause menu).


Now let's look at what addresses this instruction accesses.

Tutorials.Dishonored.MoneyRunesHook.02.png


Now lets dissect the structure so select both addresses and right click then select Open dissect data with selected addresses. Then select the new window option and then just yes or OK to the rest of the prompts.

Tutorials.Dishonored.MoneyRunesHook.03.png


So let's inspect the structure.

Tutorials.Dishonored.MoneyRunesHook.04.png

Looking at the structure we can see that Runes are just a few items below the coins, and item structure is only 0xC (12) bytes in size. So no real Id here but look how every Item has a pointer just above the value, I'll bet this points to the items object structure or even it's parent structure ether way lets look there. So just click the little arrow pointing at the pointer address on the left at the very top of the list.

Tutorials.Dishonored.MoneyRunesHook.05.png

And here I see what looks like class structures to me. See how even our coins and runes share the same function table, this is probable part of some kind of world object or dynamic object class of the game or engine. And this "+5C" looks like a good identifier to try, note that I say try, The first one doesn't always work. But I will go ahead and tell you that this one worked one the first version of the game, the latest version on stream, and even the non-steam version.


Step 2

So now that we have an identifier let's write the hook. Now before you start reading the code I suggest that try and write this one your self then see how it compares to mine.


Here is my working script.

Tutorials.Dishonored.MoneyRunesHook.06.png

And the results on my table.

Tutorials.Dishonored.MoneyRunesHook.07.png


Step 3

Now let's setup that add runes and coins scripts I talked about.

So for this we could do it with a thread in auto assembler script or we can use Lua, so let's try both.


For the AA script we just need some memory to use for the code and a return for a call that will be made on our memory.

Tutorials.Dishonored.MoneyRunesHook.08.png


But I really use Lua for this, and here you will see why.

Tutorials.Dishonored.MoneyRunesHook.09.png

Just one line of code for it, but you can bet that in memory they may look the same.


But remember that Lua is a tool in the old tool box, and even though you have a great hammer it will make for terrible tin snips. So always look for the best tool for the job.



Links