As I promised, I'll tell you how you can add additional AI-drivers to a race by simply edit a ghost data file.
What you need:
A HEX editor - I'm using HxD
Basic knowledge using HEX-values
Notepad - not really needed, but it's very useful to keep track of all the values
I'm using VEG's modern patch for NFS4, but I don't think it's required
Although this method is kind of advanced, sometimes it requires trial and error to achieve what you want.
(If you don't know how to use HEX editors,
method on using Cheat Engine instead, which is also much easier).http://www.nfsaddons.com/forums//index.php?topic=1831.msg33827#msg33827
First things first:
Simply launch the game and choose either a normal Race or Hot Pursuit. I recommend that you don't choose Carrer, Knockout or Tournament modes, the game might just crash later on. In this example I'm going to choose Hot Pursuit and I'm going to drive a police car.
It doesn't matter what settings you have, you can change them later on. I'll also choose the classic gamemode, since I'm not so into getaway and time trap. Start the race. When the lights turn green and the AI starts to drive away, pause the game and exit. You can complete the race if you want, but... weird things happends if you do.
Since we can't save a ghost file in Hot Pursuit mode, we need to get it manually. Navigate to the SaveData folder and locate the ghost.gst file. This is the ghost file that records the latest race you did, even if you didn't complete it (also, look when it was last changed). Make a copy and change the name of it. I'll name mine: cop_07a.gst. Remember: when you're done with the editing, move it to the SaveData/Saves folder.
Now open the Hex-editor and look down here on what you can change:00000FEC-00000FEE
= XYZ Location (Getaway mode only)00000FF0
00 = Single Race
01 = Tournament
02 = Knockout
03 = Hot Pursuit00001098
= Opponent Skill
00 = Amateur
01 = Pro
02 = Champion0000109C
= Hot Pursuit Gamemode
00 = Classic
01 = Getaway
02 = Time Trap
(Thanks to Zalcus20
for finding the 4 above addresses.)000010A4
= Tickets Quota
Number of tickets for the police team. It should be a value that can be divided by 2. I feel skillful enough, I'll increase this to 14 (20 tickets)000010A8
For each speeder. Since the police team must get 20 tickets, each speeder needs to have 10 tickets. So this value must be 0A. And if I change so there's 3 speeders in total, that value needs to be divided by 3.000010E8
= Number of Laps: 2, 4 or 8 (you can use any number but I wouldn't recommend it)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
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 = Summit
12 = Empire City
Note: If you completed a race and change this value, you'll notice that the ghost will in fact follow the track around, but will be facing the wrong way and will sometimes teleport to the center of the track. Amusing to watch but could crash the game.00001140
= Number of Cars
How many cars will there be in the race? This is more advanced and there's a pretty complex way to increase the number of drivers. Max value: 10 (16 Cars).
This post is going to be very long so I'll write that down another day. Hot pursuit is always set to 09. Set it to 07 to remove traffic.
Let's leave it as it is and I'll teach you how you can add 2 additional police cars (replacing the traffic cars).
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
Believe 10-12 characters is the max limit here?00001170
This is the car serial number. To load from the traffic folder, this value must be: FF FF FF FF).00001174
= Car in menu list
Where in the carlist does the car appear? If your car is selectable in the menu, this value is not required to change. Traffic cars have these 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 Caprice0000117C
= 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=Cop00001188-0000118B
= Primary Color
The color of the car, RGB(?) and Transparency. The ghost will always have the same color as player one.
Example: 05 05 05 7F = Black with 127 Transparency.00001180
= Transmission (0=Manual, 1=Auto)00001184
= Convertible Mode (0=Top up, 1=Top down)
(Thanks to Zalcus20
again for finding these 2.) So, let's transform the 2 traffic cars into police cars:
Name:00001470 and 000014E0
The police have the same names as they did in NFS3:Shield, Smooth, Trigger, Blue, Moose, Blender, Fancy, Sterno
In game, their names is replaced with "Unit(nr)" so basicly, call them anything.
- This dude can have the Hatchback police:FF FF FF FF F6 01000014F0-000014F5
- And let's give this guy the La Niņa police car:31 00 00 00 xx 00
- xx is where the La Niņa police shows up in your drop down list. This is a playable vehicle, so leave it or give it a low value.
AI:0000148C and 000014FC
is default to: 04, change them to 08.
That's all you need to know. Give it a test to see if it works.
Here's some examples on what you can do:
8 Cops + 6 Traffic + AI using any car
4 Speeders + 8 Cops + 4 Traffic vehicles
12 Racers + 4 Traffic vehicles
I do 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.
Have fun racing!