AI setups

r(h)o

Hi all!

I know it is pretty basic stuff, but I didn't find anything in the forums, in the documentation inside config files, in the Internet, ... .

Is possible to know what setups AI cars are using?
Is possible to assign to AI cars a setup developed by me?
If the mod is composed by several cars, is possible to assign a different setup to the various cars?

Thanks in advance.
 
http://fatbob56.com/forum/mcomod/viewtopic.php?t=145
Hope to link is ok and please read the whole thread in that forum.
Post from Durod:
Recently I embarked on a mission to make the AI in my game more competitive. I did some searching on the net and found several theories on how to do it. One involved editing some lines in the track AIW file for Worst Adjust, Mid Adjust and Better Adjust. Another was to edit the line for AI corner grip usage in the PLR file. Although both of these methods did produce some improvement in the AI lap times, combined they still left the AI much slower than I would like. For my money, the best way to make your AI competitive is simply to make them use a good setup. There are, from what I can tell, a couple of ways to do this.

The first is to use fixed setups, and can be achieved by editing the following lines in your PLR file:

Fixed Setups="0" // use fixed setups specified in UserData\<plr>\FavoriteAndFixedSetups.gal (based on track and vehicle class)
Fixed AI Setups="0" // whether AI use the fixed setups, only applicable if "Fixed Setups" is also enabled (and can be used in single player to have the AIs use your favorite setup)

By changing the "0" in both line to "1" you will initiate fixed setups. Once this is done, in game when you assign a setup to a track it will be stored in UserData\<plr>\FavoriteAndFixedSetups.gal, and will be the setup used by you and all other drivers in your game, AI or human. The problem with this method is that it does not allow you to tinker with the setup to try to get faster, which for me and the people I race with is unacceptable.

The second method, and the method I choose is to assign default track setups. This is not as easily done as the previous method. but I think the extra work is well worth it. First of all, make sure that the two lines in the PLR file I mentioned in the previous method are unchanged, in other words they are still set to "0". For the purpose of this dicussion, I'm going to use Rouen_1974_94 as the example track.

1-First thing to do is go in game and work on a decent setup for this track, or download one. Once your happy with your setup, save it as whatever name you like, for me it might be du_rouen.svm.

2-Next you have to open the GDB file for this track,(rouen_1974_94.gdb} and find the lines:
SettingsFolder = Rouen_1990
SettingsCopy = Rouen_1990.svm
SettingsAI = Rouen_1990.svm
These lines tell you the folder within your settings folder where the setups for this track are stored, in this case, Rouen_1990. They also tell you the required name for the default AI setup, in this case, Rouen_1990.svm.

3-Armed with this information, go to your settings folder, and the Rouen_1990 folder and locate the setup you made. Now copy and paste it so that you have a copy of it, in my case I would have a file named "copy of du_rouen.svm". Rename this file Rouen_1990.svm.

4-Now you have to place a copy of this file,(Rouen_1990.svm) in the vehicle folders of any cars that you want to use this setup. If for instance you only choose 2 or 3 cars as opponents, you only need to paste it into those vehicles folders. If however, like me, you prefer to let the game randomly choose your oponents, it's best to put it in all the vehicle folders. I created a simple batch file to paste mine for me.

5-The final step is to boot up your game and go to that track. Go into the garage area and select the Rouen_1990.svm setup by clicking on it, and then click on the assign button. Now any AI which you pasted the setup in it's vehicle folder will use that setup at that track. Of course you have to repeat this process for each track you run.

A quick warning, after I did this, the AI went from being too slow, to kicking my butt, so I had to lower the AI strength to my level.

Another in game setting you may want to play with is AI agression. If it's set to high, the AI will crash into you, if it's too low the AI won't attempt to pass, and will just stay in line. I think a good setting is between 50-60%

Finally, another thing you can do is called AI learning, which will teach the AI the best line to use for any given track. Instructions on how to this can be found HERE

In case your unsure, here is the default location of the pertainant files/folders.

PLR file---C:\Program Files\rFactor\UserData\YOURNAME

Track Settings Folders---C:\Program Files\rFactor\UserData\YOURNAME\Settings

Track Folders---C:\Program Files\rFactor\GameData\Locations
I am going to make a little amendment to the previous post, because last night I was planning on running Watkins Glen Nascar V2 online, but the above method was not working for getting the AI to use the assigned set up, yet it did work for the other versions of Watkins Glen. This is what I found. In the GDB files for the 3 tracks, these are the pertainent lines:

Watkins Glen GP:
SettingsFolder = WatkinsGlen_GP
SettingsAI = WatkinsGlen_GP.svm

WatkinsGlen_Long
SettingsFolder = WatkinsGlen_Long
SettingsAI = WatkinsGlen_Long.svm

WatkinsGlen_NASCAR
SettingsFolder = WatkinsGlen_NASCAR
SettingsAI = GlenNASCAR.svm

You'll notice that the Nascar track is the only one where the settings name is different than that of the folder. Although I did have the setup named correctly,(GlenNASCAR.svm), it would not load. As soon as I changed the GDB so that it read :

SettingsFolder = WatkinsGlen_NASCAR
SettingsAI = WatkinsGlen_NASCAR.svm

and of course changed the name of the setup accordingly, it worked fine.

Makes no sense to me, and I suppose it could be some kind of glitch on my PC, so don't take it as gospel, but it did work for me.

I also want to add that changing the lines in the track gdb will cause mismatches with others if you race online, so if you do it make sure that others racing with you also have the edits done............
 
let me add to this post because i was wondering about AI setups as well:

- is it possible to see opponents set-ups? most of tracks i'm faster nearly 1 second i can make the gap near 2 secs playing with setup. But on some tracks i'm nearly 1 second behind after sector 1 so i'm guessing the default setup is way off for that track but i cant seem to find a working setup. But i noticed that AI drivers during testing or practice go out do couple of laps and come back, going out again improving their times. Maybe they are trying new setups and if i can see those that would improve my understanding of setups.

- is it also possible to see telemetry data of opponents? or at least their throttle / brake values. i can watch their hotlaps with rpm / speed data but i also want to see other parameters. i've tried enabling data acquisition plugin while watcthing them drive but of couse that didnt work.

basically i want to study opponents more and try to see what i'm during wrong especially on some tracks.
 
I've been trying to get this to work with a couple of my mods, and so far I can't get the AI to use my setup. A specific example:

I'm trying to get the AI cars to use a setup I created for Indianapolis, with the ChampCar2006 mod. I copied my setup file, renamed it to "Indianapolis_Oval.svm" (which is what the SettingsAI is set to in the Indianapolis_500.gdb file), and copied it into the ChampCar car folder (where the .hdv file lives). I even tried putting a copy of the file into every team folder (where the .veh files are for each driver), but nothing I can do will get the AI to use this setup. It's a pain because they use the default setup, which has them redlining at around 195mph in top gear, which results in some pretty pitiful lap times.

Is there something else I need to do to get the simulation to 'find' this settings file? Maybe a flag I need to enable someplace that says "let the AI use custom setup files"?

Any help/advice would be really appreciated!
 
If i remember right, you have to put the *.svm-files into your ..\UserData\[your Nickname] folder, to make it work.


EDIT: correction...it is the UserData folder where the *.svm has to be put in. Just tested it, to be sure ;)
 
Last edited:
If i remember right, you have to put the *.svm-files into your ..\UserData\[your Nickname] folder, to make it work.


EDIT: correction...it is the UserData folder where the *.svm has to be put in. Just tested it, to be sure ;)

That was it!! Finally, man I must have wasted two hours yesterday trying to figure this out. Nowhere online where I saw people talking about how to do this did I see anyone say what you just told me.

I do see one problem with this approach though: Since the file name is based on the track's GDB file, how do you have default setups for multiple cars/mods? (or maybe you can't , without renaming the file before you play a particular mod).
 
With this method you are right.

But to make the AI use Setups from different series on same track, you can use the other method which is described in the post of Hazi.
You just have to make the changes in the [your playername].PLR file.

But is all written in the posting ;).
 
With this method you are right.

But to make the AI use Setups from different series on same track, you can use the other method which is described in the post of Hazi.
You just have to make the changes in the [your playername].PLR file.

But is all written in the posting ;).

I tried that (using fixed setups) but I couldn't get that to work at all either.
 
The important things are:

Change the following lines in your [your playername].PLR from:
Fixed Setups="0"
Fixed AI Setups="0"

to:
Fixed Setups="1"
Fixed AI Setups="1"

Now try the following:
Start a testday on track X and create a "stupid" setup with the gears set in a way that the highspeed in last gear is as low as possible.
This you have to do, to see if the AI will use this setup later.
Then save the setup and make it your default.

Now start a raceweekend on the same track.

And when the AI has the same stupid gearbox-setting, fixed setup works :)

That normally should work without any problem
 
The important things are:

Change the following lines in your [your playername].PLR from:
Fixed Setups="0"
Fixed AI Setups="0"

to:
Fixed Setups="1"
Fixed AI Setups="1"

Now try the following:
Start a testday on track X and create a "stupid" setup with the gears set in a way that the highspeed in last gear is as low as possible.
This you have to do, to see if the AI will use this setup later.
Then save the setup and make it your default.

Now start a raceweekend on the same track.

And when the AI has the same stupid gearbox-setting, fixed setup works :)

That normally should work without any problem

When I try this, the cars get their default setup... not the one I saved. Do I need to copy the 'stupid' setup file someplace?
 
In any event, it's not a big deal to just change the files out when I'm playing a different mod. Something really weird I've noticed though, now:

On one of the mods (ChampCar2006), when I let the AI drive the car, it goes quite a bit slow than necessary around the corners. I can drive the car quite a bit faster. On one of the other mods (CARTFactor), the AI can drive the car well past the limits of what I can do.. and it's not just a question of doing it smoother.. it can literally carry 20mph more than I can through a corner, without any skidding/sliding sounds, and without bleeding off any speed. I can enter the same corner 10mph slower, and be sliding/bleeding speed badly. It's almost there there is a separate set of 'rules' of physics in use. I've tinkered with many of the AI settings in the HDV files, even going so far as to copy the ones from the CC2006 mod into one of the CARTFactor cars, but it doesn't have much effect (it does have a little effect.. it slows it down slightly, but the car still doesn't behave the same way as if I'm driving it).

None of this is really a huge deal to me, but I'd like to understand what is and isn't possible as far as tweaking the AI goes within a specific mod.
 
In any event, it's not a big deal to just change the files out when I'm playing a different mod. Something really weird I've noticed though, now:

On one of the mods (ChampCar2006), when I let the AI drive the car, it goes quite a bit slow than necessary around the corners. I can drive the car quite a bit faster. On one of the other mods (CARTFactor), the AI can drive the car well past the limits of what I can do.. and it's not just a question of doing it smoother.. it can literally carry 20mph more than I can through a corner, without any skidding/sliding sounds, and without bleeding off any speed. I can enter the same corner 10mph slower, and be sliding/bleeding speed badly. It's almost there there is a separate set of 'rules' of physics in use. I've tinkered with many of the AI settings in the HDV files, even going so far as to copy the ones from the CC2006 mod into one of the CARTFactor cars, but it doesn't have much effect (it does have a little effect.. it slows it down slightly, but the car still doesn't behave the same way as if I'm driving it).

None of this is really a huge deal to me, but I'd like to understand what is and isn't possible as far as tweaking the AI goes within a specific mod.

Nevermind! I figured it out:

It's the "AIGripMult" field in the CARTFactor's tire files. Fronts and rears are set to 1.06 and 1.11 respectively... That's why the AI cars are so much faster through the corners at Indy.
 
Last edited:
When I try this, the cars get their default setup... not the one I saved. Do I need to copy the 'stupid' setup file someplace?


Maybe i wasn't exact enough with my explanation.

When you've created the setup, you have to save it AND you have to assign it (i just wrote that you have to make it to your default).

But you have to assign it, to make it show up in the FavoriteAndFixedSetups.gal file.

Try again and then close the game and open the FavoriteAndFixedSetups.gal and you should have an entry like:

AutoLoadEntry
{
Track="Indianapolis Oval"
Classes="ChampcarsIDT0506"
Session=7 // not currently used
File="USERDATA\[your playername]\Settings\Indianapolis Oval\XXXXXXXX.svm"
}

These entries are made by the game when you assign your setup.
And when it shows up there, the AI will use it when the 2 lines in the [your playername].PLR are changed as described.

Believe me, that really works :)


and don`t forget: AI is NOT using player physic

Sorry when i say: they basicly do use the same default physics of the mod like the player before creating his own setup. But there are some settings in different files you can change, to change the AI behaviour. :)
 
Last edited:
Yeah, when I followed your directions, the game created the FavoriteAndFixedSetups.gal file, with the following entry:

AutoLoadEntry
{
Track="Indianapolis Oval"
Classes="2006 CCWS Houston LongBeach Milwaukee Monterrey"
Session=7 // not currently used
File="USERDATA/<myName>/Settings/Indianapolis Oval/Indianapolis_Oval.svm"
}

But the AI cars were still topping out in the high 190's. I may have done something wrong, but I am still not sure what :( Maybe the 'Classes' field is wrong somehow?
 
Now i got curious.
Yesterday when i've tested it, it was with another mod and it worked normal.
Now i've tested it with the IDT CC06 and..... failed :D.
Same behaviour as you told me that you have.

I played a bit around and it seems to be the classes-system.
Some cars of the CC06 have 6,7,... entries.

I tried this:
- took 10 cars from the 2006 series and changed the classes entries into Classes="CCWS XX2006" (the CCWS entry is needed because of the rfm
- then i took one car of these, made a setup and saved and assigned it
- started a raceweekend and set as opponents CCWS and XX2006
- went on track and the AI still used default setup
- started a new raceweekend and set only XX2006 as opponents
- now it worked, the AI used my saved setup

That it didn't worked with CCWS and XX2006 as choosen opponents, can be caused by the fact that other cars which don't have the XX2006 class-entry, always have the CCWS entry. So the fixed setup seem to be ignored.

I would say that the problem with that mod and using fixed setup is, that there are too many different classes set.
some examples:
Classes="CCWS 2006 LongBeach"
Classes="CCWS 2006 Portland Clevland Toronto Edmonton RoadAmerica"
Classes="CCWS 2006 LongBeach Houston Monterrey Milwaukee"
Classes="CCWS 2006 LongBeach Houston Monterrey Milwaukee Portland Clevland Toronto Edmonton SanJose Denver Montreal Australia Mexico"
Classes="CCWS 2006 RoadAmerica"
and so on..

So when you e.g. create a setup with a car which has Classes="CCWS 2006 LongBeach" and then filter these 3 entries in the opponents tab, there nevertheless will cars be added that e.g. have Classes="CCWS 2006 LongBeach Houston Monterrey Milwaukee" because 1 accordance is enough to add the car.
But all the cars which don't have the exact classes-entry as the one the setup was made with, will ignore the setup i think.

But like i said, i didn't tested it :)
 
Ah, so if I'd just happened to test with another mod, it probably would have worked. What you wrote makes a lot of sense... you've actually given me a lot of insight into how the class stuff works (which I had not really looked into yet). I may take a crack at 'fixing' that mod, then as I haven't really seen any drawback to using 'fixed' setups, and in fact it might be a better solution to getting the AI cars to use a more 'track-appropriate' setup, than my setting up scripts to copy .SVM files around in my userdata folder, depending on which mod I want to play.
 
A more elegant solution for the AI-setup problem os to use "TrackConfigsBase" files where you can
assign an individual setup via the "upgrades.ini".
"TrackConfigsBase.ini" have to look like this:

"*":
Setup=0

"Brianza Grand Prix":
Setup=1

"2010 Monza GP":
Setup=1

"Monza":
Setup=1

"Marina Bay Street Circuit":
Setup=2

"Marina Bay RFE":
Setup=2

"Montreal 2011":
Setup=3

So "Setup=3" is reffering to the upgrade of the same name.
Greets
Pete
 
Every of all possible solutions has their pros and cons. The method to put the tracknamed.svm into the userdata folder and the method to use the FavoriteAndFixedSetups.gal have the pro that you don't have to make changes in the mod-files. That is not unimportant if you are planning to play online.
But in the end it's, in my opinion, just a matter of priorities and of what I want and how much work I'm willing to put in.


EDIT (forgot half of my posting:D):
@Roadblock: As a i said, each method has pros and cons. The CC06 is a good example for a mod where you better use the method to put the tracknamed.svm into the Userdata folder. For other mods, with less classes entries, i would prefer the using of the FavoriteAndFixedSetups.gal method. For me it seems (untested) as if the FavoriteAndFixedSetups.gal method filters the cars in the way that every class entry in the setupfile has to match the class entries in the *.veh files to use the setup. And when you put the tracknamed.svm into the UserData folder just 1 matching entry seem to be enough to make the car use this setup. But to decide which method you choose for a mod, you'll always have to look into the *.veh files first.

PS When i say tracknamed.svm i mean "a setup file which is renamed in that way that it matches the given name for the SettingsAI= entry in the *gdb-file of the track for which the setup was made".
But that was too long to write everytime ;)
 
Last edited:
@Roadblock: As a i said, each method has pros and cons. The CC06 is a good example for a mod where you better use the method to put the tracknamed.svm into the Userdata folder. For other mods, with less classes entries, i would prefer the using of the FavoriteAndFixedSetups.gal method. For me it seems (untested) as if the FavoriteAndFixedSetups.gal method filters the cars in the way that every class entry in the setupfile has to match the class entries in the *.veh files to use the setup. And when you put the tracknamed.svm into the UserData folder just 1 matching entry seem to be enough to make the car use this setup. But to decide which method you choose for a mod, you'll always have to look into the *.veh files first.

PS When i say tracknamed.svm i mean "a setup file which is renamed in that way that it matches the given name for the SettingsAI= entry in the *gdb-file of the track for which the setup was made".
But that was too long to write everytime ;)

I understood what you meant, and I agree completely. Since my skill level is quite poor, and likely to remain so for some time, I don't think I'll be doing any online racing in the near future, so I'll probably have a go at 'fixing' some of the class issues with the mod.

I think it would be ideal if ISI gave us some mechanism whereby we could configure which setups we want the AI cars to use not only per track, but also have a qualifying and a race setup. Maybe rFactor 2 allows this (I haven't bought it yet, but I probably will at some point).
 
Small update and a new problem:

I've successfully tweaked the '95 indy car mod such that the AI cars at 100% are turning reasonable/realistic laptimes at Indianapolis, and I am able to do the same (the best AI drivers are a touch faster than I am, but I figure I could probably drive better).

Problem now is: The AI tire model doesn't seem to take heat into account, at least not in terms of the tires having less grip when cold, so, when it comes race time, I typically get left in the dust at the start, because it takes me 2-3 laps to get my tires heated up to run competitively. Anyone know a way to tweak this? I can think of a few ideas, but it involves basically trying to slow the AI down, which I think will end up with the reverse problem (I'll be too fast once my tires are hot). Maybe some way to start with my tires warm? That might be a bit unrealistic, but it would at least let me be competitive at the start of a race.
 
What you'll have to do to start with warm tires is:
- in the *.tbc file, find the lines "Temperatures=(XXXX.XX, XXXX.XX)"
- the second value is the starting temperature and the first the optimal temp.
If you make the second value equal to the first, you should have good grip from the start.
 
Last edited:
What you'll have to do to start with warm tires is:
- in the *.tbc file, find the lines "Temperatures=(XXXX.XX, XXXX.XX)"
- the second value is the starting temperature and the first the optimal temp.
If you make the second value equal to the first, you should have good grip from the start.

I was thinking that one of the F1 mods, or maybe even the formulaIS cars had "tire warmers".. This must be how they've implemented it! Thank you!
 

Back
Top