|
Cheat Engine The Official Site of Cheat Engine
|
View previous topic :: View next topic |
Author |
Message |
LDKSuperDante How do I cheat? Reputation: 0
Joined: 24 Dec 2023 Posts: 3
|
Posted: Sun Dec 24, 2023 11:21 pm Post subject: Looking for help making a script, also have questions |
|
|
Hello everyone, just joined and hoping to find some help.
I have a little bit of experience with cheat engine but haven't used it for anything big over the years so I'm no expert.
I'll ask my question first and then get on to the bigger subject. When looking through a game's code in the memory view, is it by chance possible to somehow tell if the game is pulling that from the exe itself, or if it's loading from a file? I ask because long story short, I'm making a mod for a game, and NPC's and enemies that are classified as such (and not classified as normal enemies) are somehow glitched out and locked to 1000hp, making them very easy to kill. I can't find the file so it might be hard coded into the exe but I'm hoping it isn't, and as I stated in my above question, I wondered if you could somehow tell when looking in memory view.
The second thing is a little more complicated. The game I'm working on is Dragon's Dogma: Dark Arisen. A couple years ago, I was working with someone to make a multiplayer mod of sorts. The idea was to write a cheat engine script that when enabled, disabled the AI companion (Pawn) AI and allowed them to be controlled by another controller by inserting the same logic the player had. It looked like he was getting pretty close but then he just stopped responding one day. I've been looking for the past 2 years for someone to help me do this but for whatever reason never thought to join these forums.
Thanks in advance for anyone's help, and sorry about the long message, thank you for taking the time to read it!
|
|
Back to top |
|
|
LDKSuperDante How do I cheat? Reputation: 0
Joined: 24 Dec 2023 Posts: 3
|
Posted: Wed May 15, 2024 7:41 pm Post subject: Bump |
|
|
Posted this a little while ago, just thought I'd give it a little bump, and also say that I have someone looking into the HP thing more thoroughly now, so we should have more to go off of soon.
|
|
Back to top |
|
|
ParkourPenguin I post too much Reputation: 147
Joined: 06 Jul 2014 Posts: 4518
|
Posted: Thu May 16, 2024 2:24 am Post subject: |
|
|
LDKSuperDante wrote: | When looking through a game's code in the memory view, is it by chance possible to somehow tell if the game is pulling that from the exe itself, or if it's loading from a file? | Pulling what? I wouldn't say the game itself or the game's code "pulls" anything.
If you're talking about whether some machine code is located in the exe or in dynamically allocated memory, enable Memory View -> View -> Show module addresses.
If the address in the disassembler looks like "game.exe+1234", it was statically compiled code that's stored in the exe. If it's a dynamic address or some other kind of symbol (e.g. GameController:DoSomething+123), that machine code was probably JIT compiled from some form of bytecode (e.g. mono, java, old flash games...)
LDKSuperDante wrote: | I can't find the file so it might be hard coded into the exe but I'm hoping it isn't, and as I stated in my above question, I wondered if you could somehow tell when looking in memory view. | Again, this is ambiguous. What's "it" that you think might be hard coded into the exe?
An exe is just a file. If you're hoping for a separate file with documentation saying "This value controls the health of certain special enemies," that's very unlikely.
LDKSuperDante wrote: | The idea was to write a cheat engine script that when enabled, disabled the AI companion (Pawn) AI and allowed them to be controlled by another controller by inserting the same logic the player had. | That would require reverse engineering a significant portion of the game. That's very different from the typical hacks that simply change the code that accesses a certain address. I don't think you'll find any volunteers who are both willing and able to actually do that.
These forums aren't really the place to discuss how to mod a game. You'd find better help elsewhere. Maybe look at already existing mods and figure out how they work.
_________________
I don't know where I'm going, but I'll figure it out when I get there. |
|
Back to top |
|
|
LDKSuperDante How do I cheat? Reputation: 0
Joined: 24 Dec 2023 Posts: 3
|
Posted: Thu May 23, 2024 9:33 pm Post subject: |
|
|
Sorry, I'll try to be more clear, I'm not super experienced with everything so I may not know the right words. I was also trying to keep my message short because I tend to overexplain things.
So, I was asking if it was possible to look at a line of code in Cheat Engine, and somehow be able to tell if it was exclusively in the EXE, or if it was in one of the games files. For the game I'm working on, we've found things that are hard coded, and by that I mean exclusively in the EXE, and things that are in files that I can easily mess with. But, I can easily find the things that are in the files I can mess with, in the memory view in Cheat Engine. But if I can't find what I'm looking for in files, I can assume that it's something exclusively found in the EXE. But, because that's a bit harder for me to mod and I have to rely on my programmer friend to help me with whenever he's not busy, I was curious if there was a way to somehow identify through cheat engine if something is exclusively found in the EXE, or if it's in a file, and I was just missing it.
The issue has been solved though. The code was found to be exclusive to the EXE, I got ahold of my programmer friend, and we were able to fix the NPCs, woo!
I'm not able to take a look at existing mods and figure out how they work because I AM the guy making these mods. The game didn't get modding tools or anything fancy so things are mostly done from scratch, so most of what you see with the game is texture edits and model swaps, with a few hex edited things and some animation swapping. But one thing me and my programming buddies do is look through the memory in Cheat Engine to figure stuff out, though they are much better at it than I am as they are much better able to understand this sort of thing. I handle everything else haha.
As for the Multiplayer thing, I was talking to a guy that goes by Omni. He did a ton of things I didn't even know was possible with Cheat Engine for Dragon's Dogma as well as a lot of other games. I talked with him for a while and he said he thought it'd be pretty doable, and began working on the Cheat Engine script, but then stopped replying one day and never got back to me. So, I know this isn't the usual place to go for game modding, but in this specific case, I still thought it could be helpful.
|
|
Back to top |
|
|
atom0s Moderator Reputation: 200
Joined: 25 Jan 2006 Posts: 8546 Location: 127.0.0.1
|
Posted: Fri May 24, 2024 3:07 pm Post subject: |
|
|
Quote: | So, I was asking if it was possible to look at a line of code in Cheat Engine, and somehow be able to tell if it was exclusively in the EXE, or if it was in one of the games files. For the game I'm working on, we've found things that are hard coded, and by that I mean exclusively in the EXE, and things that are in files that I can easily mess with. But, I can easily find the things that are in the files I can mess with, in the memory view in Cheat Engine. But if I can't find what I'm looking for in files, I can assume that it's something exclusively found in the EXE. But, because that's a bit harder for me to mod and I have to rely on my programmer friend to help me with whenever he's not busy, I was curious if there was a way to somehow identify through cheat engine if something is exclusively found in the EXE, or if it's in a file, and I was just missing it. |
There's no guaranteed way that will always work for all processes or all bits of data. The most you can do is make educated guesses or use multiple things to confirm/verify as you are working through the data.
The manner in which Windows PE files work does not require or guarantee what sections of the file contain what data. There is simply basis that is suggested but not required to be followed. For example, the main code section of a file that holds the executable code of the application is generally named '.text'. Compilers are encouraged to make use of this section for this kind of data by default. However, you can tell a compiler to merge sections together and force other data to reside inside of the .text section instead. Section names are also not enforced and can be named anything you want, or nothing at all.
Depending on how the game is coded, there's basically an infinite number of ways the kind of data you're looking at can be handled/stored and loaded. It can be hard coded to a point where that 1000 health value is part of the actual executable code, or it can be a global static variable that is stored in another section of the file (ie. within the .data section or similar). The game can predefine a block of data inside of the file (static memory) to hold the various Pawn data or it can dynamically allocate a block of data to be populated with the hardcoded data along with additional data loaded from the game files itself.
I'd suggest also making use of a disassembler, such as Ghidra or IDA, to compare against a static analysis of the executable itself which can also quickly help track down what is actually hardcoded when comparing to whats loaded in memory. Making use of a disassembler with a decompiler such as either of these tools can also make it a lot easier to track down what you're looking for specifically with modding how Pawns, Pawn AI, and other Pawn related mechanics work/function.
_________________
- Retired. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
|
|