NFSAddons Forums

Main Menu

Using ghost files to customize a race [NFS4]

Started by DrSpeed, Oct 01, 2016, 8:10 AM

Kevin K


Zalcus20

This is not directly related to editing a ghost file, but I found an interesting edit for the nfs4.exe file.

There is a way to get all cars to turn on their headlights during a day race (without weather).

Here are the instructions (you will need a hex editor):
NOTE: As always, make a backup of your nfs4 executable.

1. Using HxDen, open the nfs4.exe.
2. Press "Ctrl + G" and type "00018B0A" in the Offset box and click ok. HxDen will automatically place the cursor at the correct location.
3. Change byte "00" to "01".
4. Save nfs4.exe

So basically you are doing: nfs4.exe 0x18B0A 00 >> 01

I have only tested this with the modern patch by Veg. nfshsgame.exe version should work too, but I haven't tested it. As long as the addresses correspond, this small patch should work. 

noise

Nice find but a switch of a button during race works fine for me. I wish it was possible to turn lights out in playercar menu.

DrSpeed

Quote from: Zalcus20 on May 21, 2024,  3:23 PM
This is not directly related to editing a ghost file, but I found an interesting edit for the nfs4.exe file.

There is a way to get all cars to turn on their headlights during a day race (without weather).

Maybe starting a thread related to NFS4 exe stuff? Because I also have a bunch of addresses to share and I don't want to go too off topic from this thread.
Also nice find, I'll use it in my game.  ;)

pete9516

Quote from: Zalcus20 on May 21, 2024,  3:23 PM
This is not directly related to editing a ghost file, but I found an interesting edit for the nfs4.exe file.

There is a way to get all cars to turn on their headlights during a day race (without weather).

Here are the instructions (you will need a hex editor):
NOTE: As always, make a backup of your nfs4 executable.

1. Using HxDen, open the nfs4.exe.
2. Press "Ctrl + G" and type "00018B0A" in the Offset box and click ok. HxDen will automatically place the cursor at the correct location.
3. Change byte "00" to "01".
4. Save nfs4.exe

So basically you are doing: nfs4.exe 0x18B0A 00 >> 01

I have only tested this with the modern patch by Veg. nfshsgame.exe version should work too, but I haven't tested it. As long as the addresses correspond, this small patch should work.
So the AI has headlights turned on? But the road textures will remain unchanged?

Zalcus20

#170
Quote from: pete9516 on May 26, 2024,  6:04 AM
So the AI has headlights turned on? But the road textures will remain unchanged?

AI will have their headlights on only. There are no road reflections from the headlights or sirens.

Although if you want to enable light reflections, there is that lighthack tool that Jagboy made years ago.  ;)

EDIT: Jagboy's light hack can be found here: https://nfshome.nl/utils.php?version=4 It complements this patch very well.

Zalcus20

Quote from: DrSpeed on May 25, 2024, 11:57 PM
Maybe starting a thread related to NFS4 exe stuff? Because I also have a bunch of addresses to share and I don't want to go too off topic from this thread.
Also nice find, I'll use it in my game.  ;)

Yeah. I'll start a new thread if I find more addresses to share.

This is my first attempt at patching an executable file, so I am glad that you like this 'fix'.