Wouldit be possible to avoid searching values and setting them (i explained, what I need bellow) in cheat engine? I know you can find pointers of adreses and create trainer, but the problem is that the apps, I use cheat engine on, get updated a lot by my companies, and the pointers change every time.Meaning, I would have to create new trainers multiple times a week. Basically almost every day..
I'm not asking for complete code, but some detailed info with links would be highly appreciated, as I have used cheat engine a lot, and I know a lot about programing, I have 0 experience and knowledge about cheat engine scripting.
Would it be possible to automate this? Yes it would be. You could automate this by creating a cheat engine script at the least or creating a trainer. Your question also states that you want to do it without creating a trainer, so no.
When the game you're working on updates frequently, you are correct that pointers become a burden to reverse and update each patch. The solution is to use array of byte signature scanning to locate assembly instructions that access the variables you're wanting to access. Don't worry CE has you covered on that as well, AOBScan().
Most of the time you can create a script that will handle updates. For example, once you find the address, right-click and do 'find out what accesses this address'. Wait for something to change the value and the window that pops up will show you the code that changes that address. Right-click on one of the results and open the disassembler. Let's say it's the line movsd xmm0,[ecx] here:
Select that line and hit CTRL+A to open the auto-assembler window. Then from the Template menu select 'AOB Injection'. Save this to your table and close the window, then open up that new script. There will be a line near the top that starts with aobscanmodule. If you see an error there it couldn't determine a unique signature for that memory location. If there is no error, then when the game is updated and the addresses change, it should still be able to find it. There should be a section that looks like this:
This is relocated code. The original code in the game is replaced with a jmp to a newly allocated memory area where this code is assembled, then the jmp return goes back to after that code in the original memory region.
You need to know a touch of assembly. The instruction movsd xmm0,[ecx] loads the floating point value in the memory location pointed to by ecx into the xmm0 register. This accesses the memory location you care about, so you could just set that value like this:
Now whenever the program tries to run that code which accesses that memory location, it will instead jump to the new memory location, update the value at that address to 500.0, then run the original code and jump back.
When the aobscanmodule line does show an error it means that there are too many sections of code that are too similar. The logic looks backwards and forwards several lines of assembly and looks for the hex bytes, ignoring addresses that might change if the game is updated. For instance nothing in that code will probably change when the game is updated, there are no pointers and just one fairly close jmp instruction.
To be extra careful you might want to stop the window that is finding code accessing that address, then right-click on that line of code and select 'find out what addresses this instruction accesses'. If more than one address appears in the window then you're kinda screwed without more help because it is a generic piece of code used for more values than just the one you care about.
In the third scenario, you clearly want or must have some cheat prevention mechanisms. This is usually approached by a client-server type architecture, where the server validates the data send from players and has authority over their actions. This is however accompanied with additional complexity and development time, as well as some necessary trickery to get around additionally introduced delays and so on.
Solving the forum thread window was trivial but the settings window confounded me for a while. I tried to be clever with complex solutions that I came across mention of but none of them worked. Finally I discovered that I could just open and close the settings window and it was removed from the list solving the problem.
The more time you spend on this, the less time you will spend on your game. The less time you spend on your game, the fewer people will play your game. The fewer people you have playing your game, the fewer hackers you will attract. The fewer hackers you attract, the less often your game will get hacked.
That said a script kiddie will only have to worry about coming up with the solution themselves if your game is not popular. Popular games almost always have dedicated threads on the CE forums with premade tables. Elden Ring had a thread within a week of release and it uses a proper anti-cheat system not a hack job like yours.
You need to have the Memory Viewer window open and go to "Tools->Auto Assemble" or hit CTRL+A to open the Auto assemble window. When you click "Execute" the code is not actually executed, but assembled into machine code. The code is actually executed when you overwrite existing game code and the game executes it in the normal course of playing or when you call CREATETHREAD.
Writing an address or label followed by a colon will do one of two opposite things. If the label is known, i.e. it is an address or if there is a defined symbol or memory has been allocated with that name, the assembler will move to that address for assembling the following code. If the label is unknown, it must have been passed to LABEL(name) (or you will get an error) and the value of that label will be set to the current position where code is set to be assembled.
Scripts assigned to cheat tables usually have two sections, "[ENABLE]" and "[DISABLE]". Code before "[ENABLE]" will be assembled every time the script is enabled OR disabled. The code in the "[ENABLE]" section will be assembled (not executed) when the entry is checked and the code in the "[DISABLE]" section will be assembled when the entry is unchecked.
You will generally alloc memory in [ENABLE] and overwrite existing instructions inside the process you have opened to jump to your code where you can modify values and jump back. You will then dealloc the memory and put the original instructions back when disabling.
When syntax checking, the lua sections get executed. To make sure your lua script behaves properly in those situations, check the "syntaxcheck" boolean. If it's true, then do not make permanent changes.e.g:
Speed hacks can be solved by setting entity max speed to 7.4 which is around the max speed you can run. As I was trying to create a sort of anticheat and figured this out, tried both an external menu and scripthook menu and neither could bypass this. I believe it only has to be set on spawn/respawn
A CT file is a cheat table file created with Cheat Engine software that is used to create modifications to Windows based games for cheating. The Cheat Engine, an open-source cheating engine, examines the executing games and makes a record of its address locations. This information and its overrides are written in the CT file that is then loaded by game players to change game properties such as health score, highest score, and remaining lives.
CT files are saved with address locations and other associated information to be hacked inside a game. In most cases, the files are saved as compressed ZIP archives that can easily be extracted using any standard decompression utility such as WinZIP or 7-Zip.
Cheat Engine (CE) is a proprietary, source available[5] freeware memory scanner/debugger created by Eric Heijnen ("Byte, Darke") for the Windows operating system in 2000.[6][7] Cheat Engine is mostly used for cheating in computer games and is sometimes modified and recompiled to support new games. It searches for values input by the user with a wide variety of options that allow the user to find and sort through the computer's memory. Cheat Engine can also create standalone trainers that can operate independently of Cheat Engine, often found on user forums or at the request of another user.
3a8082e126