F1 2014 AI modification - Full guide.

F1 2014 The Game (Codemasters)
(September 8th, 2023)
(Edit 1: December 1st, 2023)

Hey guys! This guide will show you how to completely transform the AI racing experience to a brand new level for F1 2014 game.
-------------------------------------------
0. Intro
Since its release in October 2014, the original F1 2014 has been known as one of the worst F1 games Codies has ever produced. One of the worst aspects is the horrible handling as well as the AI behavior. Therefore, I'm gonna show you a full guide how to make a complete AI Mod. Even if you're an AI modder, you may learn more from this comprehensive guide.

These are the key tools for you:
- EGO Database Editor
- EGO File Converter (recommended version 2.1.2016.1119)
- EGO CTF Editor


Before you start making any changes, read the whole topic. When you know more, you're gonna make it better. And remember to enable showing file name extensions in File Explorer!

1. How to use the tools?
1.1. EGO Database Editor
Just open the program, open your database file (your game directory/database/database.BIN this is the database file) and start editing. Make sure you've made a back-up of the original file in case something goes wrong.

1.2. EGO File Converter
Besides the database file, the other files you need to modify all have XML format. Use Notepad to open them. You'll see in most of those XML files, there are strange characters. That file is NOT EDITABLE YET. Therefore, close the file and convert them into editable format:
- Open a separate window and get into where you installed EGO File Converter.
- DO NOT OPEN the EGO File converter EXE file, it closes itself immediately and you don't get anything. Instead, drag and drop your XML file you need to modify onto the mentioned EXE file.
- You'll see a new file added with double .XML at the end (for instance, abcxyz.xml.xml). Remove the original file, then rename the converted file by removing one ".xml" (for instance, from abcxyz.xml.xml to abcxyz.xml).

NOTE: You can convert multiple files in the same folder simultaneously, this saves your time!

1.3. EGO CTF Editor
Open the program, open the CTF file (game directory/cars/xx2/balanced(track)/xx2_"trackname".CTF) and modify. When you save, you have to select a column first! Make sure you've made a back-up of the original files in case something goes wrong.

2. AI Behavior
First of all, mega mega thanks to @Kristian Nenov for his AI guide. Even though it was for F1 2011 game, most of his guides are working for F1 2014 too. They were extremely useful for me as I was getting used to modifying AI's.

2.1. Ai_driver_config.XML - credits to Kristian
The files that are responsible for the behavior of the AI are at the "ai" folder. The most important of them is "ai_driver_config".

When you open it, you'll see that there are strange abbreviations like "Hv" "Ov" "tg" and etc. All of these mean something. Here's the list of the meanings:

rm = Race Manager
th = Throttle
br = Break
tg = Tail Gate
as = Along Side
rt = Retirement
df = Draft (Slipstream)
rc = Recovery
ra = Race
ov = Overtake
vl = Vision Lost
bl = Block
av = Avoidence
rs = Race Start
co = Co Driver (Team Mate)
sq = Squeeze
tr = Track
atg = Anti Tail Gate
lc = Lost Control
cr = Crash
sc = Safety Car

Now when you know what these mean, I'll try to explain how the most important rows of the file work.

<rmCurvatureMultiplier float="1.6" /> - Do not touch this or it may bring bugs.

<scTargetSeparationTime float="0.2" /> - This is the distance that the first car will keep with the safety car. Higher value - more distance.
<scInLapLeadSeparationTime float="15.0" /> - Like above, but this is only when SC is going into the pits.
<scBrakingPerformance float="0.8" /> - How good is the safety car under breaking.
<scCorneringPerformance float="0.85" /> - How fast will the safety car take the corners.
<scMaxThrottle float="0.68" /> - How much throttle will the safety car driver give. Higher value results in faster safety car.

<rearWingMaxCurvature float="0.01" /> - If you make it to "0.02" for example, the AI will start trying to use the rear wing (DRS) on bigger corners. I prefer not touching it because it results in spinning AI's due to DRS.
<rearWingMinSpeed float="25.0" /> - The minimum speed that they activate their DRS on.
<rearWingMinDistanceToNextCorner float="200.0" /> - If you make this value lower (for example 50) the AI's will use the DRS even on a small straights when the next corner is very close. The value is in METERS.

<tgOffsetMergeFactor float="2.5" /> - I don't understand very good these "offset factors" but I think with a higher value, the AI is driving like he's more stressed. I mean, not so smooth, more aggressive and etc.
<tgNonOptimalSpeedFactor float="0.6" /> - If the car ahead is under that speed (I think it's in % or something.), it won't slipstream it because it's too slow.
<tgClampOffsetLeft bool="true" /> - Should it move left (to overtake) the slipstreamed car.
<tgClampOffsetRight bool="true" /> - Should it move right (to overtake) the slipstreamed car.
<tgUndersteerMaxOffset float="2.0" /> - If you set it to lower value, the AI will crash into each other trying to alongside the car ahead.

<asRejectDistance float="7.0" /> - How close should the AI car (behind) get, to start breaking (so it doesn't crash into the car in front).
<asTargetBuffer float="-3.0" /> - I used this to improve a little the overtakes. The car that is getting overtaken is under stress and this value "-3.0" is slowing him down due to the pressure. It is originally "-2.0".

<damagedMaxThrottle float="0.6" /> - When the AI has broken wing, tire or something it drives slower around the track. This is the max % throttle that the AI should give. It is originally set to 0.6 (60%).
<damagedCurvatureModifier float="0.6" /> - Same as above but this is the speed that the AI is carrying through the corner.

<dfMinDraftSeperation float="1.25" /> - The separation (in seconds) on that the car behind will try to slipstream the car ahead. If you make this to "2.0" for example, it will try to slipstream when it's a lot behind.
<dfBrakeZoneLimit float="50.0" /> - This value is in METERS. It makes the AI not to slipstream, when the breaking zone (point) is 50 meters away.
<dfTrackCurvatureLimit float="0.005" /> - Slipstream = understeer. With a corner bigger than "0.005" - the AI doesn't slipstream so it can take the corner properly.

<rcResetAllowed bool="false" /> - If you set this to "True", the AI car will be able to reset to the track when they've crashed. By reset I mean the "R" button in NFS or when you press ESC sometimes you get "Reset to track" on this game. It will use this. It's very unrealistic, I've never set it to True and I think no one would want this to be "True".

Now all of these are the things that mostly matter for overtakings by AI.
<ovTime float="0.6" /> - The lower value - more aggression the AI has. It's like this because this is the time that the car behind gives itself to overtake the car ahead. If you make it to "5.0", they won't try to overtake that much, because they're not on such "hurry". :D
<ovBrakeOvertakeTime float="0.0" /> - This should be for overtakings under breaking, but it doesn't really work, so changing this value will result in NOTHING.
<ovRejectDistance float="500.0" /> - When the car ahead escapes from the car behind in this value (this isn't meters) - it won't try to overtake it anymore and it will forget it.
<ovSpeedDifference float="9.1" /> - When the value is lower, the AI will try to overtake at minimum speed difference. It brings problems under breaking because the car ahead breaks first and the car behind wants to overtake it because it's slower and it crashes into it.
<ovFollowDistance float="1.0" /> - I don't know why it is 1.0 for me! I thought I changed it! Anyways, this is the distance that the car behind will keep with the car ahead before going alongside it. I hope you understood that.
<ovMinFireTime float="0.0001f" /> - I played a lot with this and I didn't find out what exactly is doing. I think when it's a lower value - the AI overtakes better.
<ovMaxCornerCurvature float="0.07" /> - The biggest corner that the AI will try to overtake on will be "0.07". I don't understand these values. How do I calculate a corner? But anyways, you don't really need to touch this.
<ovMinMetresSeparationAwayFromCorner float="10.0" /> - The minimum separation in METERS that the two cars should have before a corner. If you make this value too low, they'll crash under breaking.
<ovSeparationDistanceAtBrakeLine float="50.0" /> - The separation at the breaking point.
<ovSecondsBeforeBrakeZoneToReact float="1.6" /> - When this is set to 1.6, the AI trying to overtake will stop giving more throttle 1.6 secs before the corner so they don't crash. I tried to change this value to a smaller one so we can get overtakes in corners and we got overtakes in corners but many people started moaning because they're using damage multipliers, so it's a tricky value.

<blOffsetMergeFactor float="0.2" /> - No effect
<blMaxBlockeeDeceleration float="5.0" /> - No effect
<blMaxTrackCurvature float="0.005" /> - No effect
<blMinIntersectionTime float="1.0" /> - No effect
<blMaxIntersectionTime float="4.0" /> - No effect
<blMaxSpeedDifference float="20.0" /> - No effect
<blBrakeLineDistMin float="50.0" /> - No effect
<blMinValidBlockingMovement float="9.0" /> - No effect
<blCornerCurvatureToBlockToTrackInside float="0.015" /> - No effect
<blMinSpeed float="25.0" /> - No effect

<rsStallPercentage float="2.0" /> - How many % every AI car has to stall at the race start. Even with 2%, they don't stall a lot.

<trTrackCurveOfflineRatio float="1.0" /> - This value regulates the AI cornering speed. It's not exactly in %, but it is usually set to "0.6". I made it to "1.0" so the AI carries more speed through the corners. DO NOT make it more than 1.0 because it will take it as "0.0" and the AI will be slower.

2.2. Ai_vehicle_config.XML
NOTE: there are two such files, one right inside the "ai" folder and the other in the "era_2013" subfolder. You have to modify the latter one.

Here are the 2 key lines:
<trackGlobalPredictionModifier float="1" /> - the higher the value, the slower the AI's take corners.
<trackGlobalCurvatureModifier float="1" /> - the higher the value, the faster the AI's take corners.

If you find the AI's on a particular track too fast or too slow, you can add these 3 lines at the end of the file to re-adjust the AI's cornering speed. This is my example for Abu Dhabi, the AI's at "1" are too fast:
<vehicle_type name="abu_dhabi">
<trackGlobalCurvatureModifier float="0.92" />
</vehicle_type>

2.3. Ai_driver_parameter_mappings.XML

Firstly, thanks to @StrongestFish and @PaoloManzi for guiding me on this file as I started working on the AI's.
Here are the key lines you guys want to modify (I already changed the values in my version)
<mapping ai_variable="corner_brake_distance_factor" characteristic="speed_in" type="NEFloat" value="1.0" num_limits="4">
<limit difficulty="0.0" characteristic_value="0.0">1.22</limit>
<limit difficulty="0.0" characteristic_value="1.0">1.14</limit>
<limit difficulty="1.0" characteristic_value="0.0">1.06</limit>
<limit difficulty="1.0" characteristic_value="1.0">0.98</limit>
</mapping>

Here, the lower the values, the later the AI's will brake on every braking point on every track, and vice versa. However, this does not make the AI's to stop backing off excessively when they're at the inside of corners - I'll mention this long standing problem later.

Another key line you want to modify is:
<mapping ai_variable="wet_weather_ability" characteristic="wet_weather_ability" type="NEFloat" value="1.0" num_limits="4">
<limit difficulty="0.0" characteristic_value="0.0">0.88</limit>
<limit difficulty="0.0" characteristic_value="1.0">0.91</limit>
<limit difficulty="1.0" characteristic_value="0.0">0.88</limit>
<limit difficulty="1.0" characteristic_value="1.0">0.91</limit>
</mapping>

This one regulates the AI's overall speed in wet weather. The lower the values , the slower the AI's become when it rains and vice versa.

3. Modifying AI difficulties
The file is called "ai_track_difficulties.xml". You can find it following this path: game directory/tracks/circuits. There are two of them - use the one inside "era_2013" subfolder.

The AI's in F1 2014 are divided into 5 difficulties, this file helps you regulate the overall speed of all AI's on each track in each difficulty.

You see there are lots of lines like this:
<track name="blabla" Amateur="0.3" Intermediate="0.55" Professional="0.75" Expert="0.9" Legend="1.0" virtual_performance_multiplier="1.6" />

The values are self-explanatory: the higher values lead to faster AI's. If you make the values go over "1.0" the game reads it as "1.0".
virtual_performance_multiplier - This one is for the lap times when you accelerate the timer during practice/qualifying sessions, it isn't capped, so no limits!

4. Database - once again, credits to Kristian!
Now.. There are a LOT of things that you can change here. I'm getting tired of writing all of this, so I'll stick with the most important.

4.1. Ai_driver tab
You can see a lot of things there. Aggression, Mechanical Failures, Speed_In, Speed_Out, Virtual Performance.
All of these are capped at "1.0". Making it over 1.0 will result in the game reading it as "1.0".

Some key columns:
Aggression: AI's race pace. the better values, the more aggressive the AI becomes, they will try to overtake more often
Control: AI's raw qualifying pace. the better values, the more quali pace the AI has so as to improve his quali time and position.
Speed_in, speed_out: regulates the AI's corner entry and exit speed. the better values, they will take a corner faster, thus improving their lap times.
I don't think I should explain the rest as it's pretty clear.

4.2. Ai_tier_characteristics tab
All the teams are divided into "tiers" for defining the pecking order.
If you make the tier 1 values to "0.2" - even a Mercedes can lose out to a Caterham or Marussia. If you make tier 4 teams to "1.0" - they will fight for the win. It's as simple as that.
NOTE: Tier 3 and 4 teams always use softer tires in Q1, while tier 1 and 2 use harder tires.

4.3. F1drivers tab
If you want to change the drivers' stats, or nationality etc. go here. you can also use the drivers' id for team transfers in F1drivers_f1teams tab.

4.4. F1drivers_f1teams tab
This tab is mostly for switching the first/second driver within each team, or making team transfers. just note that if you wanna make transfers, you need to re-check the livery id column, in Vehicle_livery tab, otherwise the game crashes.

4.5. F1teams tab
You can balance the team's performances from here. There are 2 ways to do it:
- Change their tier.
- Change their virtual performance.
You can change the team's nationality as well by changing the id's.

4.6. Track_model tab
Just look what information you can change here. It's quite too long but it's pretty easy to understand (as everything about the database). Make sure that track length is in Miles and top speed stat is in Miles per hour.

Now we're coming to really advanced guides, but they require great deals of patience as well as trials and errors and obviously it's not fun to keep re-adjusting all the time. It's up to you whether give your nerves a bit of a challenge by doing this.

5. How to modify the car handling for every team?
The CTF files within each team's folder are responsible for this.

The path is: game directory/cars/xx2/balanced(track)/xx2_"trackname".CTF

Balanced: all the CTF files there regulate the AI drivers' speed and handling for each particular team.
Track: same function as Balanced, but for the player's car.

When you open the CTF file, you see hundreds of lines. I'll point you out which lines needing to be modified:​
- To lower downforce, decrease the values in lines 5-8 and 14-17 (both AI and player's car)
- To increase straight speed, decrease the values in lines 3, 4, 20 and 22 (both AI and player's car)
- To further increase cornering speed , decrease the values in lines 47-49 (only for AI cars)
- To make gears shorter , increase the values in lines 170 and 172-178 (only for player's car)
- To increase the grip for even better cornering and race start, increase the values in lines 183 & 184 (both AI and player's car)
- To change mass, change the value in line 213. Heavier = slower and harder handling. (both AI and player's car)
- To change the dirty air effects, change the value in line 19. More value = more dirty air. (both AI and player's car)

 
Last edited:
6. AI braking points and speed on each corner, track-by-track
6.1. Intro

The AI's in F1 2013 and 2014 are notorious for braking annoyingly and excessively early at the inside of many corners, such as Melbourne turn 1, Bahrain turn 4, Brazil turn 4 and Austin turn 3. In the past 9 years, lots of changes have been made in order to improve the AI racing, but no such attempts have been successfully done to solve this long standing issue. I started working on this from scratch with a little help. The main idea is to "move" the gates forward, so that the AI's have less braking range, therefore reducing their chance of braking excessively early mentioned above. This guide is gonna change the game forever - I'm not exaggerating!

6.2. Ai_vehicle_track.XML
You can adjust the AI's speed track by track via this file. Just open your game directory/tracks/circuits/"trackname"/route_0. There are 2 files - use the one in era_2013 subfolder!

Now you can see a lot of lines. You'll have to experiment a little with them till you fully understand how everything works.

You can see that there are lines like this:

<brake_line id="0">
<brake_line id="10">
<brake_line id="15">


This is the braking point's ID. Note that:
- When the ID's are 900-ish or 910-ish, it is for the ones in the pit lane.
- When the ID's are 990-ish, it is for the first few corners in first lap of the race.
- All braking points are corners, but not all corners are braking points. In some corners the AI's are going flat-out so no braking points there.

I've compiled the corner ID's for every compatible tracks for F1 2014 game here:
Now, the only values you'll be changing on corners are:

6.2.1. Distance_modifier
distance_modifier is for the braking distance. For example, the 1st turn (brake line 0) it's like this:

distance_modifier="0.90"

If you make it to 1.00, the AI will brake a lot earlier. If you make it to 0.80, the AI may not have enough time to brake and will go into the grass. The outcome is also affected by the AI's handling (CTF files) mentioned above, and of course, the "corner gate" that I'll explain later.

In many files you'll see distance_modifier_med_grip and distance_modifier_low_grip as well. These ones regulate the braking distance in intermediate and full wet conditions, respectively. You can edit them to adjust the AI's performance when it rains, on each corner of the track. If distance_modifier_med_grip and/or distance_modifier_low_grip are absent, the game will use the ordinary distance_modifier.

6.2.2. Curve_modifier
It regulates the speed carrying through the corner. The higher the number - the faster the AI's take the corner.

Similar to distance_modifier, you'll see its variants with med_grip and low_grip, for inters and full wets respectively.

Other values such as curve_modifier_left, curve_modifier_right, etc. I don't really see any effects so better not to touch them.

Mind that sometimes if you make the curve_modifier bigger and make the AI brake a little earlier, you may get a better result than making them brake as late as possible.

6.3. Ai_track.xml (KEY GAME CHANGER!)
As this file is extremely long and vital this section will be divided into different parts.
6.3.1. Structure
This file is divided into these parts:
6.3.1.1. Track gates. They are used for determining the AI's racing line on the track. Each gate has info like this:
<gate id="0">
<position format="float3">54.80 3.06 628.84</position>
--> The optimal line on track. You should not change the coordinates unless you want to try a new layout such as Catalunya without the last dreaded chicane.
<normal format="float3">0.703447 0.0 -0.710745</normal> --> How much around optimal line while battling.
<waypoints num_waypoints="5"> --> ID 0-3 self-explanatory, more negative = more left, more positive = more right. Don't overspread it or the AI's will go off track on purpose while battling.
<waypoint id="0" type="left_track_limit" length="-2.27" />
<waypoint id="1" type="right_racing_limit" length="25.92" />
<waypoint id="2" type="right_track_limit" length="12.96" />
<waypoint id="3" type="left_racing_limit" length="-4.54" />
<waypoint id="4" type="racing_line" length="0">
--> Negative value = left deviation and vice versa. Recommend not touching this.
<racing_line type="optimal" />
</waypoint>
</waypoints>
<edges num_edges="0" />
</gate>

6.3.1.2. Track gate links.
Each link has a specific ID. I'll explain how it works through an example, because this is key thing for you to adjust the AI's braking points below in the file. You guys should not ever touch this section otherwise the game will crash on that track.

First line is often like this:

<link id="0" from_gate="306" to_gate="0" />

This indicates how many "gates" there are on a normal race lap. Note that id 0 is the first gate, id 1 is the 2nd gate, etc. so id 306 is the 307th gate. Therefore, a lap is "307-gate" long in this example.

Scroll all the way down to the line linking from gate 305 to 306. You'll see the next line like this:

<link id="307" from_gate="307" to_gate="308" />

From id 307 is the "track gate" for the first lap. Keep scrolling down until you see a gate link from a greater id to a lower id, like this:

<link id="349" from_gate="349" to_gate="44" />

This means the end of the "gates" for first lap.

The rest is the "gates" for the pit lane.

6.3.1.3. The brake lines. Each of them has a specific id as well as a gate id. You can see lots of familiar names such as distance_modifier or curve_modifier... these values work as the Multipliers for their respective counterparts in Ai_vehicle_track mentioned earlier.

6.3.1.4. The hold lines. Each braking point has its own "hold_line" indicated by the "gates". This means, after this "gate" the AI driver will not be in this braking point zone anymore.

For instance, you see this line:
<brake_line id="0" gate_id="16">
And scroll down, you see this:
<hold_line id="0" gate_id="35" brakeline_id="0" />
This means, the whole braking point zone is from gate id 16 to 35.

6.3.1.5. The min speed lines. How this works will be explained in 6.3.2.

6.3.1.6. The Rest - you do not wanna touch anything of the latter part of this file.

6.3.2. How to edit this thing?
First, install my Excel file to know which corner ID is for which turn on each track.

Then, open the Ai_track file and scroll all the way down to the Brake lines (see 6.3.1.3). Take note of the original gate id (Let's call this one X) as THIS IS WHERE YOU NEED TO EDIT THE BRAKING POINTS.

Continue scrolling down to the Hold lines (see 6.3.1.4) and take note of the gate id as well (Let's call this one Z). DO NOT CHANGE ANYTHING HERE.

Then, go to the Min speed lines section (see 6.3.1.5). You may assume that each of its id corresponds to the Hold lines with same id, but in fact it is not.
Instead, you need to check its gate id (Let's call this one Y) and compare to X and Z values.
If X < Y < Z, then this is the brake line id corresponding to the corner id you're checking.

Let's take this as an example:
Here you have this brake line:
<brake_line id="0" gate_id="16"> (X = 16, variable)
The hold line corresponding to that corner is:
<hold_line id="0" gate_id="35" brakeline_id="0" /> (Z = 35, constant)
You need to find the min speed line whose id is between 16 and 35. We see that:
<min_speed_line id="0" gate_id="21" min_speed="15.00" /> (Y = 21, constant)
Therefore this is the min speed line corresponding to this corner.

Y and Z should always be unchanged. At the brake line gate id (X), the AI's will start braking until reaching the Min speed line id, after which they'll start speeding up again.

This is where the problem of the AI's braking excessively early lies.

Each corner has its "Braking Range", which is between X and Y. Its length is measured in "gates". The longer it is, the more chance the AI's will brake excessively early.

Just take the example above:
<brake_line id="0" gate_id="16"> (X = 16)
...
<hold_line id="0" gate_id="35" brakeline_id="0" />
(Z = 35)
...
<min_speed_line id="0" gate_id="21" min_speed="15.00" />
(Y = 21)
The length of the "braking range" is 5 gates.

What you wanna do is to "increase" the X value. Note that X cannot be greater than Y. Y and Z are fixed.
When you modify like that, the AI's will brake way later into the corner and take the corner at higher speed. The "Braking range" is also shortened so the AI's will become less likely to brake-check others at inside line like before.

Note: when you modify like that, there's also a chance the AI's will go into the grass or crash into the barriers at the corner. In this case, there are 3 solutions (you can do all 3):
- Slightly decrease the X value, one by one. This means the AI's will be more ensured to have enough distance for braking, but they'll be more likely to brake-check others at the inside line like before.
- Re-modify the corner in "Ai_vehicle_track.XML" file. Its id is the same as in "Ai_track.XML" file. Raise the distance_modifier or reduce the curve_modifier values so the AI's can take the corners more properly. (see more at 6.2)
- Make the AI's handle corners better by editing the CTF files. (see more at Section 5)

7. Conclusion

This is all the methods I used to massively improve the AI's racing experience and change F1 2014 forever. It has taken me loads of time and nerves working on it, I was happy with the final results which is what you experience in my F1 2023 Revolutionary Edition Mod for F1 2014 from Version 2.1.0 onwards:

This full method works for 2013 and 2012 too (note that for 2012 there's no era_blabla subfolder)

If you have any questions, feel free to ask!:inlove::inlove:
 
Last edited:

Latest News

Are you buying car setups?

  • Yes

  • No


Results are only viewable after voting.
Back
Top