Difference between revisions of "Tutorials:Create cheat table full:runes coins hook"
(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…') |
m |
||
Line 72: | Line 72: | ||
− | But remember that Lua is a tool in the | + | But remember that Lua is a tool in the 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. |
{{Tutorials:Create_cheat_table_full:links}} | {{Tutorials:Create_cheat_table_full:links}} |
Revision as of 19:38, 31 December 2017
This page is a sub page of: Creating a cheat table - Full guide
Now after a restart, this is what my table looks like.
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.
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.
So let's inspect the structure.
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.
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.
And the results on my table.
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.
But I really use Lua for this, and here you will see why.
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 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.