Trying to learn a specific way to cheat.

Memory scanning, code injection, debugger internals and other gamemodding related discussion
Post Reply
User avatar
EphenSteve
Expert Cheater
Expert Cheater
Posts: 98
Joined: Wed Mar 22, 2017 12:30 pm
Reputation: 58

Trying to learn a specific way to cheat.

Post by EphenSteve »

Always wondered how people go about making a script to ignore crafting items entirely when crafting. I know you can just edit how many items you have so you don't have to worry about it but I would just like to add learn if someone has any tips. I'm not really asking to be spoon fed maybe there is just an idea that i'm possibly missing?

for example say something take 6 wood 10 stone and 4 apples

I don't really want to do the basic just give yourself 99 wood 99 stone and 99 apples then i can craft it as much as I want.

I would like to learn how something would just say oh you have 0 of all of these. thats fine (craft button enabled)

your time is appreciated.

GreenHouse
Expert Cheater
Expert Cheater
Posts: 857
Joined: Fri Oct 12, 2018 10:25 pm
Reputation: 889

Re: Trying to learn a specific way to cheat.

Post by GreenHouse »

It depends on the game, but generally the easiest way is to get any of the materials address, check what accesses it and then go where the crafting button is. Then depending on the game it'll work on one way or another. For example it could be that the instruction that accessed it at that point, is from a function called something like "hasEnoughMaterials", which will return true or false. In that case, you can make it return true by going to the beginning and moving a 1 into eax and returning. Or it could also be a more complex function, which could have a compare at one point, and a jae/jge or jbe/jle, which would be comparing it and checking if the value is above or equal to, or less or equal to. So at that point you can change it to whatever you prefer, either go back to the cmp and change what it's comparing it to, and set it to 0, or change the jae/jbe/... to a jmp or nop it(depending on what is needed). But then also at that point once the button is working, you might also need to change the function that decreased the amount of that item, to make it not decrease anything.
Also, you could do the same thing, check what writes a material address when crafting, and from that instruction go back and follow that register. So if that instruction is something like "mov [rbx+08],rax", rax's value is being moved inside [rbx+08] which would be the item amount that you have. So go up and see what wrote rax, and then what wrote what wrote rax, etc. Until you get to a point where the value that is being written is coming from a register that isn't RBP or RSP(or EBP/ESP if it's a 32 bits game), nor a normal register, but a pointer, which means that it has a [] in between. And then that could be the amount required for the crafting, so you could make a script that makes it write it to 0 when opening the crafting menu.

This might be a lot of mumble jumble. But cookie cutter stuff doesn't always work, a game might work in many different ways, so you gotta understand it first and act accordingly. Still, if you have any answer, just ask. But first give it a try.

User avatar
EphenSteve
Expert Cheater
Expert Cheater
Posts: 98
Joined: Wed Mar 22, 2017 12:30 pm
Reputation: 58

Re: Trying to learn a specific way to cheat.

Post by EphenSteve »

Thank you Greenhouse, I'm going to test it on the game Grounded for the newest update on Gamepass seeing as the game has lost a lot of interest due to slow update the tables or trainers are coming in a lot slower for it. I'll try every method (starting with seeing if changing the quantity of the last item needed to craft something sets a boolean to 1 when i have enough then 0 if i dont)

Thanks for your help I appretiate it, ill report my findings.

If you use discord and have a few minutes to spare I have a question about shared opcodes for a Max Carry weight (Demon's Souls on RPCS3) where I know the correct compare but for some reason cant set the other addresses in the list to ignore my instruction. I just started learning the cmp function so I think I might be lacking a line or two.

*edit* sorry just seen you do patreon for discord usage. so you can cancel the second request ^_^ i'm broke atm.

User avatar
LeFiXER
LeFixer
LeFixer
Posts: 479
Joined: Wed Mar 24, 2021 9:35 am
Reputation: 242

Re: Trying to learn a specific way to cheat.

Post by LeFiXER »

Compare commonalities between the accessed addresses. Find the offset where the value is X for your character and the value is anything else for other entities.

Code: Select all

label(otherEntity)

cmp [register+offset], X
jne otherEntity
   // code to do what you want to your player
   jmp return
otherEntity:
  // original code or something else to other entities
   jmp return
I hope this helps :)

User avatar
EphenSteve
Expert Cheater
Expert Cheater
Posts: 98
Joined: Wed Mar 22, 2017 12:30 pm
Reputation: 58

Re: Trying to learn a specific way to cheat.

Post by EphenSteve »

LeFiXER wrote:
Mon Jul 05, 2021 11:05 am
Compare commonalities between the accessed addresses. Find the offset where the value is X for your character and the value is anything else for other entities.

Code: Select all

label(otherEntity)

cmp [register+offset], X
jne otherEntity
   // code to do what you want to your player
   jmp return
otherEntity:
  // original code or something else to other entities
   jmp return
I hope this helps :)
yeah thats basically what I tried to do I just don't think im finding the correct routine that is checking if i have enough. I still haven't been successful. I tried looking at an older CT's script to see the history of how they did it and im not finding that area at all, its been quite a few updates since that CT worked though so they could've changed the whole routine that it runs through.

User avatar
LeFiXER
LeFixer
LeFixer
Posts: 479
Joined: Wed Mar 24, 2021 9:35 am
Reputation: 242

Re: Trying to learn a specific way to cheat.

Post by LeFiXER »

I thought I would write down the process with screenshots explaining things to show you how to do a comparison. The comparison was made against an address that is used by multiple enemies including the main character. I hope this clears up the process a little.

[Link]

GreenHouse
Expert Cheater
Expert Cheater
Posts: 857
Joined: Fri Oct 12, 2018 10:25 pm
Reputation: 889

Re: Trying to learn a specific way to cheat.

Post by GreenHouse »

LeFiXER wrote:
Wed Jul 07, 2021 11:50 am
...
I wouldn't really rely on that, who knows what that is and it could perfectly change on restarting the game, or changing level or something else. They're just random numbers that aren't float/double or any pointer. So I would say that it 100% isn't reliable.

User avatar
LeFiXER
LeFixer
LeFixer
Posts: 479
Joined: Wed Mar 24, 2021 9:35 am
Reputation: 242

Re: Trying to learn a specific way to cheat.

Post by LeFiXER »

GreenHouse wrote:
Wed Jul 07, 2021 4:47 pm
I wouldn't really rely on that, who knows what that is and it could perfectly change on restarting the game, or changing level or something else. They're just random numbers that aren't float/double or any pointer. So I would say that it 100% isn't reliable.
Rely on the method on how to scan for commonalities? Of course, every game is different and there may be extra obstacles but generally this method works very well. By no means am I suggesting to anyone that they should copy and paste this script because of course, it won't work but the method on how the script was achieved can be used

Code: Select all

label(user_defined_label)

newmem:
 // new code here i.e.
 cmp [(register+offset)], (arbitrary value based on the game)  // compare a value held at memory location against a value
 jne (user defined label)                                      // jump to label if it doesn't match
   // instructions to do what you want to achieve here         // execute hack instructions if it does match
   jmp return
 user_defined_label:
   // if the value defined does not equal the player value then do something else
   jmp return
code:
 // original game code
 

GreenHouse
Expert Cheater
Expert Cheater
Posts: 857
Joined: Fri Oct 12, 2018 10:25 pm
Reputation: 889

Re: Trying to learn a specific way to cheat.

Post by GreenHouse »

LeFiXER wrote:
Wed Jul 07, 2021 6:16 pm
Rely on the method on how to scan for commonalities?
Not that. The offset you chose. Looks way too random for it to be reliable in my opinion. But who knows...

User avatar
LeFiXER
LeFixer
LeFixer
Posts: 479
Joined: Wed Mar 24, 2021 9:35 am
Reputation: 242

Re: Trying to learn a specific way to cheat.

Post by LeFiXER »

It's UE4, Necromunda. It works without any issues. It was used for the rate of fire.

User avatar
EphenSteve
Expert Cheater
Expert Cheater
Posts: 98
Joined: Wed Mar 22, 2017 12:30 pm
Reputation: 58

Re: Trying to learn a specific way to cheat.

Post by EphenSteve »

Maybe I explained it incorrectly lol. I know how to do the cmp but I am having trouble finding the correct Instruction. I tried 3 different ones and they all led to dead ends, I was trying on the game pass version of the game "Grounded" and was trying to find out how to craft without having any of the required materials. so like a free craft I think is what im going for.

Maybe a Hint if any of you guys are bored and feel like finding it, just a little nudge in the right direction *wink wink*
Last edited by EphenSteve on Thu Jul 08, 2021 4:31 am, edited 1 time in total.

Post Reply

Who is online

Users browsing this forum: No registered users