Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Need for Speed3/4 Prevent slowdown while air
Goto page 1, 2  Next
 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking
View previous topic :: View next topic  
Author Message
jericho1
Newbie cheater
Reputation: 0

Joined: 08 May 2022
Posts: 12

PostPosted: Sun May 08, 2022 5:41 pm    Post subject: Need for Speed3/4 Prevent slowdown while air Reply with quote

As we know, when we jump in nfs3 and nfs4, we lose speed. (More speed is lost in nfs4). To avoid this, I searched with ce. and I found a value that increases while in the air (the lower is the incident after landing). and I got what I wanted. (replacing the value with "nop") But with a issue. The car does a side roll while in the air. What can I do to fix this? I am new here. Sorry if I've done wrong. Waiting for your help. thx.


nfs3_0097.png
 Description:
 Filesize:  560.39 KB
 Viewed:  4152 Time(s)

nfs3_0097.png



Screenshot_4.png
 Description:
 Filesize:  63.26 KB
 Viewed:  4152 Time(s)

Screenshot_4.png



Screenshot_3.png
 Description:
 Filesize:  67.51 KB
 Viewed:  4152 Time(s)

Screenshot_3.png



Screenshot_2.png
 Description:
 Filesize:  22.69 KB
 Viewed:  4152 Time(s)

Screenshot_2.png



Screenshot_1.png
 Description:
 Filesize:  1.67 KB
 Viewed:  4152 Time(s)

Screenshot_1.png




Last edited by jericho1 on Mon May 09, 2022 7:22 am; edited 1 time in total
Back to top
View user's profile Send private message
jericho1
Newbie cheater
Reputation: 0

Joined: 08 May 2022
Posts: 12

PostPosted: Mon May 09, 2022 7:21 am    Post subject: Reply with quote

Likewise I found it for nfs4. But unfortunately when I replace the value with "nop" it happens like in nfs3.


Adsız3.png
 Description:
 Filesize:  32.16 KB
 Viewed:  4081 Time(s)

Adsız3.png



Adsız2.png
 Description:
 Filesize:  32.34 KB
 Viewed:  4081 Time(s)

Adsız2.png



Adsız.png
 Description:
 Filesize:  13.87 KB
 Viewed:  4081 Time(s)

Adsız.png


Back to top
View user's profile Send private message
TsTg
Master Cheater
Reputation: 5

Joined: 12 Dec 2012
Posts: 334
Location: Somewhere....

PostPosted: Mon May 09, 2022 8:02 pm    Post subject: Reply with quote

so when you set the value to a zero mid air you dont lose speed?
anyways most likely the instructions you found/nopped are shared code, and they are used by other stuff in the game (perhaps the car's rotation angle in this case), to make sure, right click on the address (nfs3.exe+A2BA1) and select the "Find out what this instruction accesses" option, and see how many addresses get edited while driving, mid air, etc.
Back to top
View user's profile Send private message
jericho1
Newbie cheater
Reputation: 0

Joined: 08 May 2022
Posts: 12

PostPosted: Tue May 10, 2022 2:49 am    Post subject: Reply with quote

TsTg wrote:
so when you set the value to a zero mid air you dont lose speed?
anyways most likely the instructions you found/nopped are shared code, and they are used by other stuff in the game (perhaps the car's rotation angle in this case), to make sure, right click on the address (nfs3.exe+A2BA1) and select the "Find out what this instruction accesses" option, and see how many addresses get edited while driving, mid air, etc.


Thanks for your reply, same address accessed. I guess when I do this the game doesn't understand that I'm in mid air at all and makes such a forcing.

I have a video for you to better understand the result:
youtu.be/oaFnSDriGPY



Screenshot_1.png
 Description:
 Filesize:  34.29 KB
 Viewed:  3955 Time(s)

Screenshot_1.png


Back to top
View user's profile Send private message
TsTg
Master Cheater
Reputation: 5

Joined: 12 Dec 2012
Posts: 334
Location: Somewhere....

PostPosted: Tue May 10, 2022 4:25 pm    Post subject: Reply with quote

you could try and search again but instead for the speed itself (usually Float types) , the value you located might be used in gravity calculations or other game physics, i noticed the addresd 4A2068 in nfs3 sets the value to zero two times (i assume its done when landing), there should be some conditional jump near it, this could work as well

you can also try to nop the call right below (nfs3+A2BA8) and see if the barrell roll stil happens, or in case the routine at nfs3+A20C0 is responsible and being called multiple times, you could take a look at the code inside, or disabling the routine itself
Back to top
View user's profile Send private message
jericho1
Newbie cheater
Reputation: 0

Joined: 08 May 2022
Posts: 12

PostPosted: Fri May 13, 2022 2:26 am    Post subject: Reply with quote

[quote:015425fd41="TsTg"]you could try and search again but instead for the speed itself (usually Float types) , the value you located might be used in gravity calculations or other game physics, i noticed the addresd 4A2068 in nfs3 sets the value to zero two times (i assume its done when landing), there should be some conditional jump near it, this could work as well

you can also try to nop the call right below (nfs3+A2BA8) and see if the barrell roll stil happens, or in case the routine at nfs3+A20C0 is responsible and being called multiple times, you could take a look at the code inside, or disabling the routine itself[/quote:015425fd41]

I search a few times. But I just noticed that it was the value that increased and decreased. Perhaps it should be more searched. Yes, it makes the value to the landing softer.

(NFS3+A2BA8) There was no change when I made nopped. and NFS3+A20C0 caused the game to crashed.
Back to top
View user's profile Send private message
TsTg
Master Cheater
Reputation: 5

Joined: 12 Dec 2012
Posts: 334
Location: Somewhere....

PostPosted: Fri May 13, 2022 7:03 pm    Post subject: Reply with quote

ok, i have got the game and decided to take a look, here is what i found and i believe it works:

the value you located represents what i believe the current distance between the car and the ground, looking around the code, the game checks for some acceleration factor, if the factor is higher/equal to 0.6 mid-air, the speed will be lost, this is done at nfs3.exe+A2B35:
Code:
nfs3.exe+A2B28 - 8B B1 5C010000        - mov esi,[ecx+0000015C]
nfs3.exe+A2B2E - C6 81 8B000000 00     - mov byte ptr [ecx+0000008B],00 { 0 }
nfs3.exe+A2B35 - 81 FE 9A99193F        - cmp esi,3F19999A { 0.60 }
nfs3.exe+A2B3B - 7D 49                 - jnl nfs3.exe+A2B86

[ecx+15c] is the accel. factor
[ecx+8B] is a flag to indicate the need to decrease speed mid air
nfs3.exe+A2B86 is the code area you found previously
so i used NOP at nfs3.exe+A2B3B, please test it and let me know the results.
Back to top
View user's profile Send private message
jericho1
Newbie cheater
Reputation: 0

Joined: 08 May 2022
Posts: 12

PostPosted: Sun May 15, 2022 4:48 pm    Post subject: Reply with quote

TsTg wrote:
ok, i have got the game and decided to take a look, here is what i found and i believe it works:

the value you located represents what i believe the current distance between the car and the ground, looking around the code, the game checks for some acceleration factor, if the factor is higher/equal to 0.6 mid-air, the speed will be lost, this is done at nfs3.exe+A2B35:
Code:
nfs3.exe+A2B28 - 8B B1 5C010000        - mov esi,[ecx+0000015C]
nfs3.exe+A2B2E - C6 81 8B000000 00     - mov byte ptr [ecx+0000008B],00 { 0 }
nfs3.exe+A2B35 - 81 FE 9A99193F        - cmp esi,3F19999A { 0.60 }
nfs3.exe+A2B3B - 7D 49                 - jnl nfs3.exe+A2B86

[ecx+15c] is the accel. factor
[ecx+8B] is a flag to indicate the need to decrease speed mid air
nfs3.exe+A2B86 is the code area you found previously
so i used NOP at nfs3.exe+A2B3B, please test it and let me know the results.


Big thanks. Thanks to you, the car can now land properly without rolling. I have found this value before though. But I hadn't nopped it. (I did "jmp". The car falls off the map.) Likewise, I found the value for nfs4. But in both games the car lands very softly and can be steered while mid air lol. If there is a way to fix this it would be great.
Back to top
View user's profile Send private message
TsTg
Master Cheater
Reputation: 5

Joined: 12 Dec 2012
Posts: 334
Location: Somewhere....

PostPosted: Mon May 16, 2022 3:17 am    Post subject: Reply with quote

Update: going after the fly distance, and added a picture to show how heavy the value is used, i managed to find a decent patch that prevent speed-decrease mid-air, prevents-steering and lands the car naturally, check it out and let me know how it goes (also ignore the previous patches):
Code:

nfs3.exe+A23D6 - E9 3A020000           - jmp nfs3.exe+A2615
nfs3.exe+A23DB - 90                    - nop

NOTE: that instruction belongs to shared code, and it will affect the other cars, if you are uncomfortable with that, let me know and i will write a filter script to work on your car only.



codesX.jpg
 Description:
car fly distance usage accross the game's code
 Filesize:  187.84 KB
 Viewed:  3457 Time(s)

codesX.jpg


Back to top
View user's profile Send private message
jericho1
Newbie cheater
Reputation: 0

Joined: 08 May 2022
Posts: 12

PostPosted: Thu May 19, 2022 3:27 am    Post subject: Reply with quote

TsTg wrote:
Update: going after the fly distance, and added a picture to show how heavy the value is used, i managed to find a decent patch that prevent speed-decrease mid-air, prevents-steering and lands the car naturally, check it out and let me know how it goes (also ignore the previous patches):
Code:

nfs3.exe+A23D6 - E9 3A020000           - jmp nfs3.exe+A2615
nfs3.exe+A23DB - 90                    - nop

NOTE: that instruction belongs to shared code, and it will affect the other cars, if you are uncomfortable with that, let me know and i will write a filter script to work on your car only.


Here, that's what I'm looking for. I wanted it to affect all cars. And again, 1-2 days before I wrote this, I changed the above code (cmp) of the value you found from "00" to "01". Result was that it couldn't go above 150 km/h while on the floor. (I guess car was pushing the floor force.) I also managed to find the same for nfs4. This will help in our multiplayer/online races. Lastly, can be possible mid airspeed multiplier increase? and the landing speed loss can be decrease? (Not necessary for nfs3 though) I'm wondering about this. I want to thank you very much for helping me during this time. I'm not sure I could have made it without you. Maybe I can't repay the favor you've done and the time you spent. But at least if you are interested in such racing games or have time, I would like to invite you to our discord server. I will be waiting for your reply.


Last edited by jericho1 on Thu May 19, 2022 4:22 pm; edited 1 time in total
Back to top
View user's profile Send private message
Csimbi
I post too much
Reputation: 92

Joined: 14 Jul 2007
Posts: 3102

PostPosted: Thu May 19, 2022 4:55 am    Post subject: Reply with quote

I think you found the wrong value.
I think you should look for the inertia vector and see what changes it while in mid-air, then disable that code.
Back to top
View user's profile Send private message
jericho1
Newbie cheater
Reputation: 0

Joined: 08 May 2022
Posts: 12

PostPosted: Thu May 19, 2022 4:31 pm    Post subject: Reply with quote

Csimbi wrote:
I think you found the wrong value.
I think you should look for the inertia vector and see what changes it while in mid-air, then disable that code.


What kinda wrong value? I was only able to find that this value increases in mid air. But still, that's ok.

What do you mean by "inertia vector"? Sorry I'm a bit unfamiliar with cheat engine. I can try searching again though.
Back to top
View user's profile Send private message
TsTg
Master Cheater
Reputation: 5

Joined: 12 Dec 2012
Posts: 334
Location: Somewhere....

PostPosted: Thu May 19, 2022 5:13 pm    Post subject: Reply with quote

jericho1 wrote:

Lastly, can be possible mid airspeed multiplier increase? and the landing speed loss can be decrease? (Not necessary for nfs3 though) I'm wondering about this.

it can be done yes, directly modifying the speed is the best approach here, could be done in differnet ways as well.

Csimbi is suggesting to look through the inertia force calculation (Newton's law stuff), which involves calculating the car motion force in relation to the height and mass, you can read about that here
(if i am wrong, dont mind me Razz, i am not a physicist)

jericho1 wrote:
I want to thank you very much for helping me during this time. I'm not sure I could have made it without you. Maybe I can't repay the favor you've done and the time you spent. But at least if you are interested in such racing games or have time, I would like to invite you to our discord server. I will be waiting for your reply.

Thank you for your generous offer, i dont mind joinning discord servers.
Back to top
View user's profile Send private message
Csimbi
I post too much
Reputation: 92

Joined: 14 Jul 2007
Posts: 3102

PostPosted: Fri May 20, 2022 12:31 pm    Post subject: Reply with quote

When I said intertia, I think I might have meant momentum.
Not sure which is which in English Wink
Let me clarify.
Most likely your car has a momentum vector (which way it is moving at any point of time), a rotation vector (which way its body is rotated).
The momentum vector of the car will change if it's slowing down mid-air.
You want to find the code that reduces that momentum.
The problem with this vector is that it's tricky to find.
Start with finding the car's coordinates (forget rotation): stop the car, move it a bit (straight ahead), then search for an increased/decreased float. Repeat until you found the X or Y coordinate.
There may be tons of these, so try freezing them.
When you freeze the real one, the car won't be able to move along the frozen axis.
At this point, see what reads/writes this when you step on the gas.
That will get you the acceleration vector.
See what reads/write the acceleration vector while in mid-air.
NOP the code and see if that works. If not, check the read/writes on the coordiates instead.
Back to top
View user's profile Send private message
jericho1
Newbie cheater
Reputation: 0

Joined: 08 May 2022
Posts: 12

PostPosted: Fri May 20, 2022 5:59 pm    Post subject: Reply with quote

TsTg wrote:
it can be done yes, directly modifying the speed is the best approach here, could be done in differnet ways as well.


That would be great to find.

TsTg wrote:
Csimbi is suggesting to look through the inertia force calculation (Newton's law stuff), which involves calculating the car motion force in relation to the height and mass, you can read about that here
(if i am wrong, dont mind me Razz, i am not a physicist)


Yeah, It's about physics. But I figured it out as a search option. Very Happy

Csimbi wrote:
Start with finding the car's coordinates (forget rotation): stop the car, move it a bit (straight ahead), then search for an increased/decreased float. Repeat until you found the X or Y coordinate.


I already have the x,y,z coordinates of the car.

Code:
Player 1 X = 005E11B8 (Float) - Player 1 Y = 005E11C0 (Float) - Player 1 Z (Float) = 005E11BC - P1 POS = 005E11B8 (Array of byte) - P1 ANGLE = 005E11E0 (Array of byte)


Other 7 players also have coordinates. But I don't think it's necessary. I didn't have time so I quickly skimmed 1-2 addresses. But I couldn't find anything significant.

latest situations were as follows:
nfs3: youtu.be/XHsxnHFN6B8
nfs4: youtu.be/DWUGugoiMGA
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking All times are GMT - 6 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
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


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites