 |
Cheat Engine The Official Site of Cheat Engine
|
View previous topic :: View next topic |
Author |
Message |
hiro928 Newbie cheater
Reputation: 0
Joined: 15 Aug 2016 Posts: 16
|
Posted: Mon Aug 15, 2016 7:39 pm Post subject: Alan Wakes American Nightmare question |
|
|
hey everybody, having a little trouble with this script, wonder if i could get some help
in Alan Wakes American Nightmare, i have a script that gives me infinite clip, which is awesome, but i also want infinite ammo as well, i find the value no problem, but when i go to modify the opcode it looks like this
mov [esi+eax*4+20],ecx
mov ecx,esi
i've tried adding "nop"s, i've tried adding my own math before and after, and no matter what, as soon as i shoot with the script active, it crashes, now if i go into the memory viewer and click "replace with code that does nothing" then it works just fine, but i want to put this into script form, any help would be appreciative, thanks!!
|
|
Back to top |
|
 |
PinPoint Expert Cheater
Reputation: 10
Joined: 07 Apr 2016 Posts: 223 Location: Scotland
|
Posted: Tue Aug 16, 2016 2:13 am Post subject: |
|
|
If it worked when you nop'ed it in the dissassembler it should work in a script. usually if you nop an instruction and there is a crash it means it is a shared opcode, but since it worked it might just be your script.
can you edit in of one of the scripts you used so i can see it?
|
|
Back to top |
|
 |
cooleko Grandmaster Cheater
Reputation: 11
Joined: 04 May 2016 Posts: 717
|
Posted: Tue Aug 16, 2016 5:14 am Post subject: |
|
|
probably wrong number of nops, make sure you have the correct number to match the original byte count.
|
|
Back to top |
|
 |
hiro928 Newbie cheater
Reputation: 0
Joined: 15 Aug 2016 Posts: 16
|
Posted: Tue Aug 16, 2016 2:23 pm Post subject: |
|
|
this is the script I wrote, I think I have the right number of nops, when I go into the memory viewer, I hit "replace with code that does nothing" and count the number of nops it uses and use that many, unless I did something wrong in the script, but I've wrote other scripts just like this before and they worked fine?
Description: |
|
Filesize: |
99.38 KB |
Viewed: |
8413 Time(s) |

|
|
|
Back to top |
|
 |
++METHOS I post too much
Reputation: 92
Joined: 29 Oct 2010 Posts: 4197
|
Posted: Tue Aug 16, 2016 2:47 pm Post subject: |
|
|
Let CE build your script for you. Comment out the mov [esi+eax*4+20],ecx but leave the mov ecx,esi.
Code: | newmem:
//mov [esi+eax*4+20],ecx
mov ecx,esi
jmp return |
|
|
Back to top |
|
 |
PinPoint Expert Cheater
Reputation: 10
Joined: 07 Apr 2016 Posts: 223 Location: Scotland
|
Posted: Tue Aug 16, 2016 3:58 pm Post subject: |
|
|
++METHOS wrote: | Let CE build your script for you. Comment out the mov [esi+eax*4+20],ecx but leave the mov ecx,esi.
Code: | newmem:
//mov [esi+eax*4+20],ecx
mov ecx,esi
jmp return |
|
this is exactly what i was going to suggest to him but wanted to see if it was something else he was doing
|
|
Back to top |
|
 |
hiro928 Newbie cheater
Reputation: 0
Joined: 15 Aug 2016 Posts: 16
|
Posted: Tue Aug 16, 2016 6:14 pm Post subject: |
|
|
++METHOS wrote: | Let CE build your script for you. Comment out the mov [esi+eax*4+20],ecx but leave the mov ecx,esi.
Code: | newmem:
//mov [esi+eax*4+20],ecx
mov ecx,esi
jmp return |
|
alright, I get what you mean about commenting out the mov using //, I did that with my infinite clip script, but what do you mean "let CE build your script for you"? why should I comment out the one mov but not the other? sorry i'm a script noob, and I like knowing why you do things rather than just doing it, which is why I wanted to build a script rather then just clicking "replace with code that does nothing" all the time, i'm trying to learn this stuff
|
|
Back to top |
|
 |
PinPoint Expert Cheater
Reputation: 10
Joined: 07 Apr 2016 Posts: 223 Location: Scotland
|
Posted: Tue Aug 16, 2016 6:25 pm Post subject: |
|
|
hiro928 wrote: | ++METHOS wrote: | Let CE build your script for you. Comment out the mov [esi+eax*4+20],ecx but leave the mov ecx,esi.
Code: | newmem:
//mov [esi+eax*4+20],ecx
mov ecx,esi
jmp return |
|
alright, I get what you mean about commenting out the mov using //, I did that with my infinite clip script, but what do you mean "let CE build your script for you"? why should I comment out the one mov but not the other? sorry i'm a script noob, and I like knowing why you do things rather than just doing it, which is why I wanted to build a script rather then just clicking "replace with code that does nothing" all the time, i'm trying to learn this stuff |
He just means use the Templates CE has and dont try to write them from scratch. The more you get used to seeing scripts and how they flow, you will eventually be able to make one without a template, but CE is great at it and more often than not you will see templated scripts in the majority of tables and hacks. And even when you do get to a much better level, they are still a great starting point to expand on.
you dont want to comment out the other instruction because you dont know what it is writing to. and it will likely cause a crash. like the script screenshot you posted, it crashed because the other instruction was needed and wasnt included. it would work if it was:
Code: |
newmem:
nop
nop
nop
nop
mov ecx,esi
jmp return
|
although this is overkill with the nops. you dont even need to comment out the instruction, you couldve just deleted it(commenting out does the same thing more or less though and you will have another reference to what you have done in the newmem)
_________________
Will you be my friend Hitler?
Rep me then |
|
Back to top |
|
 |
hiro928 Newbie cheater
Reputation: 0
Joined: 15 Aug 2016 Posts: 16
|
Posted: Tue Aug 16, 2016 6:49 pm Post subject: |
|
|
PinPoint wrote: | hiro928 wrote: | ++METHOS wrote: | Let CE build your script for you. Comment out the mov [esi+eax*4+20],ecx but leave the mov ecx,esi.
Code: | newmem:
//mov [esi+eax*4+20],ecx
mov ecx,esi
jmp return |
|
alright, I get what you mean about commenting out the mov using //, I did that with my infinite clip script, but what do you mean "let CE build your script for you"? why should I comment out the one mov but not the other? sorry i'm a script noob, and I like knowing why you do things rather than just doing it, which is why I wanted to build a script rather then just clicking "replace with code that does nothing" all the time, i'm trying to learn this stuff |
He just means use the Templates CE has and dont try to write them from scratch. The more you get used to seeing scripts and how they flow, you will eventually be able to make one without a template, but CE is great at it and more often than not you will see templated scripts in the majority of tables and hacks. And even when you do get to a much better level, they are still a great starting point to expand on.
you dont want to comment out the other instruction because you dont know what it is writing to. and it will likely cause a crash. like the script screenshot you posted, it crashed because the other instruction was needed and wasnt included. it would work if it was:
Code: |
newmem:
nop
nop
nop
nop
mov ecx,esi
jmp return
|
although this is overkill with the nops. you dont even need to comment out the instruction, you couldve just deleted it(commenting out does the same thing more or less though and you will have another reference to what you have done in the newmem) |
oh yeah, I don't write anything myself, i'm nowhere near that level yet, I always use a template, also, so if I understand what your saying right, I don't comment out the other one cause i'm not sure what it's writing to, so I can assume that if a registry, i.e. ecx, esi, whatever, is not in [], then it's not writing to anything, at least not in this opcode, but possibly in another one? again sorry for pestering, I enjoy learning this, and I like learning why things work or don't work the way they do, if anyone could link me to a good tutorial on this kind of stuff, i'd gladly read it, also I tried your suggestion, and it did work!! so thanks! now all I need is infinite health, which will mean dissecting data and finding differences, which from tutorials I've read is a pain in the arse, mainly cause it's tedious and time consuming
|
|
Back to top |
|
 |
PinPoint Expert Cheater
Reputation: 10
Joined: 07 Apr 2016 Posts: 223 Location: Scotland
|
Posted: Tue Aug 16, 2016 6:59 pm Post subject: |
|
|
your not pestering.
it doesn't matter if it is like eax or [eax]. but yes, it will be writing/accessing something else. most of the time though you don't want to simply nop/modify opcodes like mov,edx,[eax] where the destination is not in brackets, regardless if it writes your address or not. It changes from game to game though.
Cant think of any tutorials off the top of my head, I know there are alot of posts with discussions of stuff like this though. download some tables and have a look at how different people make scripts and try and try and follow and understand any newmem code in aobinjection scripts.
edit:
To only name a few of many who have helped me understand stuff, Alot of the posts from++Methos, ParkourPenguin, Zanzer, mgr.ingz.Player and Darkbyte are that of helping people understand their CE problems, use the search with their name and look at their past posts. even though this isnt really a method of finding an exact problem, im positive you will learn alot.
dissect data/structures can be a pain, but once you've done it a few times and got into the swing of it, you will get more efficient at finding filters and picking out values of things you are looking for.
_________________
Will you be my friend Hitler?
Rep me then
Last edited by PinPoint on Tue Aug 16, 2016 7:11 pm; edited 2 times in total |
|
Back to top |
|
 |
hiro928 Newbie cheater
Reputation: 0
Joined: 15 Aug 2016 Posts: 16
|
Posted: Tue Aug 16, 2016 7:09 pm Post subject: |
|
|
PinPoint wrote: | your not pestering.
it doesn't matter if it is like eax or [eax]. but yes, it will be writing/accessing something else. most of the time though you don't want to simply nop/modify opcodes like mov,edx,[eax] where the destination is not in brackets, regardless if it writes your address or not. It changes from game to game though.
Cant think of any tutorials off the top of my head, I know there are alot of posts with discussions of stuff like this though. download some tables and have a look at how different people make scripts and try and try and follow and understand any newmem code in aobinjection scripts.
dissect data/structures can be a pain, but once you've done it a few times and got into the swing of it, you will get more efficient at finding filters and picking out values of things you are looking for. |
that's the main problem I have with dissecting data, I used a tutorial on youtube to write an infinite health code for Dark Souls 3, which was cool, but yeah the main problem I have is finding the right offset to use for the comparison, mainly cause a lot of times all the differences look like "me: 1.399999, enemies: 2.8644436" and so forth, it's hard to find the offsets that are static and not dynamic
|
|
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
|
|