NFSAddons Forums

Need For Speed Forums => General NFS => Topic started by: DrSpeed on Oct 01, 2016, 8:10 AM

Title: Using ghost files to customize a race [NFS4]
Post by: DrSpeed on Oct 01, 2016, 8:10 AM
Greetings!
This thread will teach you how you can add additional AI drivers to a race by simply edit a ghost data file. Want to have more and unique police cars in a Hot Pursuit race? Tired of only having 7 AI opponents? More traffic cars to dodge? How about additional racers and cops in two player mode? All is possible!


What you'll need:
A HEX editor - I'm using HxD
or use Cheat Engine (see below)
Knowledge in HEX numbers.

If you don't know how to use HEX editors, follow Zalcus method on using Cheat Engine instead, which is also much easier. (http://www.nfsaddons.com/forums//index.php?topic=1831.msg33827#msg33827) The rest in this post can also be ignored.



First things first:



00000FEC-00000FEE = XYZ Start Location (Getaway mode only)



00000FF0 = Gamemode
00 = Single Race
01 = Tournament
02 = Knockout
03 = Hot Pursuit
04 = High Stakes (Will crash the game when the race is done. The car upgrades is activated in this mode.)

0000109C = Hot Pursuit Gamemode (only activated if 00000FF0=3)
00 = Classic
01 = Getaway
02 = Time Trap



00001098 = Opponent Skill
00 = Amateur
01 = Pro
02 = Champion
03 = Getaway Mode



000010A4 = Tickets Quota
Number of tickets for the police team. This value should be the total number of tickets for the speeders. I changed my game to have 4 speeders instead of 2, so for me this will be: 4*5=20 (14 in HEX).
NumberOfRacers * MaxTickets = TicketsQuota

000010A8 = Max Tickets for each speeder
Since the police team must deliver 20 tickets, each speeder needs to have 5 tickets. So this value must be 05.



000010E8 = Number of Laps: 2, 4 or 8. You can use any number here, but I wouldn't personally recommend it since I don't know how the game will keep any track records.
000010EC = Direction (0=Forward, 1=Backward)
000010F0 = Mirrored (0=Off, 1=On)
000010F4 = Nighttime (0=Off, 1=On)
000010F8 = Weather (0=Off, 1=On)



000010E0 = Track
00 = Celtic Ruins
01 = Landstrasse
02 = Dolphin Cove
03 = Kindiak Park
04 = Route Adonf
05 = Durham Road
06 = Snowy Ridge
07 = Raceway 1
08 = Raceway 2
09 = Raceway 3
0A = Hometown
0B = Redrock Ridge
0C = Atlantica
0D = Rocky Pass
0E = Country Woods
0F = Lost Canyons
10 = Aquatica
11 = The Summit
12 = Empire City



0000112C = Cheat Codes
00 = Deactivated
01 = GOFAST
08 = MOON
0A = MADLAND
14 = SKYVIEW
28 = OUTMYWAY
50 = RESETYA
02 00 00 xx = TR00 - TR15 (00-0F)
To add 2 cheats, simply add the two values together. Example: MOON and MADLAND: 8 + A = 12



0000115C = Enable/Disable Helicopter (0=Disable, 1=Enable)
0000114C = Helicopter Sounds (0=Off, 1=On)
000010AE = Helicopter Lights and countdown timer (0=Off, 1=On)



00001140 = Number of Cars in total (Max=10)
00001144 = Number of Humans in total (Max=02)

00001148 = Number of Human Drivers (Max=02)
0000114C = Number of Human Cops (Max=02)
00001150 = Number of AI Drivers (Max=0E)
00001154 = Number of AI Cops (Max=08)
00001158 = Number of AI Traffic (Max=0F)
All addresses above is to help the game to spawn the cars correctly. Always double check the AI types for each racer, cop or traffic driver. Otherwise the game crashes or will not spawn them correctly.




The following adresses here is for Player One, to change for the next player simply add 70 in the address, and another 70 for the next one.
Note: Each player always starts with the name, so it's quite easy to keep them apart.
00001160 is Player One.
000011D0 is Player Two.

00001160 = Name
Believe 10-12 characters is the max limit. 7 if you want to make it fit the number plate. Note: if you have 9-15 racers at once, their number plate will be blank.



00001170 = Car
This is the cars serial number. To load from the traffic folder, this value must be: FF FF FF FF.

00001174 = Car in your menu list and the traffics "serial number"
Where in the carlist does your car appear? Starts with 0. If your car is selectable in the menu, this value is not required to change. Traffic cars have the following values:
32 00 = Minivan
33 00 = Pickup
34 00 = Sedan 2
35 00 = Stationwagon
36 00 = Sedan 4
37 00 = Hatchback
38 00 = Bus
39 00 = 50's Truck
3A 00 = SUV
3B 00 = European Sedan
3C 00 = European Bus
3D 00 = European Semi
3E 00 = Semi
3F 00 = Snowplow
40 00 = Water Truck
F4 01 = Police Sedan
F5 01 = Police SUV
F6 01 = Police Hatchback
F7 01 = Police Caprice



0000117C = AI Type
This is a very important value to change. Players can't be AI controlled and AI's can't be playable.
Player values: 01=Racer, 09=Cop
AI values: 02=Racer, 04=Traffic, 08=Cop

00001188-0000118B = Primary Color
The color of the car: RGB + Transparency.

00001180 = Transmission (0=Manual, 1=Auto)
00001184 = Convertible Mode (0=Top up, 1=Top down)

000011CC = AI driver ID (Values: 00-47, 71 in total)
This is the AI driver ID, hair color, skin color and I think even their driving style. It's hard to observe their behaviour, but their looks will change however. An example is: 35 - Jammin (from the Career mode), he has cool green hair.  8)



That's all you need to know. I hope you'll get it to work and I bet you'll have more fun with NFS4 as I'm having.
If you want to help me out with this and providing research, you're more than welcome to do so. This post will be updated with additional information or discoveries.

Big thanks to Zalcus20 for finding additional addresses! Also big thanks for everyone that have tested and confirmed various values.

Have fun racing! :D

(http://i.imgur.com/dX6dbo5.png)
Title: Re: Using ghost files to customize a race [NFS4]
Post by: Zalcus20 on Oct 01, 2016, 10:03 AM
Wow! That was fast  :) Going to try it out now and let you know how it goes. Thanks again for sharing this  :)
Title: Re: Using ghost files to customize a race [NFS4]
Post by: noise on Oct 01, 2016, 11:09 AM
Great post, and fast indeed.Seeing all those numbers I almost get a headeache, but I will try it out.

What possibillities are there more with HEX editing?

-Changing carcolor opponent car? (I hate that poison green)
-Damage in singleplayer visible?
-More control of what opponent car is showing up?
Title: Re: Using ghost files to customize a race [NFS4]
Post by: DrSpeed on Oct 01, 2016, 12:20 PM
Quote from: noise
What possibillities are there more with HEX editing?
Setting the timer for Getaway and Time Trap should be possible. If I'm lucky I should be able to find start positions as well. And maybe hide the ghost car from the race. But time will tell, I'm still just a beginner with this kind of stuff.  ;)

Quote from: noise
-Changing carcolor opponent car? (I hate that poison green)
Yes, you can change the opponent colors quite easily, your color is at: 00001188-0000118B
I was racing against Bogey and he used the MHRT Commodore, that car don't have a color, so it's green. His offset is: 000011F8-000011FB (+70 after my color offset). The value for the color is: 00 FF 00 FF replace it with: 8C 8D 8C 7F - to give him the Bonus Camaro color. If you don't know the color code for a car, use Color Picker in Photoshop if you have it.

Quote from: noise
-Damage in singleplayer visible?
Car damage, I don't know. I've only managed to find stuff related to the race itself and not any gameplay settings. But it could be in there somewhere.

Quote from: noise
-More control of what opponent car is showing up?
Again yes, you can control what car the opponent drives. One can drive the McLaren and someone else can have the Corvette while you drive around in a BMW Z3. I even belive that you can drive the Knockout truck outside of Knockout (without viv editing), I should test that. But the only problem is to change all 7 opponents in the file, it gets tideous. But I think the result is worth it. I could list the values for all the cars if you want. It's the same as the serial number, but it's written in HEX so you'll need to convert it. Offsets:
00001170 - Player 1
00001170 + 70 = 000011E0 - Opponent 1 Car (aka Player 2)
000011E0 + 70 = 00001250 - Opponent 2 Car
...and so on...
Title: Re: Using ghost files to customize a race [NFS4]
Post by: Zalcus20 on Oct 01, 2016, 12:45 PM
I Just tried it out. This is so amazing!  =D The possibilities are limitless.

Does this mean I can edit a Hot Pursuit classic race to be one cop vs. a full-grid of perps, set the tickets to one each and chase them all down like Hot Pursuit mode in NFS3?!!!   ???
Title: Re: Using ghost files to customize a race [NFS4]
Post by: DrSpeed on Oct 01, 2016, 1:11 PM
I recently tested it with 2 extra speeders and it spawned those cars in front of the starting line, stacked on top of each other. They also needed to complete an extra lap. So I would say, yes, it's quite possible to do it.  8)
Title: Re: Using ghost files to customize a race [NFS4]
Post by: Zalcus20 on Oct 01, 2016, 1:53 PM
I just figured out how to do it. I was able to turn all ai cop cars into ai perps. I adjusted the laps and the tickets so that everything is set up right and...voila! It worked like a charm.  =D ^-^  I took a few in-game screenshots but I don't know how to use the Insert Image feature.

DrSpeed, you are the man  :) ;) :D
Title: Re: Using ghost files to customize a race [NFS4]
Post by: Zalcus20 on Oct 01, 2016, 2:06 PM
OK. I'll just post the screen as an attachment.  Also here is another showing 7 cop cars (instead of the default 5) by the Old Church on the hometown track.
Title: Re: Using ghost files to customize a race [NFS4]
Post by: WiLL on Oct 01, 2016, 3:52 PM
Damn... I'm missing, the old game.. like rite now!. But hey, I got real new tires on my front anyway, Hi Zalcus20 nice pics, did you mode them Siren lights,on top of the Porches csrs? They look Great. Budd  :D
Man you guys sure are Cool Hackers on here! Sounds tuff this Hex stuff thanks Dr.Speed for showing us it  8)
Title: Re: Using ghost files to customize a race [NFS4]
Post by: Zalcus20 on Oct 01, 2016, 4:06 PM
Hi Will.  :D

 The Porsche was already made that way. Didn't have to do anything, although I do agree it looks cool.  :)
It is quite complicated at first but once you learn how to understand hexadecimals it becomes very simple.

     You just made me wonder: If there is a way to create a user-friendly program in which the user could customize what he/she wants in the game in normal language and then the program will do the hard work and put it together like a batch file? Wonder if that's possible. Not too familiar with that level of programming.  :-\

It's really good to see that NFSHS is still being played by many  :) :) :) Thanks again DrSpeed. This has totally made my weekend  ^-^  8)
Title: Re: Using ghost files to customize a race [NFS4]
Post by: WiLL on Oct 01, 2016, 5:49 PM
Oh I see it came this,way the Cop cars np. Yes,it makes me think of JimD's Cool Simple T3Ed, Track View, Visibility text,program. I really love how that, made my Tracks more nicer!. So I bet Dr.Speed or someone,could make,it this way. Into a exe. Like an all they do. So that's my Rainy,night Comment,pal have a Good cheerful, Sunday. I'm staying Sober,  ::)  ^-^ an going to bed now. Yippy huh cya )
Title: Re: Using ghost files to customize a race [NFS4]
Post by: DrSpeed on Oct 02, 2016, 12:14 AM
If I had the skill to create a program that edited the gst file I would. It does get quite messy with the numbers sometimes.

Great pictures Zalcus, I dunno if I should feel sorry for Mulligan, haha.


- I tried to add a 9th police car, but he decided to spam the spikestrip button constantly for some reason.
- I also tried add computer drivers/cops in 2 players mode (Player 1 - Speeder and Player 2 - Cop). It worked like a charm, but Player 1 can only spectate other speeders and Player 2 can only spectate police officers in replay. Otherwise, the game crashes.
- And another thing I tested. The Knockout truck can be used in Hot Pursuit and it's quite hard to stop it. The player however... can't use it, the truck will be sunken into the ground. HEX value: 21 (Serial number 33).

Thank you guys for those kind words! :D
Title: Re: Using ghost files to customize a race [NFS4]
Post by: XJ220 on Oct 02, 2016, 8:07 AM
Wow. Very creative approach there!

Also, thanks for the quick post!

Though I'm wondering now where all the hard-coded counterparts are stored, e.g. foldernames. Inside the game's exe?
Title: Re: Using ghost files to customize a race [NFS4]
Post by: Zalcus20 on Oct 02, 2016, 8:24 AM
2 player mode sounds fun now.  I guess the only workaround for the cop control issue is to only have a person who wants to be the cop play as player 1 and the person who wants to be the perp play as player 2.

Also that part where the game crashes when you hex edit the user car to be a traffic vehicle. The reason it crashes is because the game is looking for a fedata file. The traffic cars' viv file do not contain a fedata file. You have to create a fedata file for the desired traffic vehicle and make sure the extension matches the language you play in your game (fedata.eng for english fedata.ger for german).

One more thing: you can have any number of laps besides 2,4, or 8. I haven't tested what the max number of laps are.

I'll try to post as much as I can find out with this special hex editing trick and try to help you out, DrSpeed. I'm starting to see why they call you Doctor lol  :)

 
Title: Re: Using ghost files to customize a race [NFS4]
Post by: Zalcus20 on Oct 02, 2016, 8:37 AM
@ XJ220 my guess is that they are hardcoded to the exe. Veg's patch edits the .exe and he was able to remove the poly limit so that could mean everything else that we're looking for is in the exe. :)

The ghost.gst file seems to externalize these parameters from the exe making it possible to edit it (like an .ini file) and then use it to change the functionality of the game.

I wonder how many more things about nfshs are waiting to be discovered.  :-\
Title: Re: Using ghost files to customize a race [NFS4]
Post by: DrSpeed on Oct 02, 2016, 9:08 AM
Quote from: XJ220
Though I'm wondering now where all the hard-coded counterparts are stored, e.g. foldernames. Inside the game's exe?
Had a quick look inside the nfshs.exe and found the following:
0018F8B7 - AI names (Single player, Police officers and Carrer mode)
00192B80 - Traffic folder names
001C1AA0 - Vidwalls
There's probably more interesting stuff in there.

One thing to point out with 2 player mode, the game doesn't create a gst file. What you have to do is to copy a piece of data from config.dat into a gst file.
Thanks for testing out the number of laps. What I wonder now it how the game stores the "Top 10 Times" for a 3 lap race (if it can write to RECORDS.DAT).

Thanks for helping out Zalcus!
Title: Re: Using ghost files to customize a race [NFS4]
Post by: Zalcus20 on Oct 02, 2016, 11:44 AM
          OK. I just figured out how to get the racers to show up correct on the starting line in a player cop vs. 8 opponent line up in Hot pursuit mode. I'll give you a step-by-step procedure.

         You will need the expansion pack 4.0 as this displays the pit menu options in the records tab of the race results screen. I have an updated version of the pit menu options that adds the ability to change the hot pursuit game modes from classic to getaway or time trap (see the attachment).

1. Launch NFS and start a single race with full-grid of opponents (NOTE: It has to be a SINGLE RACE or this
method will not work).

2. As soon as the announcer says GO! quit to race results and save the ghost file.

3.Go back to the Game Setup screen and click LOAD.

4.Load the Ghost you just saved.

5. As soon as the announcer says GO! quit to race results again.

6. From the race results screen, go to options --> Records --> Pit Options (Sometimes the game may crash which means you will have to start over. I know that's annoying).

7. You will see the option to switch from Single Player to Hot Pursuit, Knockout, or Tournament. Choose Hot
Pursuit (If you are using my Pit Options menu, make sure you set the Hot Pursuit mode to Classic as I have only
tested it with this).

8. Click Race Again.

9. As soon as the announcer says GO! quit, but this time quit to desktop.

10. Go to SaveData and find the ghost.gst file which recorded your last game played.

10. Use Dr. Speed's method to change your car into a cop car and make whatever changes you want to the other cars. Then move the .gst to the Saves folder inside of the SaveData folder. Don't forget to backup just in case!!!

11. Launch the game, Load the .gst you just edited and enjoy!

Hope this works for you. Here are some screens.


 
Title: Re: Using ghost files to customize a race [NFS4]
Post by: Zalcus20 on Oct 02, 2016, 1:52 PM
Oops  :( I forgot to mention that when editing the ghost file you have to edit the number of tickets and ticket quota for the game mode to function correctly. So if you are taking down 7 perps, you have to set your ticket quota (line 000010A4 ) to 7 and the number of tickets (line 000010A8) to 1 since each perp gets arrested on their first catch (just like nfs3).

Also typo in the earlier post: it's supposed to be 7 perps and 1 player cop, not 8 perps and 1 player cop. Sorry about that.  :D

EDIT: The PitOptions.mnu files goes into Data/Menus of your NFS folder. As always, make a backup just to be safe.  ^-^
Title: Re: Using ghost files to customize a race [NFS4]
Post by: XJ220 on Oct 03, 2016, 4:27 AM
This is quite fascinating. How did you figure out you have to quit the race twice? Sheer luck?
Title: Re: Using ghost files to customize a race [NFS4]
Post by: DrSpeed on Oct 03, 2016, 7:10 AM
@Zalcus20
That's a very creative way of fixing it. Thanks for sharing.

I've prepared a gst file with 16 cars activated. It's a Hot Pursuit race on Aquatica with 4 laps.
You're driving the Bonus Porsche against a La Niña. The police team have 8 different police cars and the road is also populated with 6 traffic vehicles.

I do hope it'll work, but if it doesn't, you can always open the file and compare the data that you have.
Have fun!  :police:
Title: Re: Using ghost files to customize a race [NFS4]
Post by: Zalcus20 on Oct 03, 2016, 9:20 AM
@XJ220: The reason why the race has to be quit a second time is so that NFS can save that race automatically as a .gst file. This makes it possible to edit the game by using DrSpeed's method.  ;)

@DrSpeed: Thanks for sharing your gst file but I'm using a customized list of cars via NFS MIXER. So I won't get the same cars that you have programmed (serial #49 in my list is not a cop car so the cop car in game will use whatever car #49 is i.e. Porsche Carrera GT). I'll still try it out though.  :D

     I've been playing around with this and I was able to activate all 16 cars, too. I was able to do 8 cops vs. 8 racers without traffic. It was pretty chaotic but way more fun that the default cop modes. At the end of the race I was shaking from the adrenaline. LOL  :D ;)

Title: Re: Using ghost files to customize a race [NFS4]
Post by: Zalcus20 on Oct 03, 2016, 10:52 AM
UPDATE: I found the location of Transmission and Convertible Option switches in .gst file.

00001180 = Transmission
 0=Manual 1=Auto

00001184 = Convertible Option
0=Top up 1=Top down

Now I'm trying to see if it's possible to correct the "sinking in the ground" effect that happens when you change the player car using the Hex editor. 
Title: Re: Using ghost files to customize a race [NFS4]
Post by: DrSpeed on Oct 03, 2016, 11:16 AM
Great findings, I've added them in the first post.  8)
Title: Re: Using ghost files to customize a race [NFS4]
Post by: Zalcus20 on Oct 03, 2016, 2:54 PM
OK. Good news and bad news.

Good news: I found the location that controls the player car's virtual size (shown by the shadow. see the attached screenshots) which can be used to fix the "sinking in the ground" problem.

000011B7-000011C3

The game reads it as a distance (in x,y,z) from the center of the car (measured in degrees?).

000011B8-000011BA = virtual size of car  from center horizontally or  x (How wide the virtual car is) 

000011BC-000011BE = virtual size of car from center vertically or y (this is what causes the "sinking in the ground" or "hovering above the ground" effects)

000011C0-000011C2 = virtual size of car from center lengthwise or z (How long the virtual car is)

NOTE: The values below are to be left untouched. They tell the game where the x values begin/end, where the y values begin/end and where the z values begin/end.  If you change these values, expect insane results in-game (and by insane I don't mean cool).

000011B7 = X (always set to hexadecimal 3F)

000011BB = Y (always set to hexadecimal 3F)

000011BF = Z (always set to hexadecimal 3F)

000011C3: Additionally this is always set to hexadecimal 40.

Bad news: if you change your car for another one (via hex editing the .gst file) and you find that it is sinking in the ground (or hovering above it) it will be very complicated to center that car on the road.  The only workaround I found so far is to copy the data of a player car from line 00001170 and lines 000011B7-000011C3 of another .gst file that contains the car you want to drive, and replace the same lines in the data of the .gst file you are using.  Additionally, you can copy the data from the AI racers in the same or another .gst file and replace your data. That work's fine, too.  Just remember to change line 0000117C (defines AI type) from 02 (AI racer) to 01 (Player racer)(or 09 if you are in Hot Pursuit and want to be the cop). The game WILL crash if this isn't done.

Just on a sidenote if you copy all the data from lines  00001170-000011C3 you will retain the transmission used, the convertible option, and the car's color. 

Hope this helps.  :) ;) :)
Title: Re: Using ghost files to customize a race [NFS4]
Post by: Zalcus20 on Oct 03, 2016, 3:06 PM
Note how big the shadow is (I highlighted the shadow in green). This determines the actual size of the car in-game. If you were to crash the car into an object head-on you would notice the contact point would be a little after where the shadow starts but no where near the front bumper (where it is supposed to make contact).
Title: Re: Using ghost files to customize a race [NFS4]
Post by: WiLL on Oct 03, 2016, 3:09 PM
Really, is that all it is, Budd, in the Exe?  :D  8) How do you edit the Exe open it up?.
I been busy pre-paring for Fall weather on my place. People are so,,nice to me, were I Live,, / u know.
Wished, thanks for Lmk this Zalcus
Edit: what shadows,? I want Stay above Ground... Kwim here.  ;)
Title: Re: Using ghost files to customize a race [NFS4]
Post by: Zalcus20 on Oct 03, 2016, 3:20 PM
You can open the exe with a hex editing program. DrSpeed and myself use HxDen. That's the easy part. The hard part is finding where the data we want to find is stored as it is in coded language.

Be advised that these modifications here are made to the .gst file, not the exe. I did not touch the exe at all.  8)
Title: Re: Using ghost files to customize a race [NFS4]
Post by: Zalcus20 on Oct 03, 2016, 3:32 PM
OK. I think I'll call it a day now. I'll do more experiments later.  ;)
Title: Re: Using ghost files to customize a race [NFS4]
Post by: Remko on Oct 04, 2016, 4:18 PM
I have to say this is pretty intriguing, much respect for figuring this all out (even if it sometimes goes a bit over my head - I couldn't hex edit if my life depended on it) Thanks for sharing all your findings. :)
Title: Re: Using ghost files to customize a race [NFS4]
Post by: Zalcus20 on Oct 04, 2016, 6:01 PM
@Remko:       It's not as complicated as it appears, trust me.  ;)
             
                  I believe the thing about hex editing that intimidates people ( it intimidated me when I was first learning about hex editing) is the hexadecimal system which uses numbers and letters instead of just numbers.  Basic Hex editing is simply just taking a number in a file that represents a certain code and changing it to another number which represents another code. It's just done in another "language". Hexadecimal language.  :)

Google taught me everything I know about basic hex editing. If one can take the time to learn, it is quite simple to master.  =D

Title: Re: Using ghost files to customize a race [NFS4]
Post by: dandresden on Oct 04, 2016, 9:27 PM
Nice info....(but im stuck at HEX)
Go ahead for further info, Zalcus.
Title: Re: Using ghost files to customize a race [NFS4]
Post by: Zalcus20 on Oct 06, 2016, 11:53 AM
 Hi  ;)
 I haven't been able to do anymore testing (busy with other stuff).

   @VEG: If you see this message, can you let me know if it is possible to implement these codes in your modern patch as a user-friendly interface so that it can be easier to use by all HS users? Please?  :)  :) :)
Title: Re: Using ghost files to customize a race [NFS4]
Post by: XJ220 on Oct 06, 2016, 12:07 PM
That would be too awesome. I'd donate more just for such options.
Title: Re: Using ghost files to customize a race [NFS4]
Post by: FranknFurter on Oct 06, 2016, 12:08 PM
 ... hah, that's obsolutely my and Nils' thoughts if maybe Evgeny could implement your code lines into the Modern Patch! GO ON!
There's something happening concerning NFSHS here and right now, I can almost feel it.
That's the way also LINUX came on its way, if anyone can remember those days ..

Guys, keep it on like that, you'll have our support, even if things don't work out for the moment, someone within the community MIGHT have a solution ..

Greetings to all HEX tinklers!
Frank, and as I might assume, Nils, too!

P.S.: if you are overwhelmed for the moment, send us the source codes for subordinate tasks for searching certain entries...
That's e.g. how the SETI project is being done, outsourcing capacities ... 
Title: Re: Using ghost files to customize a race [NFS4]
Post by: DrSpeed on Oct 06, 2016, 12:19 PM
That would be sweet, if it's not too complex to make it of course.
Anyway, found the starting positions. It turns out, it's quite finicky to change it. This will also work for Hot Pursuit, so you don't have to use the trick Zalcus20 wrote down.

00001860 (+4 for the next player)

In the base game, the value for first place is 07. For Player 1, this value is always 00, which means you'll always start last. But if you have 15 racers at the same time, you're gonna have to change the numbers for those extra drivers. Otherwise everyone will spawn at the same place as you, and that will cause the game to build a tower of cars. Police and traffic seems to ignore this address.

00001880 = 08
00001884 = 09
...
00001898 = 0E


Note how I didn't add 0F on the address 0000189C. That's because the game doesn't know where to put the 16th car and will crash on the loading screen. So 15 racers at once is the limit. Also something that I need to add, when you return to the Race Results screen, the game doesn't have proper text for: 13th, 14th and 15th.

Now we need to tell the game how many AI drivers that's going to be participate in the race. This address is at 00001150. We're 15 drivers in total (-1 because humans doesn't count here), which means it's going to be 14 (0E).

I did say it's quite finicky. If this value is too low, the cars will spawn at the starting line, forced to do an extra lap. If it's too high, the game will crash after you do 1 lap.

00001150 = Number of AI Drivers
00001154 = Number of AI Cops (Dunno if this actually change anything)
00001158 = Number of AI Traffic (Same thing here, maybe it helps the game to spawn them correctly?)

Something else I encountered, I manage to move the entire starting grid. So everyone started at the forest area in Celtic Ruins (around half a lap forward). I have no idea how I did it and didn't get a picture of it unfortunately.  :o
Title: Re: Using ghost files to customize a race [NFS4]
Post by: FranknFurter on Oct 06, 2016, 12:31 PM
.. fascinating development .... as I said, participate the community if necessary for subordinate tasks which you might have to outsource, searching for entries and that stuff.

And... keep going, the big crush on the NFS source code will happen, right here and now! With your and Evgenies ingenuitiy!

Greetings
Frank
Title: Re: Using ghost files to customize a race [NFS4]
Post by: Zalcus20 on Oct 06, 2016, 12:34 PM
@DrSpeed: Glad you were able to find the info for the starting lines. I was getting tired of doing my trick over and over again.  :) Much thanks.  ^-^

Yeah. I can feel it, too. I can see it now: the dawn of the NFS Revolution. GO FOR IT!!!  :D
Title: Re: Using ghost files to customize a race [NFS4]
Post by: AJ_Lethal on Oct 06, 2016, 12:43 PM
Any chance to implement this as ASI scripts?
Title: Re: Using ghost files to customize a race [NFS4]
Post by: FranknFurter on Oct 06, 2016, 1:21 PM
ASI? Do you mean ASCII scripts? That's what I might be able to understand .. quite a bit .. LOL
Title: Re: Using ghost files to customize a race [NFS4]
Post by: VEG on Oct 07, 2016, 2:26 AM
http://veg.by/z/2016-03-28-19-35-13-c3199b98.jpg

I had done similar things for the NFS3 by patching its exe file. 12 opponents =)
But it was just an experiment, I'm not planning to include this thing in the patch because it is far from release quality. There are many small things that have to be fixed and extended for adding such features. So, maybe sometimes in the future... but not now.
Title: Re: Using ghost files to customize a race [NFS4]
Post by: Zalcus20 on Oct 07, 2016, 8:21 AM
Hi Veg.  :D
Thanks for replying. I really appreciate you're modernizing this awesome game that's still being played by many after 2 decades!!!
  I want thank you for your continued effort in improving this game. That's ok if these codes cannot be done now. This gives us some hope for the future. At least we know now it's totally possible to implement these codes. ^-^

 In the meantime, maybe there is someone who could make a standalone user-friendly interface that could be used to manipulate these codes without the need for raw hex editing (like how NFSStrings and NFSMixer are made?). If I could figure out a way to do this I would try it out.

Thanks again Veg!  :) :) :)
Title: Re: Using ghost files to customize a race [NFS4]
Post by: DrSpeed on Oct 07, 2016, 11:09 AM
That's very cool VEG, I do hope that'll be a fully functional feature someday. Did a quick test with Cheat Engine and managed to achieve a somewhat similar result.

Which reminds me, I've done a Cheat Engine Table for NFS3 that does pretty much the same thing that I've done here (Cheat Engine doesn't work with NFS4 that well). I've also set it up so it's using regular numbers instead of HEX.
I'll create a topic about it when I've added enough stuff.  :)
Title: Re: Using ghost files to customize a race [NFS4]
Post by: FranknFurter on Oct 12, 2016, 11:42 PM
Guys, if you manage to, is there a chance to race in 'teams' then one day? Such as already the cops do in Hot Pursuit? Don't know if the Cops there are really considered as being a 'team', but just wondering ...

Having maybe two or three teams with several customizable team members? Think that would also be great fun in multiplayer. Collecting points like in a tournament (Think of for example the Formula One Championship) and then calculating who is the winning team.

Greetings
Frank
Title: Re: Using ghost files to customize a race [NFS4]
Post by: DrSpeed on Oct 13, 2016, 1:53 AM
Don't think it's possible to have a team race. The closest is to make a Le Mans type of race with different classes (AAA vs AA and so on).
Title: Re: Using ghost files to customize a race [NFS4]
Post by: FranknFurter on Oct 13, 2016, 5:08 AM
O..ok so would that also work in a whatever customized Pursuit mode? Like two cars in ONE Team against the cops? I am asking that because of my 'Smokey and the Bandit' setup.

As I understood it, a 'customized' Pursuit allows to have several different Police cars since they are simply different opponents.
What if, as you said, maybe the cops (thus being in one 'team') would 'race' against another team of several players/racers? Would that be possible?

I would have liked 'Snowman' (the Semi-truck :o) as well as 'Bandit' not to be 'treated' or start as opponents (against each other) rather than them being in ONE team like the cops are.

Or, like NFS' gameplay lets assume you, will different racers always be 'opponents' if they are NOT cops?
Just reminding of the possibility e.g. to call for support by other cops (if you are playing as a cop) and so on...
Title: Re: Using ghost files to customize a race [NFS4]
Post by: DrSpeed on Oct 13, 2016, 12:38 PM
Yes, that would work. A Smokey and the Bandit style race would be: you have Bandit and Snowman as the speeders. The police team would be Sheriff Buford with 7 other police cars (who all can have any police car in the game). And the remaining 6 can be regular traffic cars.

Speeders in Hot Pursuit mode are always pitted against each other.
Title: Re: Using ghost files to customize a race [NFS4]
Post by: Zalcus20 on Oct 13, 2016, 8:03 PM
Don't worry guys. I didn't abandon this project. I'm still here. ;)  I found a few more Offsets that can change the game mode (single race, hot pursuit etc.).

I'll post these offsets soon. In the meantime, I'm trying to find that Getaway/Time Trap timer in the .gst file. If I can locate it (if it's actually stored in the .gst file) I will post all my findings immediately.  I really hope the .gst file gives the user the ability to edit the timer  :-\ :)
Title: Re: Using ghost files to customize a race [NFS4]
Post by: FranknFurter on Oct 13, 2016, 10:03 PM
@DrSpeed: That sounds great, but would Bandit and the Snowman nevertheless still be opponents instead of making a team like the cops do? That is what I wonder about. The general aim is to bring Snowman 'home' (after several rounds) without him being arrested, even trying not to let the cops ticketing/stopping him. Normally YOU win a race when the other opponent(s) are all being arrested finally, but this would mean failure in this particulare case.

All I can deliver so far is the cars for this game setup, sry, I'm not into HExediting. Btw now this game setup could even be refined a bit since Evgenys patch allows all this.
I HAD Sally already sitting next to Mr. Reynolds that time, but the female co-driver simply was to high-poly then for starting in Pursuit mode. (displaying those female curves is very uhm .. 'poly heavy' ;)

Now even Smokey's car could become a realistic one since I simply put him in that 'old red Ford' ('83LT), in the movie he had a 1977 Pontiac Lemans as it can be found on several GTA4 sites, poly-heavy, of course. No problem for me to convert those to NFS, did that already, but ...

(http://bangshift.com/wp-content/uploads/2013/04/pontiac.jpg)

Ok I could ask NJ (since he loves creating 'proper' damage =D) to produce a damage model of it ... in it's final state :o
Nice task .. or a challenge, isn't it Nils? Btw. the truck can deliver hundreds of beer crates .. =D
'.. eastbound and down, load it up and truck it ...'

(https://s-media-cache-ak0.pinimg.com/564x/70/60/4d/70604d5d397ef1ab192be65c24ad3af9.jpg)

Greetings
Frank

Title: Re: Using ghost files to customize a race [NFS4]
Post by: XJ220 on Oct 14, 2016, 7:47 AM
You could probably put the Tomb Raider I Lara in there to save polygons ^^

@ Zalcus20 / DrSpeed: What I am wondering - how do you find specific addresses? Do you change randomly/systematically and see what happens or do you scan for certain numbers or something completely else? Perhaps by comparing different Ghost files where you know the setup and look for differences?
Title: Re: Using ghost files to customize a race [NFS4]
Post by: Zalcus20 on Oct 14, 2016, 8:40 AM
@XJ220: I usually compare two or more ghost files depending on what I am trying to find when locating the appropiate offset (pretty much trial and error).

The easiest way to find a specific offset is to hit ctrl+g in Hxden and type it in. The program will automatically put your cursor on that line so you can change the value of that code. To find it manually for example, if you want to get to offset 00001152, in HxDen you have to look for the line on the left side that reads 00001150. Then look at the numbers at the top and look for 2. The area where 00001150 and 2 meet is where you'll find the actual code to edit. Hope this helps. I'll see If I can post some screens showing this.  :)
Title: Re: Using ghost files to customize a race [NFS4]
Post by: DrSpeed on Oct 14, 2016, 12:20 PM
@FranknFurter
No, it's not possible to do that. The closest is to change the number of tickets to 1. So when Snowman gets arrested, Bandit doesn't fail until he's arrested too, there's no other way on doing it.

@XJ220
Pretty much what Zalcus said, comparing multiple files is the way I do it. I'm also using Cheat Engine to see the values change while I play the game. Then I compare the offsets I get in Cheat Engine and hopefully can replicate the same result by editing the gst files. And like I said earlier, using Cheat Engine to force change the values crashes the game most of the time (unlike in NFS3).  8)
Title: Re: Using ghost files to customize a race [NFS4]
Post by: FranknFurter on Oct 14, 2016, 12:53 PM
@DrSpeed
Nevermind - it is pretty awesome that you care about those issues, thanks alot for your efforts or thoughts!
Apprechiating you guys' work alot!

Greetings
Frank
Title: Re: Using ghost files to customize a race [NFS4]
Post by: FranknFurter on Oct 16, 2016, 12:31 AM
@DrSpeed: Started to wonder about some things:
Quote
Yes, that would work. A Smokey and the Bandit style race would be: you have Bandit and Snowman as the speeders. The police team would be Sheriff Buford with 7 other police cars (who all can have any police car in the game)
Ok so far, but how would a race like that look like in general? Do all the cars start at the same point (the cops, too?) like in 'race' mode or is it possible to have a 'pursuit' mode race starting with two speeders plus those additional cops? And are they so far spread along the track like normally then in pursuit mode? Asking because if you manage to add two or three cops, where or how would they be placed?

Silly questions maybe, but still trying to understand those new possibilities ...

And, additionally .... would it finally be possible to have 'open' or 'non-circular' tracks since the cars behave somewhat strange when you simply 'cut off' the last block of a track (Did that accidentially once ::)). This happens, as I assume, that when in a whatsoever race the cars try to go into the next lap and cannot find a proper AI driving line, like on some other tracks where blocks were being cut and pasted in sometimes.

This -perhaps- wouldn't happen if it were possible to have a 'only ONE round' option? So, starting the race, running the track and at the finish line the race is allover, but after only a single 'round'?
Perhaps that would also allow 'drag strip' races in the future? For those who like that .. ;)

Greetings
Frank
Title: Re: Using ghost files to customize a race [NFS4]
Post by: Zalcus20 on Oct 16, 2016, 12:40 PM
Hi.  ;) It seems I can find everything else besides the Getaway and Time Trap timers. I’m beginning to think this data is not stored in the .gst file. However, here is some more helpful info I have found:

Offset 00000FF0 = Game Mode 
00=Single Race 01=Tournament 02=Knockout 03=Hot Pursuit

Offset 0000109C = Hot Pursuit Mode
00=Classic 01=Getaway 02=Time Trap

Offset 00001098 = Opponent Skill
00=Amateur 01=Pro 02=Champion

Offsets 00000FEC-00000FEE = Location, Startpoint in HP Getaway Mode (only applies if you are playing as a racer).

Additionally, there is a rather interesting way to “hide the ghost car”. There is no offset in the file that you change to do this. Rather, the game reads the extension of the file to determine if there should be a ghost car or not. Since the file’s extension is .gst, the game is automatically going to create a ghost car. Now, to hide the ghost, just change the extension .gst to .kot (Knockout file) or .trn (Tournament file). This will keep the game from causing a ghost car to appear. Just remember when loading the file in-game, to look under Knockouts or Tournaments folder, NOT Ghosts for the file you just changed. The cool thing about doing this is that it enables customizing you car should you quit the game to race results.  =D =D =D

@FranknFurter: Regarding the extra cops, they will be scattered out all over the track (just tested it out).  :D
 Regarding the point-to-point tracks, I remember downloading a track from JPRacing that was a drag strip (name was Power Park?) and as long as you set 2 laps you would be able to finish the race without having to go around the track. That's all I know for now  ;) :)

EDIT: I can't believe I forgot to explain how to set the Getaway Startpoint.  :-\  It's Three numbers each representing an axis (X,Y,Z). Minimum for each number is 0 and the Maximum for each number is 255 (hexadecimal FF). So setting these axes to any of the numbers between 0 and 255 will give you custom starting position in getaway mode as a racer. This wouldn't work if you are playing as a cop since you will always begin at the default starting line of the track.  :)
Title: Re: Using ghost files to customize a race [NFS4]
Post by: Zalcus20 on Oct 16, 2016, 2:03 PM
I finished creating a cheat table that contains all the code that DrSpeed and myself have found for NFSHS. I have called this, GST Editor. You will need to download and install Cheat Engine 6.6 in order to use it. The beautiful feature of this program is that you won't need to use hexadecimals or search for an offset to edit the codes. Here's how to use.

1.Open the GST Editor table.
2.Open the Ghost file you want to edit by clicking File-->Open File
3.You will get a prompt asking to 'keep the current address list/code list?' click Yes.
4.In the box on the bottom screen, you will see all the editable code that me/DrSpeed have found. Make your needed changes.
5.When you are done, there is no need to save anything. Just close the program and make sure your edited file is in the Savedata/Saves folder of your NFSHS directory.

***As always, make a backup of your file before editing, just in case the game crashes and you can't trace what went wrong.  :)

My vision of this is to help other users of NFSHS to enjoy as much customization as possible until hopefully, someone can create a true program that does a better job of customizing these parameters; or even better, one day VEG or another genius programmer can incorporate this in a future patch release of this amazing game. :) :) :)
Title: Re: Using ghost files to customize a race [NFS4]
Post by: DrSpeed on Oct 16, 2016, 3:25 PM
Thanks for finding those addresses, I've added them in the first post. Since the timer changes depends on the settings on class/laps, it should be stored in the file somewhere (or not, I could be wrong).

Never thought of changing the file extension. I always thought it would confuse the game and crash like crazy.

Too bad 00000FEC doesn't work with police cars, starting randomly around the track like the AI does would be cool. Maybe this address is how I managed to move the entire starting grid at one point.  :o

Great idea on creating a Cheat Engine Table. Clearly, your skill in using the program is superior to mine, great work! I'll link your post in my first post as well.  8)
Title: Re: Using ghost files to customize a race [NFS4]
Post by: Zalcus20 on Oct 16, 2016, 4:04 PM
Thanks. :D The info I posted earlier on changing the extension does indeed make the ghost disappear, but the game seems to reset the other offsets (# of perps, # of cops) that were changed to default (doesn't crash though). So it's rather useless (which is why I crossed out that piece of info). Should've stuck to my rule of testing three times before posting, heh heh heh. :)

The Gst Editor Cheat Table is still a work in progress but it should be able to get the job done without the hassle of hex editing.

I'll keep looking for the timer and I'll try to find a more effective way to hide the ghost (if there is another way). In the meantime, I'm going to take a break and actually play the game now.  =D

Title: Re: Using ghost files to customize a race [NFS4]
Post by: FranknFurter on Oct 16, 2016, 8:36 PM
@Zalcus20:
Quote
Regarding the extra cops, they will be scattered out all over the track (just tested it out).
That's an amazing fact, thanks for finding this out! =D =D =D
Quote
Regarding the point-to-point tracks, I remember downloading a track from JPRacing that was a drag strip (name was Power Park?) and as long as you set 2 laps you would be able to finish the race without having to go around the track. That's all I know for now
NJ already mentioned that particular track and this fact in my other thread. So it might more or less depend on how the track itself is done to work properly and no HEX editing is probably required to do that. But thanks for finding out -again- ^-^
Never had that track, so I cannot compare/investigate on how it's done :(
Quote
I'm going to take a break and actually play the game now
Yeah, get yourselfs a little rest, this helps from time to time ... Good thing is, that's exactly what our favourite game can be used for, a little recreation and relaxing as well as nice entertainment =D =D =D

On the contrary, either if you are tinkering with tracks, a car's characteristics or other stuff the game often manages to distract you from continuing work and you cannot resist finishing a lap or two .. ;)
Title: Re: Using ghost files to customize a race [NFS4]
Post by: Zalcus20 on Oct 17, 2016, 4:34 PM
@FranknFurter: It's true. Hex editing has nothing to do with how the track is done.  :) I suddenly remembered opening the Power Park track in T3ED a couple years back and noticed that the author was somehow able to stretch the vertices of block 0 (which is the start and finish line) and create two more block zeros further down the track. Then he assigned the block that the block zeros were connected to as 'neighbors'. Normally doing something like that could crash the game but the way the author did it was skillful and kept it from happening. I was able to replicate that on a test track I was making some time ago, but the laptop I had then crashed beyond repair and I lost everything.  :-[  I guess that's the next project I'll work on when I'm done with this "Ghost Project"  ^-^ =D
Title: Re: Using ghost files to customize a race [NFS4]
Post by: FranknFurter on Oct 17, 2016, 9:07 PM
but the laptop I had then crashed beyond repair and I lost everything
sounds like FUBAR .. sort of .. >:(
Quote
I guess that's the next project I'll work on when I'm done with this "Ghost Project"
Presumed this WILL ever end ..  ^-^

Well, JP Racing doesn't exist anymore ...
Is that particular track somewhere still available? Guess I have to have a look into it ..
Title: Re: Using ghost files to customize a race [NFS4]
Post by: FranknFurter on Oct 19, 2016, 6:07 AM
Folks, here's one odd fact I forgot to mention still concerning (perhaps) ghost files (or partly) ..

I have made some cars without a class using the Knockout truck's FEDATA files, I pasted them into the concerning car and edited the new FEDATA files with all the entries of that car.

What happens then is, that when I start a race or classic pursuit opponent(s) will also be chosen by random classes. NFS keeps this 'setting' (opponents = 'none', but with the previous chosen number of opponents) until a restart of NFS. This means, while still in the recent session I can choose another car, independent of what class, let's say 'AA', but NFS will still start a new race with opponent(s) of random class(es). So I manage to race perhaps a class 'AA' against randomly chosen opponents of all classes (B, A, AA, or AAA), and all mixed, of course.

This also interesting with Police cars since there will always be randomly chosen speeders of whatever class. (3rd & 4th pic) .. makes also sense since cops also never know what speeders there might be on the road today .. ^-^
Pic 4: 'Classless' Cop car, two speeders of different classes (here: 'A' and 'B' .. the Miata)

As said, NFS keeps this setting during the recent session or until you marker 'opponents', this forces you to choose either a class or particular opponent type of car (Same in NFSWizard, if you marker the class entry of the knockout truck you are now forced to choose a class - 'irreversible' option). As soon as you exit the game and restart, opponents then will be chosen of your last car's class you had driven.
(Or you recently choose a 'classless' car before exiting, then the 'setting' will be kept..)

Btw is there another way perhaps to edit FEDATA files except from NFSWizard (I mean without HEX editing ..)? This procedure of pasting all the entries into the transferred FEDATA from knockout truck is somewhat annoying..

Greetings
Frank

Attch: knockout truck's 'classless' 'irreversible option', 'no' opponents showing in menu ('all classes')
Title: Re: Using ghost files to customize a race [NFS4]
Post by: MADMAN_nfs on Oct 19, 2016, 9:14 AM
Cop cars without a class? Thats a good idea! Definitely will introduce that with my archive. Thanks for the hint.
Should be possible to delete the class via Hex editor.
Try to set value "FF" at positions 0382, 0383, 0384, 0385 of the Fedata file.

Seems to work for me, although i see a text instead of the class: "Keine Spiele verfügbar" (engl. "No games available")
Not sure where it reads this from. But game doesn't crash and opponents are randomized.

Greetings

edit: just saw in your screens that you got the same issue with the text ^^
Title: Re: Using ghost files to customize a race [NFS4]
Post by: FranknFurter on Oct 19, 2016, 9:39 AM
.. look it up in the text files (NFS\Data\Text\txt.ENG and so on) with NFSTexter ('NFS IV string editor'), you'll find any language specific text entries there. It also provides a search function (right click -> find)
Changed some with mine, too like: Instead of 'time over .. you've gotten away' (or whatever it is saying in English) to (in German): 'Nochmal davongekommen! Schwein gehabt!' or so ... real funny .. =D
Title: Re: Using ghost files to customize a race [NFS4]
Post by: MADMAN_nfs on Oct 19, 2016, 9:46 AM
Probably possible to delete (replace with spaces) that entry with the Texter. Or rename to "Pursuit" i guess.
The message seems to be important for multiplayer tho...or maybe not since everything works via IPLounge now...?
Title: Re: Using ghost files to customize a race [NFS4]
Post by: FranknFurter on Oct 19, 2016, 9:53 AM
The Texter just handles the txt. language files in the \Text folder, but I haven't tried out yet, good idea. I'll export the FEDATA and give it a try ... ^-^
Title: Re: Using ghost files to customize a race [NFS4]
Post by: FranknFurter on Oct 19, 2016, 9:58 AM
.. nope, doesn't work, even renamig the FEDATA files to txt.ENG or .GER. (see pic)

Ohh .. I see .. you were speaking of sth. completely different =D ... but the idea that evolved from that mistake was not too bad, could have worked ^-^
Title: Re: Using ghost files to customize a race [NFS4]
Post by: FranknFurter on Oct 19, 2016, 10:13 AM
.. btw: another advantage of a 'classless' car (as a racer) is that even if it is a 'B' or 'A' level car it will also be chased by the 'auxiliary' cop car or whatever those are called (Serial# 12,20,32 & 36)

.. damn I love those old cop cars .. 'the ripe stuff..'
Title: Re: Using ghost files to customize a race [NFS4]
Post by: Remko on Oct 19, 2016, 1:31 PM
Well, JP Racing doesn't exist anymore ...
Is that particular track somewhere still available? Guess I have to have a look into it ..

https://dl.dropboxusercontent.com/u/7403091/jpracingpowerpark.zip

(http://i23.photobucket.com/albums/b361/RemkoVR/smilies/floet3.gif)

Title: Re: Using ghost files to customize a race [NFS4]
Post by: FranknFurter on Oct 19, 2016, 9:31 PM
thanks Remko .. ;) .. will have a look ..
Title: Re: Using ghost files to customize a race [NFS4]
Post by: DrSpeed on Oct 21, 2016, 8:55 AM
Been trying to get through the rest of the addresses between: 00001160-000011CF and made some progress. Pretty useless stuff honestly, but could be useful for some people.  :)

00001178 - Seems to be the upgrade level of your car (doesn't work outside of Career mode so I can't confirm yet).

0000118C = How will the driver turn the steering wheel? Affects tires as well. (0=Instant, 1=Smooth)

00001198 = Brake pedal mode (0=Brake, 1=Reverse)

000011C8 - I believe this is the "player number" it goes +1 for every player so I assume that's what it is.

000011CC - This is the driver ID for the AI (will not work for players). It will only change the skin and hair color (it's also possible that this address also sets the name, color and convertible mode for one specific AI, but I can't check that).
00 = Ace
15 = Muligan
2A = 1-2Beat
35 = Jammin (Green hair)  8)
47 = EOL (Max value)

I tested to delete all the addresses after 000018A8 and below. That made the ghost car appear at the starting line, half sunken into the ground and facing north. Still loads the race just fine.
Title: Re: Using ghost files to customize a race [NFS4]
Post by: FranknFurter on Oct 21, 2016, 9:25 AM
@DrSpeed:
Quote
0000118C = How will the driver turn the steering wheel? Affects tires as well. (0=Instant, 1=Smooth)

That particular fact sounds interesting somehow, does it also affect the driving behaviour or just the graphics? 'Smooth' could look a bit more realistic?
Asking since in Justin Martin's 'Carp Tutorial' a similar entry was described of which he assumed that it affects the Steering Wheel's behaviour as well as the Tires' deflection, but he didn't investigate that issue further I think.
Thanks for finding this out .. again .. ^-^

Greetings
Frank
Title: Re: Using ghost files to customize a race [NFS4]
Post by: DrSpeed on Oct 21, 2016, 12:10 PM
Default value is already at 1. 0 makes the turning animation skip to the last frame. I tested it with the La Niña and felt like I made much sharper turns with it.
Title: Re: Using ghost files to customize a race [NFS4]
Post by: MADMAN_nfs on Oct 21, 2016, 12:22 PM
Guess 0000118C is the switch for analog and digital steering. If you use the keyboard for steering, the game slowly turns the wheels of the car (smooth). If an analog controller (Joystick, Gamepad or Steering Wheel) is detected, the game will directly transform your input. The resulting ingame movement still seems smooth, because of the gradual motion of analog controllers.
But if you switch from analog controllers to keyboard ingame, the wheels will only change between the two positions: full lock and center position (also a warning message will state, that this isn't recommended)
Title: Re: Using ghost files to customize a race [NFS4]
Post by: DrSpeed on Oct 21, 2016, 12:35 PM
That makes more sense, thanks for the information.
Title: Re: Using ghost files to customize a race [NFS4]
Post by: Zalcus20 on Oct 23, 2016, 4:50 PM
@DrSpeed and FranknFurter: Nice to see these interesting discoveries. Thank you for sharing!  :)


       I created another version of the GST Editor cheat table.  This one includes a few updates as well as a readme (please read it) to help users understand how to use the program. Apologies that I didn't include one before. Please let me know what you think.  :D I still haven't found the Getaway/Time Trap timer.  :-\ Oh well, hope you find GST Editor 2.0 helpful.  ;) ;) ;)
Title: Re: Using ghost files to customize a race [NFS4]
Post by: Zalcus20 on Nov 01, 2016, 7:53 PM
Hi. ;) I found some more useful offsets for the ghost file. I have uploaded GST Editor 2.5 which includes these offsets and a few updates.  Also after conducting several tests, I found that changing the getaway/time trap mode timer via the ghost file is not possible. The times are preset and are most likely hardcoded to the executable and only by setting the number of laps in Time Trap mode can the amount of time be changed. I did find an offset (000010E4) that I suspected to be the timer when viewing three Time Trap ghost files side by side in hxden. Being that it was 4 bytes from the Lap offset (000010E8) I immediately concluded that this had to be the timer. However, when I tested it each time in the game, changing the value did absolutely nothing! :( Which leaves the mystery: what does changing the value 000010E4 do? Anyway, here are the helpful offsets that will enhance your gameplay with ghost files.

Ever wanted to have a customized two player game? Now it’s possible. 
00000FE8 = Arcade Mode 
0=Single Player  1=Two Player

00001148 and 00001144 = Number of Players (Human) 
1=One human player 2=Two human players

Missed using cheat codes when using this ghost file method? Well now they’re back with a vengeance. :P
0000112C-00001130 = Cheat Code
00 00 00 00 = No Cheats
01 00 00 00 = GOFAST
02 00 00 00 - 02 00 00 0F = TR00-TR15
08 00 00 00 = MOON
10 00 00 00 = MADLAND
20 00 00 00 = SKYVIEW
40 00 00 00 = OUTMYWAY
80 00 00 00 = RESETYA

To get two or more cheat codes activated you add the values of the cheat codes together. Example: If you want to use OUTMYWAY and RESETYA, add the values for OUTMYWAY (Hex number 40) and RESETYA (Hex number 80) together which will be equal to Hex number C0. The game will recognize this number as the two cheat codes together and will load it as such. My updated version of Ghost Editor which is now 2.5 has the numbers in decimals, so it will be easier to add the codes together.

Driving Assists (I wish the Best Line was kept for NFSHS. I liked knocking the cones off the road. Oh, well).

000010B0 and 000010C4 = Braking 
0=OFF 1=ON

000010B4 and 000010C8 = Collision Recovery
0=OFF 1=ON

000010B8 and 000010CC = Traction
0=OFF 1=ON

000010BC = Damage
0=ON
1=Visual Only/Physics off
2=Physics Only/Visual Off 3=OFF

000010C0 and 000011D4 = Pursuit
0=OFF  1=ON

I think this completes the ghost file project as I cannot find or think of anything else to look for. Now comes that question: WHAT NEXT? :D ;) :)
Title: Re: Using ghost files to customize a race [NFS4]
Post by: DrSpeed on Nov 02, 2016, 6:11 AM
Great job finding all those! Gonna have some fun with the cheats now. I'm going to rewrite the first post to make it easier to see for the human eye. Lots of numbers to keep track on.  ::) Any suggestions?

I guess the next thing would be if it's possible to make a specific police AI to patrol instead of standing still. Had a reading some time ago it's caused by broken patrol points? Anyway, this could be another hardcoded thing.

This honestly has expanded the possibilities with NFS4. I've been having more fun with this game than ever before and I'm glad I shared this with you all. I'll still be here to explore and experiment and will hopefully find even more stuff. I'll make a topic on how to customize a race in NFS3 when it's ready.  8)
Title: Re: Using ghost files to customize a race [NFS4]
Post by: Zalcus20 on Nov 05, 2016, 10:48 AM
Not sure what to do about making it easier on eyes. Was never good with organizing  :P
That info about broken patrol points...that's quite intriguing. I honestly liked that effect where the Ai cops pull to the side of the road and stand. Makes it realistic like if they have a radar gun scanning your speed or something. I'm afraid though, that this would be something hardcoded and would take tons of work to get fix.  :(

Quote from DrSpeed:"This honestly has expanded the possibilities with NFS4. I've been having more fun with this game than ever before and I'm glad I shared this with you all."

Agreed. Playing against 8 cops instead of 5 makes me feel like I'm playing nfs most wanted (2005). They keep coming out of nowhere. And I'm very glad you decided to go ahead and share the info with the nfs community, too.  ^-^

Also, many thanks to VEG, who fixed the poly limit which enables the game to display all those cars at once! HS truly lives on.  :)
Title: Re: Using ghost files to customize a race [NFS4]
Post by: dandresden on Nov 06, 2016, 12:48 AM
Anyone found address for Nickname(AI Name)?
Title: Re: Using ghost files to customize a race [NFS4]
Post by: Zalcus20 on Nov 06, 2016, 5:53 AM
Quote from DrSpeed
Quote
The adresses here is for Player One, to change for the next player simply add 70 in the adress, and another 70 for the next one et cetera.
Note: Each player always starts with the name, so it's quite easy to keep them apart.

00001160 = Name
Believe 10-12 characters is the max limit here?

You can also use my GST Editor cheat table if you have Cheat Engine 6.6 installed on your system.  :)
Title: Re: Using ghost files to customize a race [NFS4]
Post by: MADMAN_nfs on Nov 06, 2016, 8:05 AM
Hey,
Zalcus is right, using his GST Editor is much more comfortable than fiddling with the Hex Editor every time. Btw thanks again for the effort with investigating the files and providing the cheat engine script.
Title: Re: Using ghost files to customize a race [NFS4]
Post by: FranknFurter on Nov 07, 2016, 6:46 AM
.. question folks,
 the 'Cheat Engine 6.6' is required for the GST Editor 2.5 to work .. I have downloaded it from Chip server (not installed yet), but the Chip website explicitly warns that it might do harm to your machine .. any hints for the installation of Cheat Engine 6.6 software other than Chip website's hint to customize installation?

Thanks
Frank
Title: Re: Using ghost files to customize a race [NFS4]
Post by: Zalcus20 on Nov 07, 2016, 7:52 AM
I got my copy of cheat engine 6.6 from the cheatengine website. They do warn you that it might trigger your antivirus, but the file does not actually contain a virus.

Link:http://www.cheatengine.org (http://www.cheatengine.org)
Title: Re: Using ghost files to customize a race [NFS4]
Post by: DrSpeed on Nov 18, 2016, 1:25 PM
I always wonder where the game stores the data for the Tournaments, the AIs favorite color, what police car to load for each track and all that...

Maybe it's possible to change the pre-sets so it's like: the game loads a playable Caprice on Dolphin Cove and Empire City, but still load the Traffic version on the Atlantic tracks. Route Adonf loads a special BMW M5 with red sirens instead of blue, that'd be cool. Maybe someday in the future...

Way back in the day, I remember 2 programs that does interest me now:
One was a Traffic Editor, you could set what traffic cars would appear on each track.
The other one was a Career Editor (I think it was a bit unstable).
I basicly want to know what files was affected by them, if anyone still have these programs somewhere. Maybe it's possible to HEX-edit those files as well?
Title: Re: Using ghost files to customize a race [NFS4]
Post by: Zalcus20 on Nov 19, 2016, 1:08 PM
Interesting. I have never heard of those programs. I have something called KmEdit (Kareermode Editor) which is in German that allows you to customize the career mode but not the AI.

The only hint that I can give you for where all that data is stored is somewhere in that 1,938 KB nfs4.exe file. There are so many lines of data in that file that locating a specific line will be problematic.  :-\  But not impossible. ^-^

And I'm sure it's possible to HEX-edit those entries. Some time ago, I was able to make the aus.tga cop skin display on the European tracks by HEX-editing several entries in the exe.  My theory is that the Gst file gets all its data from the main nfs4.exe (or nfsgame.exe). So, all that data we found in the Gst file project should be in the main exe.  ^-^

EDIT: If I'm not mistaken, I think the KM Editor affects the files found in Savedata/DB
Title: Re: Using ghost files to customize a race [NFS4]
Post by: Remko on Nov 20, 2016, 3:26 AM
Download links for KM edit in this topic, for anyone that wants it: http://www.nfsaddons.com/forums//index.php?topic=1709.0

I don't exactly remember which tool supposedly let you edit the traffic cars, though, could that have been the Track Mixer, maybe?
Title: Re: Using ghost files to customize a race [NFS4]
Post by: DrSpeed on Nov 20, 2016, 7:07 AM
Thanks Remko! Traffic Mixer does ring a bell, maybe that was it. Wish I remember exactly, but it was over 12 years ago.  :P

@Zalcus
I assume you simply replaced germ/fran/uk.tga with aus.tga to make it appear? That's what I'm finding in it so far.  :)
I had a peek in the CDB files in the DB folder, it's gonna take awhile to understand their structure.
Title: Re: Using ghost files to customize a race [NFS4]
Post by: Zalcus20 on Nov 20, 2016, 8:09 AM
Oh, yeah. That's right. I got KM edit from here thanks to Remko a few years back. Sorry, my memory was failing me for the moment.  :D

@DrSpeed: That's exactly what I did with the cop skins. And before the gst file method I used to change the opponent names this way, too. The problem was I couldn't change the length of the names or the game wouldn't display them correctly.  :)
Title: Re: Using ghost files to customize a race [NFS4]
Post by: Remko on Nov 20, 2016, 5:17 PM
Oh, yeah. That's right. I got KM edit from here thanks to Remko a few years back. Sorry, my memory was failing me for the moment.  :D
You're not the only one :P I automatically Googled 'KMedit", got NFS Addons as one of the first results and was all like "ooh, right..." :o

Thanks Remko! Traffic Mixer does ring a bell, maybe that was it. Wish I remember exactly, but it was over 12 years ago.  :P
Maybe it is, the Track Mixer certainly was around that long ago.
If not, I hope someone else has an idea, because I just can't find a tool/hack for NFS4 called Traffic Editor in my NFS download folders, maybe it was called something different instead.
Title: Re: Using ghost files to customize a race [NFS4]
Post by: MADMAN_nfs on Nov 22, 2016, 8:35 AM
Maybe you guys talking about "Real Track"? I think that had an option to mix traffic on different tracks (see screenshot).
Title: Re: Using ghost files to customize a race [NFS4]
Post by: Paul Spain on Nov 22, 2016, 10:46 PM
Maybe you guys talking about "Real Track"? I think that had an option to mix traffic on different tracks (see screenshot).

Does mixing traffic make U.K. traffic for example drive like U.S.,French,or German traffic if you mix it with those? I have tried this tool before but saw no diffrence, It did however screw up a setting and I wound up having invisible traffic police cars when I used it, Only the player cop car and the Diablo was visible (tried it on U.K. and mixed with German traffic)
Title: Re: Using ghost files to customize a race [NFS4]
Post by: Zalcus20 on Nov 23, 2016, 6:46 AM
Latest version of GST editor (3.0) is out. Here is a dropbox link. 

https://www.dropbox.com/s/al10zz4zan3hkh3/GST%20Editor%203.0.zip?dl=0 (https://www.dropbox.com/s/al10zz4zan3hkh3/GST%20Editor%203.0.zip?dl=0)
Title: Re: Using ghost files to customize a race [NFS4]
Post by: MADMAN_nfs on Nov 23, 2016, 9:07 AM
Does mixing traffic make U.K. traffic for example drive like U.S.,French,or German traffic if you mix it with those? I have tried this tool before but saw no diffrence, It did however screw up a setting and I wound up having invisible traffic police cars when I used it, Only the player cop car and the Diablo was visible (tried it on U.K. and mixed with German traffic)

Well, i guess its always risky to use this kind of tools that move files around in your NFS folder. Even JimD's Mixer sometimes just gives "Runtime error -5 bla bla" and refuses to recognise the custom tracklist for example, making a complete recovery via backup-files neccessary.
I think Real Track was made with Knockout Races in mind - so you not drive on the same track over and over.
The "Mix traffic" feature just randomly moves the car.viv's in the "\Data\Cars\Traffic" folder. So yes, UK traffic can be seen in Germany for example, but it may also be possible there is a snoplow crossing your way. Its random, and you cannot influence it (and it will not be reset when using the ReSet button, so you have to copy your backup, resp. the original traffic folder from cd, afterwards). Police cars with serial numbers are not effected.

Can't remember a tool that only displayed a traffic list, that you can customize. Have to admit that would be an interesting idea tho.
Title: Re: Using ghost files to customize a race [NFS4]
Post by: DrSpeed on Nov 23, 2016, 11:07 AM
So basically, the program only moves files instead of changing any particular value?
I do think Real Track is the program I was looking for. Thank you for helping me remember.  :D

@Zalcus
I have the full list of the AI Driver ID, want me to send them to you?
I also found the High Stakes gamemode (at: 000000FF0) = 4. This will make the upgrades visible, but the game will crash when you're done with the race.
Title: Re: Using ghost files to customize a race [NFS4]
Post by: Zalcus20 on Nov 23, 2016, 1:01 PM
@DrSpeed: That would be great. Thank you. :)

Wish I could help out more with figuring out that traffic editor program but I had no idea there was a program called RealTrack.  :P
Title: Re: Using ghost files to customize a race [NFS4]
Post by: Paul Spain on Nov 23, 2016, 1:32 PM

Well, i guess its always risky to use this kind of tools that move files around in your NFS folder. Even JimD's Mixer sometimes just gives "Runtime error -5 bla bla" and refuses to recognise the custom tracklist for example, making a complete recovery via backup-files neccessary.
I think Real Track was made with Knockout Races in mind - so you not drive on the same track over and over.
The "Mix traffic" feature just randomly moves the car.viv's in the "\Data\Cars\Traffic" folder. So yes, UK traffic can be seen in Germany for example, but it may also be possible there is a snoplow crossing your way. Its random, and you cannot influence it (and it will not be reset when using the ReSet button, so you have to copy your backup, resp. the original traffic folder from cd, afterwards). Police cars with serial numbers are not effected.

Can't remember a tool that only displayed a traffic list, that you can customize. Have to admit that would be an interesting idea tho.
[/quote]

I was going to use it in hopes of FINALLY making the traffic drive on the right side of the road on our modded USSR track (since it only works in the U.K. folder) for the ColdWar mod, but that plan FAILED, Only messed things up, So I'll keep waiting for a better tweak tool before I try to fix the issue again.
Title: Re: Using ghost files to customize a race [NFS4]
Post by: Zalcus20 on Nov 26, 2016, 7:26 PM
I was fiddling around with the gst files again and discovered these three switches that display the helicopter in-game (HP MODE, of course):

0000115C   0=OFF 1=ON  This tells the game to load the Helicopter (.VIV) file as well as the Helicopter banter speech (radio chatter).

0000114C 0=OFF 1=ON I think this tells the game to load the Helicopter's .bnk sound files (the sound of the spinning rotors).

000010AE 0=OFF 1=ON This tells the game to load the helicopter land lights bitmaps (the light that the heli shines on your car at night) as well as the speech files that say, "Rotor 1 to county, subject is lit, subject is lit"; "I got him take him down" etc.
EDIT: And yes this is the same address that controls the countdown (321GO!) timer (thanks for the hint, DrSpeed).  8)

If these switches are set to OFF in a Hot Pursuit race, the game will still load but the helicopter will not be flying around and dispatch will not ask for helicopter support or even ask the location or situation of the ground units (i.e. "Unit XX, what is your location?"; "what is your current situation?" ; "OK continue pursuit").  Basically, it will be like playing Hot Pursuit mode in good old NFS3 when the only heli was the one on the Empire City track.  :P

Looks like there is yet another version of GST Editor to be released.  =D
Title: Re: Using ghost files to customize a race [NFS4]
Post by: DrSpeed on Nov 27, 2016, 7:47 AM
Now we really can recreate a NFS3 stye Hot Pursuit, nice findings.  :D
Btw, wasn't 000010AE also the countdown timer?
Title: Re: Using ghost files to customize a race [NFS4]
Post by: Zalcus20 on Nov 27, 2016, 12:07 PM
@DrSpeed: Oh yeah. That's right. Forgot to mention that 000010AE controls the countdown timer, too. Oops.  :o By the way I got your PM and am looking into the info now.  ;)
Title: Re: Using ghost files to customize a race [NFS4]
Post by: DrSpeed on Nov 29, 2016, 10:14 AM
There seems to be a limit on how many traffic cars can spawn during a two player race. If you have more than 8 it'll ignore the rest. So if you set 14 traffic cars in a two player race, the game will randomly pick 8 of them. I don't know if the game actually loads them or if there's some sort of a weird limit.
Thanks to: MADMAN_nfs for finding this!
Title: Re: Using ghost files to customize a race [NFS4]
Post by: FranknFurter on Feb 04, 2017, 11:20 PM
Folks I made another experience concerning NFS' opponents choosing and, again, of how NFS actually 'ticks', maybe of some importance or interest here ...

You know I told about how I make progress on the 'Bandit and Snowman' race setup using both the T/A and Snowman truck on same serial number 30, works fine now with always being Snowman as the single sole opponent everytime you start 'classic pursuit'

As I assumed NFS chooses random opponents in-game by car ID not name or number it seems ..

So what happened here is the following: I altered back the T/A to class 'A' again so normally should be in class 'A' roster for to be chosen then as a class 'A' opponent as well ... so far so good

I prior forgot to 'disable' the Snowman (which still is class 'AAA' (!)) by renaming it so still uses same serial number 30 .. ok

I started a normal single race with a class 'A' vehicle and who was among the opponents? the 'Snowman' ???
.. although the Snowman is class 'AAA' it had been chosen for a class 'A' opponent so I made the following conclusion of how NFS chooses opponents by this assumed pattern or procedure:

NFS looks up car folder of which car serial number uses what class and 'memorizes' that .. this what we also see in car menu ..

NFS then chooses opponents by that serial number 'pool' regardless of what car class whatever just chooses the first car to find using that specific serial number then by first car ID assigned to that serial number.

Serial number opponents choice was '30' of class 'A' car pool since this had then been memorized before (meaning the T/A)

Choosing opponents then .. looking up cars among 'memorized' serial numbers -> first car ID for 30 then is 'Snow' before '77TA' (in ASCII table) regardless of what car 'behind' it actually is(!) .. in this case a completely different car from the T/A also different class 'AAA' car so actually wrong for a class 'A' grid :o

.. this is as well strange as it is funny and very interesting for further experiments on that isn't it? =D

For example, what happens if the chosen 'wrong' car behind is marked as 'Pursuit' car?
Will it be used as a normal racer opponent in a race or as a Pursuiting car what would be very strange btw since is single race ..? ???
Will it at all work since in single race all Pursuit cars are 'faded out' ... Well ^-^

Didn't you alter the ghost file already to have more and more different Pursuit cars in-game? Maybe that's based on same issue by this internal car choosing method of NFS in a way?

Maybe that observation again helps on further Ghostfile editing ... :)
Title: Re: Using ghost files to customize a race [NFS4]
Post by: FranknFurter on Feb 05, 2017, 1:47 AM
tested out that now .. a 'Pursuit' marked car will not be used for Pursuiting in a race .. well that's what was being most probable to assume but just to reassure... ^-^

Secondly .. I choose for same serial number 32 (hometown auxiliary copcar) two cars with similar or nearby letters in car name.

1) the Michigan Mustang                (car ID: 'MSPM' - car name in menu: '92 Ford ..) - I also altered name to '1992' for testing issues
2) the 'Norwegian Police' Durango   (car ID: 'NODD' - car name in menu: Norwegian Police ...)

Result is (I chose the MSPM in car menu for pursuit game) that in both cases the car chosen by NFS for 'auxiliary vehicle' was the Norwegian Durango (car ID and name beginning with 'N') :o

Means that NFS either doesn't choose cars by car ID (so I assumed that wrong) than rather by full car name (since 'M' is before 'N' concerning their car IDs) OR it chooses by ID (or name) but in vice-versa order from numbers (1992) and special characters (that apostrophy in '92) .. then down to regular letters (Norw ...) ... :-\

I must say I'm a bit confused since in the 'Bandit race' (see above post) NFS vice-versa chooses 'Snow' (car ID) or 'Kenworth ... ' (so both letters here) as opponent BEFORE the Pontiac ('77TA' is car ID) resp. '1977 Pontiac ...' (both numbers) ... ???

Does anyone have an explanation for that? I don't ... :(
Title: Re: Using ghost files to customize a race [NFS4]
Post by: FranknFurter on Feb 05, 2017, 2:48 AM
another test ... with very interesting outcome folks !!

I chose again the Michigan Mustang ('92 Ford.. on car ID) ... second car was the 1977 Plymouth Fury 'combined one' (car ID: 'Fury')

First result: Fury as racer as it is (Pursuit = no) but also #32 like the Michigan, the Michigan had then been chosen by NFS as the auxiliary car. Normally the Fury would be auxiliary car if there wasn't the double serial number 32 ..

Second result: Fury is marked as Pursuit car (Pursuit = yes) still #32 both cars with all names IDs unchanged(!), as a result NFS chose the Fury this time as the auxiliary car .. that a possible explanation for the two different outcomes in choosing order on either a Race or Pursuit game if a car is stated 'yes' or 'no' in 'Pursuit' FeData entry? ... very strange that is I must say :o

Would be very interesting if other folks might get similar results or not on same or alike tests ... :P
Title: Re: Using ghost files to customize a race [NFS4]
Post by: MADMAN_nfs on Feb 05, 2017, 6:10 AM
You should avoid giving 2 cars the same serial numbers. Its very hard to predict the outcome when doing this. Not sure if there is a "system" behind that nor if it is worth investigating that. Might as well be completely random.
From my experience i can tell, that if you have two cars with same serial, the cop car is preferred.
So in pursuit or single race the opponent will be a police car. But the game still think its a opponent and the AI will try to complete the regular race rounds. If you provoke such a "police-racer" to honk the horn, the game will crash.

Not recommended.
Title: Re: Using ghost files to customize a race [NFS4]
Post by: FranknFurter on Feb 05, 2017, 8:42 AM
Well aware of that thx Madman bro ... was just a coincidence and that forced me to do further investigation .. I hear you ..

Sometimes it happens to be that your safe world becomes shattered by simple accident ... it's up to oneself to further examine if all that is by chance or if it follows a certain scheme ... nevermind ^-^

It helps sometimes to act like an examining child seeing and describing things for the first time wondering what may causing this what is happening ;)

Cheers and may all being safe @all
Frank

P.S.: @Zalcus and DrSpeed: how is progress on Ghost file editing and did my observations have any impact resp. do you have any explanation by hexediting codes maybe for what I experienced here? :)
You guys are the diligent most silent workers here so just wondering how things are moving ahead ^-^
Title: Re: Using ghost files to customize a race [NFS4]
Post by: Zpectre on Feb 11, 2017, 5:09 AM
You should avoid giving 2 cars the same serial numbers. Its very hard to predict the outcome when doing this. Not sure if there is a "system" behind that nor if it is worth investigating that. Might as well be completely random.
From my experience i can tell, that if you have two cars with same serial, the cop car is preferred.
So in pursuit or single race the opponent will be a police car. But the game still think its a opponent and the AI will try to complete the regular race rounds. If you provoke such a "police-racer" to honk the horn, the game will crash.

Not recommended.

IIRC the game is not able to choose two cars with same SN for the same race, if forced to do so it'll crash.

About the ghost races, this is possible because in the old games the replays were not video recordings but rather input recordings. When you run a replay, the gameplay is live action with the predetermined inputs. Ghost file takes this one step further because it allows you to pick your car and, since the ghost needs to be able to support all kinds of races, it must contain the data for them, that's why it works. :)

It might be possible to do in other games contemporary to HS with support for ghost files.
Title: Re: Using ghost files to customize a race [NFS4]
Post by: DrSpeed on Feb 11, 2017, 11:30 AM
@FranknFurter
Well I didn't really, could double check it later. I always take extra notes when I add any car, serial numbers is something I triple check before I launch the game.

It might be possible to do in other games contemporary to HS with support for ghost files.
Yes, at least NFS3 has a similar setup. Editing those files is just as simple as it is for NFS4 (not everything is in the same order though).  :)

There's not much left to cover in the gst files. Mostly are unknown to me and some of them maybe doesn't even lead to anything. But here's something:
0000119C, 000011A0, 000011A4, 000011A8
000011AC, 000011B0, 000011B4

These addresses is the Car Tuning you've done to the selected car. Default value: 00 00 80 3F (middle on the slider).
Don't know exactly what the min and max values are for them at the moment.

I'll revisit the first post to make it look better, at some point.  :D
Title: Re: Using ghost files to customize a race [NFS4]
Post by: Zalcus20 on May 15, 2017, 10:48 AM
^^
Thanks for finding the Car Tuning offsets. I have added it to GST editor. Right now, I'm trying to find a way to keep the game from crashing when doing a single race with upgrades. That means investigating the header in the config.dat file. Hopefully, this will be successful.  :police:
Title: Re: Using ghost files to customize a race [NFS4]
Post by: WiLL on May 16, 2017, 9:11 AM
I hope your experiments,can work out Zalcus. To benefit us all. :)
Title: Re: Using ghost files to customize a race [NFS4]
Post by: DrSpeed on May 17, 2017, 6:56 AM
Hopefully you'll have better luck than I did.  :D

I've finally updated the first post with better looks and descriptions.
Title: Re: Using ghost files to customize a race [NFS4]
Post by: Caio_96 on May 21, 2017, 8:06 PM

Also that part where the game crashes when you hex edit the user car to be a traffic vehicle. The reason it crashes is because the game is looking for a fedata file. The traffic cars' viv file do not contain a fedata file. You have to create a fedata file for the desired traffic vehicle and make sure the extension matches the language you play in your game (fedata.eng for english fedata.ger for german).
 

I'm using GST Editor. I tried to use a traffic car after creating fedata files, but the game keeps crashing. What am i missing? Can you show me a example of what values makes a traffic car turns into a playable car?
Title: Re: Using ghost files to customize a race [NFS4]
Post by: Zalcus20 on May 22, 2017, 8:13 AM
^^
Yeah. I feel silly right now.  :o That method that I talked about earlier doesn't work. At that time I had all the traffic cars as playable cars since they were all in the data/cars folder. If any car is placed in the traffic folder, the player can not use it in game. Sorry for that misleading info.  :o
Title: Re: Using ghost files to customize a race [NFS4]
Post by: Caio_96 on May 22, 2017, 9:43 AM
No problem, thanks for the info :)
Title: Re: Using ghost files to customize a race [NFS4]
Post by: Zalcus20 on May 29, 2017, 2:38 PM
Hello, all!  :)

After quite some time, Ghost Editor 4 is out!
https://www.dropbox.com/s/47t9qhgl4nrfkb8/GST%20Editor%204.1.zip?dl=0 (https://www.dropbox.com/s/47t9qhgl4nrfkb8/GST%20Editor%204.1.zip?dl=0)



        Now I am turning to you, the NFS Community, for your help, PLEASE. There are thousands upon thousands of cars that have been created for NFSHS. All of these cars have a specific size that must be specified in GST Editor (users of the gst editor know it as the CAR NAME tab) so that these cars do not have the 'sinking in the ground effect' or the 'floating above the ground' effect in-game. For this reason, GST Editor is a program that will be constantly updated as new cars are being released.
           I have already made a list that contains about 300 virtual car sizes, which is barely a scratch on the surface compared to how many other cars there are for NFSHS. But I know there are many cars that you would all like to use in a ghost race that are not included in this list. This is where I would need some help. Here are the instructions if you want to help out:
   
        If you desire to see a car or cars that you like included in GST Editor's CAR NAME list

1. Start a single race with the desired car (If this is a police car, start a Hot Pursuit race).

2. After the announcer says GO! quit race to the race results screen (If you are in Hot Pursuit mode as a cop,
exit to system).

3. Save the race as a ghost. Repeat step 1-3 if you have more cars you would like to add. (If this is a Hot Pursuit ghost you will find the desired gst file in  nfs directory/SaveData/ghost.gst. Make a copy of it and rename the file to something else).

4. Exit the game and open the gst file in Ghost Editor.

5. Under the Player Car group, go to Car Name and note what is written under 'Value'. You're going to see a long line of hexadecimal values (ie. 3A 7C 5E 5B 3F 8A 69 1D 3F 0C 14 0A 40) This is the virtual size of the car.

6. Open the Value as if you were trying to change it but instead copy the highlighted text and paste it in this post here with the name of the car as it is written in-game included. Please type it in this format (no spaces between the colon):

XX XX XX XX XX XX XX XX XX XX XX XX XX:Name of Car

the X's of course represent whatever hexadecimal value you have copied. Also the values are always 13 bytes long.


When I see that there are multiple posts of these codes I will make the necessary updates to Ghost Editor.
A big thanks in advance to all who can participate in this effort!!!  :D
Title: Re: Using ghost files to customize a race [NFS4]
Post by: Caio_96 on Jun 17, 2017, 1:05 AM
Thanks, Zalcus. But in the zip, the "GST Editor 4.CT" file is missing, instead there's a "GST Editor 4.lnk" . Can you reupload?
Title: Re: Using ghost files to customize a race [NFS4]
Post by: Zalcus20 on Jun 17, 2017, 12:09 PM
OK. Try redownloading. Sorry for the error. Thanks for letting me know!  :)
Title: Re: Using ghost files to customize a race [NFS4]
Post by: Caio_96 on Jun 18, 2017, 10:47 PM
Thank you.
I did some tests with career mode enabled. In one attempt, the game don't crashed. I created a new career profile, bought a Z3 and entered in a random cup. I left the cup and the career mode, and then entered in the arcade mode to save a ghost file.

The track in the ghost file was Landstrasse (2 laps. Weather, night drive and mirrored all OFF), with me driving a Corvette (Upgrade 3) and one opponent with the same car. At the finish, the game showed the results like a championship (including points for A.I. and me).

Then, the career menu appeared and i could forfeit the race or proceed with the "next race", Route Adonf . The previous track in this cup was Landstrasse, and works if you proceed (for some reason, my Corvette was stock at the french track). At the end of the cup, i won a medal and some cash, but later i could not buy a new car or choose any career event . The Chevy was not in the garage, only the Z3. In most of the tests i did, the game crashed as expected, but in all tests my vehicle was damaged (if the damage was enabled).

Is it necessary to copy the virtual size values of the original cars (including official addons and traffic cars - i've got them all as playable vehicles)? If yes, i'll send them to you.

Title: Re: Using ghost files to customize a race [NFS4]
Post by: Zalcus20 on Jun 19, 2017, 5:21 AM
^^Thanks for testing out the career mode. Yeah I noticed that the game doesn't crash (maybe only once or twice per session) when I create a profile and type the 'gates gates' and 'alltiers' cheats and purchase as many cars as I can.

Since you are using the traffic and ea cars as playable vehicles, the virtual size data will be needed. You can send me the info.

Many many thanks, Caio_96!  :)

EDIT: Can you send me the career ghost file if you still have it? I would like to investigate it further?
Title: Re: Using ghost files to customize a race [NFS4]
Post by: Caio_96 on Jul 04, 2017, 3:41 PM
Sorry for taking so long to reply. I did a new ghost file with the same effects.
3F FF FF 7F 3F F5 15 43 3F B8 1E 1D 40:FORD XR8 (EA)
3F 52 B8 5E 3F 30 F8 1B 3F 00 00 00 40:BMW Z3 (EA)
3F 2D 56 86 3F 0E 09 23 3F 0A AB 12 40:FERRARI 360 MODENA (EA)
3F D4 1E 80 3F 5C 8F 22 3F 32 8A 11 40:FERRARI 550 MARANELLO (EA)
3F 33 33 73 3F 66 66 26 3F 1E 4C 12 40:PORSCHE 911 TURBO (EA)
3F 66 66 66 3F 78 A0 2F 3F CD CC 1C 40:BONUS CAMARO (EA)
3F 33 33 73 3F 66 66 26 3F 03 6F 12 40:BONUS PORSCHE (EA)
3F 00 00 00 40 00 00 00 40 68 08 CB 40:TRAFFIC BUS (EA)
3F 66 66 66 3F 78 A0 2F 3F CD CC 1C 40:CHEVROLET CAMARO (EA)
3F D0 C2 99 3F B8 BC 48 3F BA BE 37 40:POLICE CAPRICE (EA)
3F FF FF 7F 3F 68 B3 1A 3F 96 43 1B 40:MERCEDES CLK-GTR (EA)
3F 00 00 80 3F 7C F2 40 3F 36 29 20 40:MHRT COMMODORE (EA)
3F 00 00 80 3F D0 5A 24 3F 85 EB 11 40:CHEVROLET CORVETTE (EA)
3F 00 00 80 3F 09 D7 23 3F 12 8B 13 40:ASTON MARTIN DB7 (EA)
3F FF FF 7F 3F 51 0C 21 3F 3D 0A 0F 40:LAMBORGHINI DIABLO SV (EA)
3F 2E AD B9 3F CB CB F7 3F 66 CF C7 40:TRAFFIC EBUS (EA)
3F C2 9C 8D 3F AB 1D BF 3F 07 86 68 40:TRAFFIC ESEMI (EA)
3F 8F C2 55 3F D7 A1 1D 3F 7B 14 FE 3F:TRAFFIC ESEDAN (EA)
3F 33 33 73 3F A8 79 24 3F A5 70 1D 40:MCLAREN F1 GTR (EA)
3F 66 66 66 3F A0 4F 2E 3F CD CC 1C 40:PONTIAC FIREBIRD (EA)
3F E1 7A 54 3F 84 CE 33 3F 00 00 F0 3F:TRAFFIC HATCHBACK (EA)
3F C3 F5 88 3F E3 C7 11 3F EC 51 08 40:LA NIÑA (EA)
3F 7C 14 6E 3F 0A D7 23 3F 03 B6 04 40:BMW M COUPE (EA)
3F 52 B8 5E 3F 30 F8 1B 3F 00 00 00 40:BMW M ROADSTER (EA)
3F 66 66 66 3F 5A 2D 35 3F C3 F5 18 40:BMW M5 (EA)
3F C3 F5 68 3F 47 36 53 3F 8F C2 1D 40:TRAFFIC MINIVAN (EA)
3F FF FF 7F 3F BA 92 6E 3F BC 74 37 40:TRAFFIC PICKUP (EA)
3F 68 DE 80 3F F1 01 52 3F D3 C9 0C 40:POLICE HATCHBACK (EA)
3F 83 80 92 3F 8E 69 62 3F 90 EB 2F 40:POLICE SEDAN (EA)
3F AF 68 90 3F 36 4F 70 3F 12 9A 02 40:POLICE SUV (EA)
3F 66 66 66 3F 33 33 33 3F 08 F4 0C 40:TRAFFIC SEDAN2 (EA)
3F 2E DC 5D 3F 22 B0 31 3F 24 06 19 40:TRAFFIC SEDAN4 (EA)
3F A3 66 B7 3F F1 03 FE 3F 20 23 80 40:TRAFFIC SEMI (EA)
3F B7 1E 65 3F 7A 14 2E 3F F2 71 16 40:NISSAN SKYLINE GT-R V.SPEC (EA)
3F F6 28 5C 3F 00 00 20 3F D9 C0 FF 3F:MERCEDES SLK 230 (EA)
3F 45 46 13 40 BE B6 A3 3F FC AE 82 40:TRAFFIC SNOWPLOW (EA)
3F 41 DE 8A 3F FA EA 33 3F E8 66 14 40:LISTER STORM (EA)
3F 33 33 73 3F 3D 0A 57 3F 17 0E 18 40:TRAFFIC SUV (EA)
3F 00 00 80 3F 4A F1 40 3F 42 60 1D 40:HSV SV99 (EA)
3F 3D FC 82 3F AD 3B 7B 3F 5F 5F 23 40:TRAFFIC TRUCK50S (EA)
3F F6 28 5C 3F 8C 94 3A 3F CD CC 14 40:TRAFFIC WAGON (EA)
3F 6C 06 A8 3F 7B 4C 9E 3F CE 98 53 40:TRAFFIC WATERTRUCK (EA)
3F CA A3 91 3F 5A 52 24 3F 0F 85 20 40:JAGUAR XJR-15 (EA)
3F FF FF 7F 3F 31 76 2C 3F EC 51 18 40:JAGUAR XKR (EA)
Title: Re: Using ghost files to customize a race [NFS4]
Post by: Zalcus20 on Jul 04, 2017, 5:27 PM
Great! Thanks a lot for the Virtual car sizes and your hard work. I'll take a look into the Ghost file some time this week. :thumbsup:  :)
Title: Re: Using ghost files to customize a race [NFS4]
Post by: ExoticLover on Jul 06, 2017, 8:06 PM
Is anyone having trouble putting subject on new topic?
Title: Re: Using ghost files to customize a race [NFS4]
Post by: Zalcus20 on Dec 03, 2017, 11:15 AM
Hello,  :D

It's been a very long time.
I wasn't sure if I should have created a new thread since this an old subject I'm talking about.

I have just finished updating my gst editor cheat table to version 4.5. This version now includes the virtual car size data for ALL original EA cars. Thanks to Caio_96 for finding out the data for me!

Also, I have created a few customized games that are included in this download. Feel free to try them out!

Here is the Link to my Dropbox for the file:

https://www.dropbox.com/s/qv987otksoxs65j/GST%20Editor%204.5.rar?dl=0 (https://www.dropbox.com/s/qv987otksoxs65j/GST%20Editor%204.5.rar?dl=0)


Again if you want to use a car that gst editor doesn't have the virtual car size data for:

Quote
If you desire to see a car or cars that you like included in GST Editor's CAR NAME list

1. Start a single race with the desired car (If this is a police car, start a Hot Pursuit race).

2. After the announcer says GO! quit race to the race results screen (If you are in Hot Pursuit mode as a cop,
exit to system).

3. Save the race as a ghost. Repeat step 1-3 if you have more cars you would like to add. (If this is a Hot Pursuit ghost you will find the desired gst file in  nfs directory/SaveData/ghost.gst. Make a copy of it and rename the file to something else).

4. Exit the game and open the gst file in Ghost Editor.

5. Under the Player Car group, go to Car Name and note what is written under 'Value'. You're going to see a long line of hexadecimal values (ie. 3A 7C 5E 5B 3F 8A 69 1D 3F 0C 14 0A 40) This is the virtual size of the car.

6. Open the Value as if you were trying to change it but instead copy the highlighted text and paste it in this post here with the name of the car as it is written in-game included. Please type it in this format (no spaces between the colon):

XX XX XX XX XX XX XX XX XX XX XX XX XX:Name of Car

the X's of course represent whatever hexadecimal value you have copied. Also the values are always 13 bytes long.

HAVE FUN
Zalcus

Title: Re: Using ghost files to customize a race [NFS4]
Post by: AJ_Lethal on Jan 04, 2018, 3:10 PM
Turns out you can also edit replay files (.rp4) with the GST Editor. Depicted below, a split-screen race replay turned into a single player replay by just changing "two player"  to "single player"

(https://i.imgur.com/WL76yRb.jpg)

Title: Re: Using ghost files to customize a race [NFS4]
Post by: Zalcus20 on Jan 07, 2018, 6:37 AM
The same can be done with knockout and tournament modes, but the game resets the user data (cars and tracks you have selected to race on) when you enter the race.   :o ???
Title: Re: Using ghost files to customize a race [NFS4]
Post by: DrSpeed on Mar 28, 2021, 6:32 AM
Zalcus did post a cheat engine table and how to use it (the Cheat Engine program is required). It's much easier to use that instead of a Hex editor.
http://www.nfsaddons.com/forums//index.php?topic=1831.msg33827#msg33827 (http://www.nfsaddons.com/forums//index.php?topic=1831.msg33827#msg33827)

If you don't know how to use either Hex editor or Cheat engine, then unfortunately I can't help you. I'm not the best when it comes to step by step guides. But there should be plenty of video tutorials on how to use both of them. So I can recommend you search for those to get the hang of it.

Edit: Original response was to kevinkcubboy, but his post is now gone.
Title: Re: Using ghost files to customize a race [NFS4]
Post by: AJ_Lethal on Mar 28, 2021, 3:36 PM

where can I find cheat engine 6.6 or do I download the newer version.

You can get it here:
https://www.cheatengine.org/downloads.php

I mean come on where is the ghost file located at
ghost files (.gst) are located in the SaveData folder of NFSHS, these are generated everytime you exit or finish a race

To use the GST Editor, install Cheat Engine, then simply open the GSTEditor.ct file; in CE go to File > Open File and open the .gst file in your savedata folder; then change all the parameters you'd like (remember to check all the checkboxes you're changing) then exit when you're done (changes are saved automatically). To use your modded ghost file, just load a ghost in the game.
Title: Re: Using ghost files to customize a race [NFS4]
Post by: Zalcus20 on Jun 15, 2021, 9:51 AM
The GST Editor Cheat table has been updated to version 5! Here is the link: https://www.dropbox.com/s/s8ujazvpo637bs6/GST%20Editor%205.zip?dl=0 (https://www.dropbox.com/s/s8ujazvpo637bs6/GST%20Editor%205.zip?dl=0)

Updates have been made. More virtual car sizes (car names) have been added and have the author's name attached with it.  This makes it easier to identify which model specifically it is for as there can be different authors that make the same car (a virtual car size for one car may not work for another car although it may be the same model).

Please note that the current version of Cheat Engine at the time of this writing is 7.2.  With this version, you now have to manually save your edited file. Cheat Engine 7.2 will no longer save the file automatically for you.

The readme file has been updated and changed to "User Manual 5" and provides the links to where you can get the needed programs.  Please take a look at it.

I reorganized the GST Editor so that it is easier to follow and you will notice 1 or 2 new features (discussed in User Manual 5).



 
Enjoy!  :)
Title: Re: Using ghost files to customize a race [NFS4]
Post by: Zipper on Jun 21, 2021, 11:30 AM
Thanks to still givin some love to HS!
Title: Re: Using ghost files to customize a race [NFS4]
Post by: AJ_Lethal on Oct 17, 2021, 3:24 PM
Just a little something, an Excel spreadsheet containing the car colors present in the GST Editor table, with samples.
Title: Re: Using ghost files to customize a race [NFS4]
Post by: Zalcus20 on Oct 18, 2021, 10:14 AM
This very helpful.  Thanks, AJ_Lethal!

I will include this spreadsheet in any future updates made for the GST Editor (crediting you, of course).

BTW. If you have any colors you would like to add to the list, let me know and I will be more than happy to implement them with the cheat table.
Title: Re: Using ghost files to customize a race [NFS4]
Post by: meyeber on Nov 13, 2021, 12:43 PM
it works on nfs3 ?
Title: Re: Using ghost files to customize a race [NFS4]
Post by: Zalcus20 on Nov 13, 2021, 12:50 PM
NFS3 ghost file format is different from NFS4, so it will not work.  :(   

To get this to work for NFS3 you first have to figure out the location of all the addresses in the NFS3 ghost file (using hex editor or cheat engine).
 
Title: Re: Using ghost files to customize a race [NFS4]
Post by: pete9516 on Dec 03, 2021, 12:21 AM
Does somebody know why my ghost file is corrupt or "there is missing data" and why the game crashes when i want to create a Hot Pursuit ghost file? Also for what do i need the virtual car sizes? Does the game crash when the virtual car size is not the right one?
Title: Re: Using ghost files to customize a race [NFS4]
Post by: Zalcus20 on Dec 03, 2021, 4:41 PM
"Virtual car size" is the car's collision or hitbox. It also affects handling. Setting it wrong shouldn't lead to a corrupt ghost file, though.  Corruption can be caused for many reasons.  Would it be possible to attach your ghost file that you are trying to edit? I'm pretty sure I can pinpoint the problem.
Title: Re: Using ghost files to customize a race [NFS4]
Post by: pete9516 on Dec 04, 2021, 9:28 AM
"Virtual car size" is the car's collision or hitbox. It also affects handling. Setting it wrong shouldn't lead to a corrupt ghost file, though.  Corruption can be caused for many reasons.  Would it be possible to attach your ghost file that you are trying to edit? I'm pretty sure I can pinpoint the problem.
Unfortunately that's not possible, because my whole car setup is modded. But as soon as i set the game mode to Hot Pursuit, Classic, for some reason it loads until the track loading screen and when it's about to render the game suddenly crashes. Not happening if i make a usual Hot Pursuit race.
But maybe you can still find out something from my ghost file, so i'll attach it
Title: Re: Using ghost files to customize a race [NFS4]
Post by: Zalcus20 on Dec 04, 2021, 10:13 AM
I made some adjustments to your file. Try it out when you get a chance.

Adjustments made:

-Removed the ghost car data at the end of the ghost file (this can cause the game to crash)

-gave the AI Cop a name "Shield" and re-positioned its data before the ai traffic data in the AI Opponents list (Opponent #8). It was previously at the bottom of the list (Opponent #15) which can also result in a crash.

-Adjusted the tickets quota to "24". There are a total of 8 racers (includes the player) and each can get 3 tickets.  Previous value was "6".  This doesn't result in a crash but I changed it just to be safe.  ;)

Note: You are using all 16 slots which is the max the game can handle and you are also using modded cars.  This requires the Veg Patch (which I'm sure you have installed already).

Hope this helps.
Title: Re: Using ghost files to customize a race [NFS4]
Post by: Zalcus20 on Dec 04, 2021, 11:13 AM
There seems to be a strange bug when the number of laps is set to "14" or more. It causes the number of tickets to display unbelievable numbers in the pursuit summary window during the replay. See the attached screen.

When setting the laps to "16" the game crashes before getting to the replay.  Pete9516, If you still get crashes with my adjusted ghost file, try lowering the number of laps to "13".
Title: Re: Using ghost files to customize a race [NFS4]
Post by: pete9516 on Dec 04, 2021, 6:26 PM
Ok thank you very much for those extra infos, i will try your file and will experiment when i have some time and give a report
Title: Re: Using ghost files to customize a race [NFS4]
Post by: pete9516 on Dec 04, 2021, 6:29 PM
There seems to be a strange bug when the number of laps is set to "14" or more. It causes the number of tickets to display unbelievable numbers in the pursuit summary window during the replay. See the attached screen.

When setting the laps to "16" the game crashes before getting to the replay.  Pete9516, If you still get crashes with my adjusted ghost file, try lowering the number of laps to "13".
By the way i got a 16 laps round running perfectly fine by not taking any pursuit nor traffic vehicles into the race. Just for information, but i will experiment further
Title: Re: Using ghost files to customize a race [NFS4]
Post by: pete9516 on Dec 05, 2021, 4:12 AM
Your ghost file worked perfectly fine! I got the same strange bug in the results screen, but for me it's ok, better than a crash :S Thank you so much
Title: Re: Using ghost files to customize a race [NFS4]
Post by: Zalcus20 on Dec 05, 2021, 7:36 AM
Great! I'm glad the problem is resolved.  :D

Since you still get the strange "race results" bug, the crashes you experienced before most likely occurred because the AI Cop data was entered after the AI Traffic data in the Opponent Cars tab of GST Editor.  General rule of thumb is: enter all AI Racer data first, all AI Cop data next, and all AI Traffic data last.  Doing this ensures the game will load correctly and AI are spawned properly.

Quote
Pete9516: By the way i got a 16 laps round running perfectly fine by not taking any pursuit nor traffic vehicles into the race. Just for information, but i will experiment further

Thanks for sharing this info. IIRC, the most I ever tested with was 14 laps. It's good to know that 16 laps works well in Single Race mode.  ^-^

Have fun with the ghost editing. I know it's a bit finnicky. But there are so many possible combinations, I don't think you will ever be bored, lol.
Title: Re: Using ghost files to customize a race [NFS4]
Post by: pete9516 on Dec 05, 2021, 11:51 AM
Hello, today i raced a 16 laps race on Redrock Ridge with 4 cops, 4 traffic cars and 8 racers, including me :D So i guess the number of laps can be unlimited, but ofcourse you need to put many time into the setup. I wish, Cheat Engine would have a random function in each tab, so that you don't always drive the same race.. But this Ghost Editor is very interesting though. Thanks!! for creating this, Zalcus20
Title: Re: Using ghost files to customize a race [NFS4]
Post by: Neoguto on Mar 25, 2022, 5:13 PM
Hey guys!
I still couldn't understand how to use the GST editor correctly, because every time I save a .gst file, when I try to load this Ghost file into the game, it says that it is defective or corrupted.
Could someone show me how to do this correctly?

Sorry for the stupidity, but it's been a long time since I've played with files for this game.
Title: Re: Using ghost files to customize a race [NFS4]
Post by: Zalcus20 on Mar 25, 2022, 7:19 PM
Hello Neoguto,

Nice to see some more interest in the Ghost editor. The ghost file can become corrupted for a number of reasons.

Is it possible you can attach the problematic ghost file here? I can analyze it and hopefully figure out what's  the cause. (It's ok if you are using a custom car list).
Title: Re: Using ghost files to customize a race [NFS4]
Post by: Neoguto on Mar 25, 2022, 8:57 PM
Hello Neoguto,

Nice to see some more interest in the Ghost editor. The ghost file can become corrupted for a number of reasons.

Is it possible you can attach the problematic ghost file here? I can analyze it and hopefully figure out what's  the cause. (It's ok if you are using a custom car list).

Of course, that it is!
Title: Re: Using ghost files to customize a race [NFS4]
Post by: Zalcus20 on Mar 26, 2022, 11:38 AM
I believe I see the problem...

The info from the ghost file tells me you are trying to run a single race with 13 AI racers.  However, under the "Opponent Cars.." tab, there are many opponents whose serial number is assigned a "0" (Zero).  This must be set to a number between 1 and 49 or else the game will see your file as corrupted. 

You can use the Serial Number Editor to determine a car's serial number.

Also, since you are running a race with more AI opponents than usual, make sure you set the "Starting Grid position" for each AI racer correctly.  For example,  "Player Car" is usually set to "Last Place"; "Opponent #1 or Player 2"  is "Last Place +2"; "Opponent #3" is Last Place +3"; etc.  If this isn't set correctly, the AI racers will spawn on top of one another and will be forced to do an extra lap.

Everything else in the file is good!  :)
Title: Re: Using ghost files to customize a race [NFS4]
Post by: Neoguto on Mar 27, 2022, 8:45 AM
I believe I see the problem...

The info from the ghost file tells me you are trying to run a single race with 13 AI racers.  However, under the "Opponent Cars.." tab, there are many opponents whose serial number is assigned a "0" (Zero).  This must be set to a number between 1 and 49 or else the game will see your file as corrupted. 

You can use the Serial Number Editor to determine a car's serial number.

Also, since you are running a race with more AI opponents than usual, make sure you set the "Starting Grid position" for each AI racer correctly.  For example,  "Player Car" is usually set to "Last Place"; "Opponent #1 or Player 2"  is "Last Place +2"; "Opponent #3" is Last Place +3"; etc.  If this isn't set correctly, the AI racers will spawn on top of one another and will be forced to do an extra lap.

Everything else in the file is good!  :)
So, I think i understood how to use correctly now.

Everytime I wanna run with more than 8 opponents, I need to change his serial numbers and put the correct grid position to them.

Wel, thanks a lot and I'm gonna try to change that and test now.
Title: Re: Using ghost files to customize a race [NFS4]
Post by: pete9516 on Aug 03, 2022, 7:44 AM
Hello guys, i'm having a problem with tickets per speeder. I hope somebody can help me, because i don't know anymore what to do. When i play Getaway with some other racers and additional traffic (16 slots), i can get about a billion maximum tickets. But i want it to be like original Getaway and have only 1 ticket. But my settings are okay, aren't they?
Title: Re: Using ghost files to customize a race [NFS4]
Post by: DrSpeed on Aug 03, 2022, 8:57 AM
Try setting "Tickets Per Speeder" to 1.
Title: Re: Using ghost files to customize a race [NFS4]
Post by: mikawagnerbr on Aug 03, 2022, 1:59 PM

Could someone provide a ready table (to be copied) for a Single Race race with 15 AI opponents?
So far I can't get it to work at all...Only Single Race racing interests me
Title: Re: Using ghost files to customize a race [NFS4]
Post by: pete9516 on Aug 05, 2022, 6:23 PM

Could someone provide a ready table (to be copied) for a Single Race race with 15 AI opponents?
So far I can't get it to work at all...Only Single Race racing interests me
This information should be in the user manual, but you can only have a racing grid which contains 14 cars in total
What's also very important is the order: 1.Racers, 2.Cops, 3.Traffic
You really need to read the user manual. It's a cheat table. This changes values in memory adresses in an executable file. It's not a tool that does the work for you. It "only" provides the possibilities there are with ghost files
Title: Re: Using ghost files to customize a race [NFS4]
Post by: pete9516 on Aug 06, 2022, 8:16 AM
Try setting "Tickets Per Speeder" to 1.
Unfortunately, this doesn't solve the problem. May i provide the ghost file in here for further investigation? I think this is some limit related issue. But i'm just reading the user manual to find out what might be the problem. Anyway i guess that this problem won't be stated in the user manual.
EDIT: I use a whole custom grid with additional cars.
Title: Re: Using ghost files to customize a race [NFS4]
Post by: pete9516 on Aug 06, 2022, 9:50 AM
Nevermind, i was able to create a Getaway ghost file by taking the provided "NFS3 HP Style Flip side.gst" and turn it into a Getaway race with 8 racers, 4 cops and 4 traffic cars.
Here it is
Title: Re: Using ghost files to customize a race [NFS4]
Post by: Zalcus20 on Aug 06, 2022, 11:30 AM
When creating a custom getaway mod where you are not the only racer, it is important to set the "#Tickets Quota" accordingly.

For example, if you are playing as a racer with 7 AI racers and you want the max number of tickets for each of you to be 1, set the #Tickets Quota to "8". If you want each racer to receive 2 tickets max, set the quota to "16".

I plan to update GST Editor with a few more custom pre-configured races that you may feel free to use as a base for your gst file editing needs.
Title: Re: Using ghost files to customize a race [NFS4]
Post by: pete9516 on Aug 06, 2022, 12:36 PM
When creating a custom getaway mod where you are not the only racer, it is important to set the "#Tickets Quota" accordingly.

For example, if you are playing as a racer with 7 AI racers and you want the max number of tickets for each of you to be 1, set the #Tickets Quota to "8". If you want each racer to receive 2 tickets max, set the quota to "16".
That's what i did before i posted the screenshots, but it just didn't work. Probably the ghost file was just corrupt. But i want to know why :D Damn
Title: Re: Using ghost files to customize a race [NFS4]
Post by: Zalcus20 on Aug 06, 2022, 12:48 PM
I sometimes experience a similar problem with some gst files. On one I was trying to create a max opponent race (me with 14 AI racers), but the game kept crashing. Just like you, I couldn't figure out why this was happening, although I set everything correctly. >:(

I decided to start over with another ghost file and voila! The game loaded the race successfully.  :o 8) 

Maybe there are some more addresses in the gst files that we haven't discovered yet that control these factors.
Title: Re: Using ghost files to customize a race [NFS4]
Post by: DrSpeed on Aug 06, 2022, 1:05 PM
I've encountered random crashes as well. I eventually found out that I removed 3+ cars from the game (that was not loaded by the gst file).
I readded them again and it worked. Removed them once more, but then I added 3+ completely different cars and that also worked.
So maybe it's a good idea to create a new file if you add/remove lots of cars.
Title: Re: Using ghost files to customize a race [NFS4]
Post by: 007zolee007 on Nov 25, 2022, 9:59 AM
Is it possible to add traffic into career mode with this?
Title: Re: Using ghost files to customize a race [NFS4]
Post by: pete9516 on Nov 25, 2022, 11:45 PM
Is it possible to add traffic into career mode with this?
No. For this kind of stuff you need Cheat Engine and the adresses which control the traffic function.
Title: Re: Using ghost files to customize a race [NFS4]
Post by: meyeber on Dec 01, 2022, 1:08 PM
That's very cool VEG, I do hope that'll be a fully functional feature someday. Did a quick test with Cheat Engine and managed to achieve a somewhat similar result.

Which reminds me, I've done a Cheat Engine Table for NFS3 that does pretty much the same thing that I've done here (Cheat Engine doesn't work with NFS4 that well). I've also set it up so it's using regular numbers instead of HEX.
I'll create a topic about it when I've added enough stuff.  :)


Please where can I download this mod Cheat Engine Table for NFS3
Title: Re: Using ghost files to customize a race [NFS4]
Post by: AJ_Lethal on May 30, 2023, 5:22 PM
Okay I downloaded GST Editor and Cheat Engine then I went to my NFS 4 Game and go to a single race
and quit the race and saved the ghost file then I opened GST editor and opened the ghost file
and I'm stuck I can't save my customize ghost file.
I would like someone please show me how to do this so I can learn.
You save your file by going to File > Save File (Shift+Ctrl+S)
(https://i.imgur.com/RKJdSCp.png)

Ghost files should be placed in the savedata\saves folder of NFSHS
Title: Re: Using ghost files to customize a race [NFS4]
Post by: AJ_Lethal on Jun 03, 2023, 3:48 PM
I'm still having trouble getting it to work and how do I save my gst file in cheat engine 7.5
What is *exactly* the problem you're having? Given I told you in the other post how to save your ghost file, yet you ask again like if you don't know. Does any error pop up on saving? Ghost file does not appear in the game folder you're saving to? It's hard to help you if you provide little to no info on what were you doing or what happens on your end.
Title: Re: Using ghost files to customize a race [NFS4]
Post by: AJ_Lethal on Jun 03, 2023, 4:22 PM
and then when I'm done tweaking my settings In cheat engine and go to where it says
save and it saves to a cheat table file instead of ghost file so I go back and save again then I launch the game and load the ghost file nothing happens its still the same ghost file.
Well, that's where you went wrong: File > Save is for saving the cheat table; you should have used File > Save File instead to save the ghost file as shown in the other post's image. Let me point out it where it is since you have somehow missed it:

(https://i.imgur.com/M1wufpV.png)
Title: Re: Using ghost files to customize a race [NFS4]
Post by: Kevin K on Jun 09, 2023, 5:16 PM
Hi this is Kevin Well let's say I'm having some fun with this ghost car customize thing here.
I'm starting to get the hang of it. I created a customize hot pursuit race with 7 ai cops and 1 racer.
boy that was fun.  Now my next question Is I'm trying to figure out.
how do I save a ghost file for a hot pursuit race I would like to know more about it
like I can go to a single race mode and create a ghost file, but I can't do it with a normal hot pursuit race
I'm just kind of wandering how do you that.


Title: Re: Using ghost files to customize a race [NFS4]
Post by: AJ_Lethal on Jun 09, 2023, 5:43 PM
Simply start a hot pursuit race, quit to results screen when the race starts and quit the game. Then go to the SaveData folder of the game, copy the ghost.gst file to the Saves folder, rename it if you want and edit it with GST Editor
Title: Re: Using ghost files to customize a race [NFS4]
Post by: Kevin K on Jun 09, 2023, 6:46 PM
Thank You  8)