Assetto Corsa Realistic Trackday

Assetto Corsa Realistic Trackday v0.9.8

ad8cd56e-59d9-4f5e-9205-4c51013f69c4

Assetto Corsa Realistic Trackday is an app for Assetto Corsa which alters the AI cars' behaviour to act like humans driving on a track day aware of other cars as opposed to bots with horse blinkers constantly driving the racing line.


Using this app, AI cars will yield to faster cars by driving to the side and only yielding to one pre-defined side (left or right) as is the way during trackdays, particularly on the Nordschleife. AI cars will also overtake other cars on the other side and return back to the racing line once it's safe to do so.

This provides the user a smooth single-player driving experience with AI cars where the vehicles respect each other while driving and act like real drivers do.


7e70ad67-8aa5-435e-8da1-5f6fb3c87325





My main aim with this is to recreate the true Nordschleife Touristenfahrten experience where by law you are required to overtake only on the left and thus yielding cars always need yield to the right:

6080f0a1-425d-4202-a7d8-81662d4f33c2


Source: https://nuerburgring.de/info/company/gtc/driving-regulations

Videos

Assetto Corsa Realistic Trackday v0.9.8 - Full Feldbergring lap:


Full Nordschleife lap on Realistic Trackday v0.9:


Short video of Realistic Trackday v0.5:


v0.9.8 - Major Update - Improvements across the board!

Realistic Trackday v0.9.8 brings a lot of new features over the previous v0.9.1 version, notably the number of tweakable options now available to the user.

Per-Track-Per-Mode Settings

One of the first important changes is that the app now saves settings Per-Track-Per-Mode where Mode can be any one of the following values depending on how the game is launched from the Content Manager:
  • Practice
  • Qualify
  • Race
  • Hotlap
  • TimeAttack
  • Drift
  • Drag

43a000b4-433d-4fcc-88c9-9e550f57ddbe

This means that you will have separate settings for, for example, running a trackday on the Nordschleife versus launching a race on the same track.

App now starts disabled until enabled for the current Track-Mode combination

Another important change is that now, unless previously enabled for the current Track-Mode combination, the Realistic Trackday app starts disabled and you have to enable it from the Realistic Trackday Settings. This change was done so that the app doesn't modify the AI cars' behaviour unexpectedly.


b86faa8b-326b-4eaa-8b9f-d29e9ef27c32

Separate customizable values for default, yielding and overtaking lanes

The third important change involves the way the yielding and overtaking "lanes" are defined. In v0.9.1, you could define the yielding lane as either Left or Right and the overtaking lane will then be the other side of the track and how far the ai cars drive to the side of the track for both yielding and overtaking was defined by a single value. In v0.9.8, there are three slider values which define the default driving position, the yielding position and the overtaking position:

  • Default Lateral Offset
  • Yielding Lateral Offset
  • Overtaking Lateral Offset

8e00ec10-a244-42f2-a112-2b06a9b53d47


These three numbers are all in the range of [-1..1] where -1 represents the left-most side (edge) of the track, 0 is the middle of the track and 1 the right-most side of the track (edge).

All three specify the lateral position on the track width where each respective action should take place.


334724a4-fc72-425d-94c4-0807c4da8bf8

Here are some examples of how they can be used:

Nordschleife Touristenfahrten Trackday where driving normally is mostly done on the racing lane, overtaking happens on the left and yielding takes place on the right:
Default Lateral Offset: 0 (when the lateral offset is 0, the ai use the default racing line which is mostly at the center of the track)
Yielding Lateral Offset: 0.7 (we want the cars to yield to the right so an 0.7 will make them yield to the right but not going as far the edge of the track)
Overtaking Lateral Offset: -0.8 (we want the cars to overtake on the left so a -0.8 will make them overtake to the left but also not going as far the edge of the track)


2ab4aafe-baa5-45f1-b10d-3ac9275e5a28

A Germany unidirectional two lane road where driving normally is done on the right lane and overtaking is done on the left lane:
Default Lateral Offset: 0.5 (an 0.5 will make the cars drive in the middle of the right lane)
Yielding Lateral Offset: 0.5 (since this is a road and not a track and the cars are already driving on the right lane by default, we can use the same value here we used for the Default Lateral Offset)
Overtaking Lateral Offset: -0.5 (to make the cars overtake by moving to the middle of the left lane, we can use a -0.5 value)


40dfbf6a-0e34-438e-a383-16e30ec9e7ac

A UK unidirectional two lane road where driving normally is done on the left lane and overtaking is done on the right lane:
Default Lateral Offset: -0.5 (a -0.5 value will make the cars drive in the middle of the left lane)
Yielding Lateral Offset: -0.5 (since this is a road and not a track and the cars are already driving on the left lane by default, we can use the same value here we used for the Default Lateral Offset)
Overtaking Lateral Offset: 0.5 (to make the cars overtake by moving to the middle of the right lane, we can use a 0.5 value)


a5fce98c-8d46-4acd-a4c1-726eeccc8877

By exposing these three individual values, the app can also be used for simulating road traffic on a street instead of just yielding/overtaking on the track.

Many customizable options

The fourth important change is the amount of available tweakable values now available to the user. These tweakable values include dynamic changes to AI Caution, AI Aggression and AI Difficulty level.

3e77dfba-c58b-4f57-943a-73eb925e962a


There are also many individual settings for how to handle yielding and overtaking:

5a213039-6a5f-4dae-bd7f-05ead63044cc


Hopefully all these tweakable values will better provide the user create the perfect trackday experience.

Better support for races

Although Realistic Trackday wasn't specifically for races, there are a number of values you can tweak about to make it work in a race. Follow these tips to get a better racing experience:
  • Very important: Set a value in seconds in the "Defer yielding/overtaking for a while after session start" so that the yielding and overtaking logic doesn't start taking place until after some time so that the cars don't pile up when the race starts.
  • Keep Caution values low so that the AI cars take more risks overall, but careful about dropping the Caution values below 1.
  • Keep Aggression values high so that the AI cars drive more assertively on track.
  • Keep Difficulty values high so that they go through corners faster.
  • Keep the "Detect car behind distance" Yielding value low so that AI cars only yield if the overtaking car is very close to them
  • Keep the "Detect car behind ahead" Overtaking value low so that AI cars only overtake if the yielding car is very close to them
  • Set the top speed limit Yielding value to 1.0 so that no top speed limit is applied when a car is yielding
  • Keep the throttle pedal limit Yielding value high so that yielding cars don't let go of the throttle too much while yielding, or nothing at all.
  • Keep the "distance to overtaking car to apply speed limit" Yielding value low so that the yielding car only slows down, if you want it to slow down, while very close to the overtaking car.
Checking for required Custom Shaders Patch functionality

In this version I've written better handling for users with outdated CSP versions by trying to identify all the required functions in the app and informing you if any of them are missing due to old CSP versions.


142da955-5800-4822-a03d-059d8a498de6




Installation
The app requires Custom Shaders Patch (CSP) extension installed and doesn't work online since it can, obviously, only control AI cars.

[!NOTE]
The recommended Custom Shaders Patch version as of 07/11/25 is CSP v0.3.0-preview140.

Stable
Download the zip file from the Releases page: https://github.com/dreasgrech/AssettoCorsaRealisticTrackday/releases

[!WARNING]
When upgrading from an existing version of Realistic trackday, make sure to first delete the RealisticTrackday app directory before copying the new one.
Copy the AssettoCorsaRealisticTrackday directory to \steamapps\common\assettocorsa\apps\lua\

Cutting Edge
If you want to install the app directly using the latest source code, you can download the entire repository and put all files in: \steamapps\common\assettocorsa\apps\lua\AssettoCorsaRealisticTrackday\

[!WARNING]
There's no guarantee everything will work as expected when using the cutting edge "nightly" code here since I am constantly committing in untested code when I'm working on the app.
You should end up with this file structure once the files are copied:

1a4a5f7b-5445-458b-a599-de0d2eadcd6b


How To Use

Once installed, the app will run automatically when Assetto Corsa is running.

To view the car list table in the window, open the app from the side bar in the game listed as Realistic Trackday:

a315ab48-cd4d-434e-920a-4bf0c304aba1


I have tested this app mostly using the AI Flood setting which cycles the AI cars during a Trackday around the player so that there's a constant stream of cars behind and in front of the player car.

It can be enabled from Content Manager -> Settings -> Custom Shaders Patch -> New AI Behaviour:

7498a1e9-883c-44a4-90b0-679ab7bea411


That said, the app should theoratically work in all modes (except Online) on tracks that have an AI Spline set.

Here's a typical scenario which can be used:

4826abbb-b497-4463-b822-b18a43d2e7e4


Settings
The app offers a number of settings to allow for customizing the experience as much as possible, starting from the general driving of the AI to specific settings regarding yielding and overtaking:

50ac2c33-77b9-4724-bdae-4a9538091a11


There are also a number of settings that help with understanding what the app is doing under the hood. One of the main debugging tools is the custom UI table that shows the full relevent data about the cars:

153256c0-9eba-4d31-935b-419e053c7d9a

This table shows you a lot of information about each other including the current state the car is in, if it's yielding or overtaking and who's the other car involved, and also reasons why they can't yield or overtake at the time beind. It's invaluable for understanding the behaviour of the cars.

[!CAUTION]
Keep the car list table and all other Debugging options disabled during regular usage of the app so that you don't incur the performance hit they entail.
How It Works

Each AI car is represented as a state machine where each car can be in one state at a time.

These are all the current states AI cars can be in:

Default Driving States

Driving Normally

The default state where cars are driving the normal racing line while not currently yielding or overtaking other cars. In this state, a car is constantly monitoring the cars around it to determine whether it needs to overtake the car in front or yield to the car in the rear. If a car needs to start yielding to a car behind, it will transition to the Easing In Yield state or the Easing In Overtake if it needs to overtake a car in front of it.


46072143-593e-415b-abfb-ac46bb9ac7db

Yielding States

Easing In Yield

In this state cars are driving laterally from their current lateral position on the track to the yielding lane to let faster cars behind them overtake on the overtaking lane. To ease into the yielding lane, cars drive slowly to the side while checking to make sure there are no other cars on the side they are driving lateral to. If they encounter cars on their side while easing in yielding, they will slow down and wait for a gap to fit in on the yielding lane to let the overtaking car pass.
When a car has fully reached the yielding lane, they will move on to the Staying on Yielding Lane state.


3a1df57f-d1a3-4c51-bb1e-c512834e5ba6


Staying on Yielding Lane
When a car is in the Staying on Yielding Lane state, a car will keep driving on the yielding lane side as much as possible to let the overtaking cars pass . While in this state, cars will try drive a bit safer by keeping a two car gap on the yielding lane. When a car determines that there's no one else behind it that needs yielding, it will transition to the Easing Out Yield state.


d3411593-52d2-4297-b4f9-0bcaed8f6cb7

Easing Out Yield
When back to the Easing Out Yield state, a car will drive laterally from the yielding lane over to the normal racing line and will transition back to the Driving Normally state once it reaches the racing line spline. If it encounters a car on its side while driving laterally, it will stop driving to the side and wait until the car on the side has created a gap before it returns to the racing line.


23a55a35-eaba-4949-b882-e292ec3f894f

Overtaking States

Easing In Overtake

While in the Easing In Overtake, a car will drive laterally from their current lateral position on the track to the overtaking lane so that they can overtake the car or cars in front of them.


5bf42378-e19a-4419-972a-6e62e9f43cdd

Staying On Overtaking lane
After a car overtakes another car, it will check if it should stay on the overtaking lane to continue overtaking the upcoming car before returning back to the normal driving line through the Easing Out Overtake state.
Once an overtaking car has determined it's far enough from the yielding car and there's no more close cars that can be overtaken, it will start returning back to the normal racing line via the Easing Out Overtake state.


baf90110-a9cf-4e51-a0af-fbc13bd1c9db

Easing Out Overtake
When back on the Easing Out Overtake state, a car will drive laterally from the overtaking over to the normal racing line and will transition back to the Driving Normally state once it reaches the racing line spline. If it encounters a car on its side while driving laterally, it will stop driving to the side and wait until the car on the side has created a gap before it returns to the racing line.


5ca3100b-6995-4fb4-a249-f86f845dfdb6

Accident States (WORK IN PROGRESS)

Collided with Car (WIP)
Collided with Track (WIP)
Another Car Collided Into Me (WIP)


Troubleshooting
  • If you don't see the car list table and want to enable it, you can enable it from the Settings called Draw Car List.
  • If the AI cars are frequently going off track while yielding/overtaking, reduce the Max Side Offset value from the Settings:
    d9bb3a39-b36a-4aa9-b7fc-08ae8bc18608

  • If nothing seems to be working, open the Lua Debug app:
    374bace7-6d85-41a3-9295-c8cf296caf2b


    Enable the Realistic Trackday app:
    3552f0e3-f622-437f-ab61-720a55ba5023


    And check if there are any errors listed in the window (the yellow logs in the below image are from the Log fast AI state changes option):
    b9c28077-3c33-4143-8849-c07e590b5050

  • If when using the app in a Race, the cars all start trying to yield and overtake as soon as the race starts causing mayhem, increase the "Defer yielding/overtaking for a while after session start" value which determines the delay before the yielding/overtaking starts working after a session officially starts.
  • If the cars start yielding while the overtaking car is still very far, decrease the "Detect car behind distance" value in the Yielding settings.
  • If the cars start overtaking while the yielding car is still very far, decrease the "Detect car behind ahead" value in the Overtaking settings.
  • If the cars are rear-ending each other frequently, increase the Caution values. Note that a caution value below 1 causes the cars to drive very assertively irrespective of what's in front of them.
  • If the cars are very hesitant when trying to overtake, decrease the overtaking Caution values, increase Aggression values and increase Difficulty values. Also make sure that the overtaking lateral offset is far enough from the yielding lateral offset so that cars have enough space on the side to overtake.
  • If the yielding cars are driving way too fast while yielding causing the overtaking cars to not be able to fully overtake them, adjust the speed limiting values in the Yielding section to tell the yielding cars to slow down a bit while yielding so that the overtaking car can overtake safely.
  • If the cars are changing directions while yielding/overtaking too fast with jerky steering pulls, decrease the lateral offset increment/decrement step values in the Yielding and Overtaking sections so that the move to the target lateral offset happens more gradually.
  • If the cars are hitting each other side-to-side when driving laterally to change lanes, make sure that the "Check sides while yielding" and "Check sides while overtaking" in the Yielding and Overtaking sections respectively are enabled.
Known Issues
  • Some cars don't use the indicator lights when yielding or overtaking (like the Alfa Mito), and some cars (like the MX5) seem to have invertly-set indicator lights i.e. they turn on the left indicator light when going right and vice versa. This seems to be an issue either with the CSP API or with the specific individual cars.
  • As of CSP v0.2.12-preview1, there seems to be a bug with the API in regards to speed-limit functions on the API cars (specifically the physics.setAIThrottleLimit and physics.setAITopSpeed functions) which prevents the AI cars slowing down while yielding to another car.
  • Accident handling hasn't yet been enabled in the app, even though it's almost fully developed. This involves having the cars stop after accidents, a yellow flag being shown to the player indicating there's an accident, no overtaking of cars in yellow flag zone, everyone driving at 50km/h and also ai cars navigating around the cars in the accident on the track. But I haven't enabled it yet because of the issue in the current CSP v0.2.12-preview1 which doesn't have the ai speed limiting code working (see point above for more info) and I need the speed limiting to work for the cars to navigate accidents.
  • Since accidents aren't implemented yet, cars will now sometimes drive back to the track after they crash so beware of that.
  • More TODOs and issues listed on the Issues page: https://github.com/dreasgrech/AssettoCorsaRealisticTrackday/issues
Thank You
This app has taken many many hours of development work to get it in the state it is today, so if you enjoy using it, please consider buying me a coffee. It will be immensely appreciated.


purple_img.webp


97cc68b6-5942-465e-b3c1-4c170b929692
32a6c8c3-dccb-47a0-bb18-98d946f5b80f
Author
dreasgrech
Downloads
7
Views
35
First release
Last update

Ratings

0.00 star(s) 0 ratings
Back