Information for Customizing AI drivers in AMS2

Discussion in 'Automobilista 2 - General Discussion' started by gian, Nov 19, 2021.

  1. gian

    gian Administrator Staff Member AMS2 Club Member

    Joined:
    Mar 16, 2020
    Messages:
    91
    Likes Received:
    123
    To override AI driver names, personalities and nationalities, user can create a .xml file named with the vehicle class name into the UserData\CustomAIDrivers\ folder of his Automobilista 2 steam folder (usually it is C:\Program Files (x86)\Steam\steamapps\common\Automobilista 2\UserData\CustomAIDrivers\).

    For reference, all vehicle class names can be found in the spoiler below:
    ARC_Cam.xml
    Carrera Cup.xml
    Cat620R.xml
    Cat_Academy.xml
    Cat_Superlight.xml
    Cat_Supersport.xml
    CopaClassicB.xml
    CopaClassicFL.xml
    CopaFusca.xml
    CopaTruck.xml
    CopaUno.xml
    DPI.xml
    F-3.xml
    F-Classic_Gen1.xml
    F-Classic_Gen2.xml
    F-Classic_Gen3.xml
    F-Classic_Gen4.xml
    F-Dirt.xml
    F-Junior.xml
    F-Inter.xml
    F-Hitech_Gen1.xml
    F-Hitech_Gen2.xml
    F-Reiza.xml
    F-Retro_Gen1.xml
    F-Retro_Gen2.xml
    F-Retro_Gen3.xml
    F-Trainer.xml
    F-Trainer_A.xml
    F-Ultimate.xml
    F-Ultimate_Gen2.xml
    F-USA_Gen1.xml
    F-USA_Gen2.xml
    F-USA_Gen3.xml
    F-USA_2023.xml
    F-V10_Gen1.xml
    F-V10_Gen2.xml
    F-V12.xml
    F-Vee.xml
    F-Vintage_Gen1.xml
    F-Vintage_Gen2.xml
    G40Cup.xml
    G55Supercup.xml
    GT1.xml
    GT3.xml
    GT3_Gen2.xml
    GT4.xml
    GT5.xml
    GTE.xml
    GTOpen.xml
    Group A.xml
    Group C.xml
    Hot Cars.xml
    Hypercars.xml
    Kart125cc.xml
    KartGX390.xml
    KartRental.xml
    KartShifter.xml
    Kartcross.xml
    LancerCup.xml
    LMDh.xml
    MiniChallenge.xml
    Montana.xml
    OldStock.xml
    Opala79.xml
    Opala86.xml
    P1.xml
    P1Gen2.xml
    P2.xml
    P3.xml
    P4.xml
    Procar.xml
    RX.xml
    SprintRace.xml
    StockCar99.xml
    StockCarV8.xml
    StockCarV8_2020.xml
    StockCarV8_2021.xml
    StockCarV8_2022.xml
    StockCarV8_2023.xml
    StockCarV8_2024.xml
    Street.xml
    Supercars.xml
    SuperKart.xml
    SuperV8.xml
    TC60S.xml
    TC60S2.xml
    TC70S.xml
    TSICup.xml

    For example, if he wants to override AI drivers for the Formula Classic Gen3 vehicle class, he should create a F-Classic_Gen3.xml file inside \UserData\CustomAIDrivers\ folder, like this:

    C:\Program Files (x86)\Steam\steamapps\common\Automobilista 2\UserData\CustomAIDrivers\F-Classic_Gen3.xml

    Example of F-Classic_Gen3.xml file content:
    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <custom_ai_drivers>
        <driver livery_name="Ministry Motorsport #51">
            <name>John Smith</name>
            <country>USA</country>
            <race_skill>0.75</race_skill>
            <qualifying_skill>0.823</qualifying_skill>
            <aggression>0.3</aggression>
            <defending>0.51</defending>
            <stamina>0.998</stamina>
            <consistency>0.2</consistency>
            <start_reactions>0.36</start_reactions>
            <wet_skill>0.25</wet_skill>
            <tyre_management>0.85</tyre_management>
            <fuel_management>0.0</fuel_management>
            <blue_flag_conceding>0.53</blue_flag_conceding>
            <weather_tyre_changes>0.12</weather_tyre_changes>
            <avoidance_of_mistakes>0.39</avoidance_of_mistakes>
            <avoidance_of_forced_mistakes>0.69</avoidance_of_forced_mistakes>
            <vehicle_reliability>0.847</vehicle_reliability>
        </driver>
        <driver livery_name="ABS Racing #14">
            <name>William Shakespeare</name>
            <country>GBR</country>
            <race_skill>0.12</race_skill>
            <qualifying_skill>0.0</qualifying_skill>
            <consistency>1.0</consistency>
        </driver>
    </custom_ai_drivers>
    
    So, livery_name determines to what livery each driver will be assigned. In the example above we assigned drivers to 2 liveries of the Formula Classic Gen3 vehicle class. You can assign drivers to as many liveries as you want.

    livery_name
    is the name of the livery (case sensitive) as seen in the vehicle selection screen in the game, for example livery_name="Ministry Motorsport #51" will assign the driver to the livery from this screenshot:

    View attachment 17943

    So, for each vehicle class that you want to assign AI drivers to, you must create a .xml file. For example, now we want to override 3 AI drivers of the Chevrolet Cruze Stock Car 2019 vehicle class. The class filename is StockCarV8.xml (as you can see in the spoiler above) so you create a file StockCarV8.xml in \UserData\CustomAIDrivers\ folder.

    Example of StockCarV8.xml file content:
    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <custom_ai_drivers>
        <driver livery_name="Eurofarma RC - R.Mauricio #90">
            <name>Lorem Ipsum</name>
        </driver>
        <driver livery_name="Full Time Sports - R.Barrichello #111">
            <stamina>1.0</stamina>
        </driver>
        <driver livery_name="Eurofarma RC - D.Serra #29">
            <race_skill>1.0</race_skill>
        </driver>
    </custom_ai_drivers>
    
    Now, to race with a custom grid with only the drivers that you have overriden, you simply start a event in AMS2 with the desired opponent classes and select a number of AI opponents less or equal to the total number of AI drivers that you have overriden for those classes.

    Notes:
    • The valid personality values range is between 0 and 1 (inclusive), except vehicle_reliability (see below). All AI personality parameters are calibrated so that 0.5 is an realistic-ish average driver's value, 1 is mapped to a realistic-ish high extreme, and 0 is mapped to a realistic-ish low extreme. Its a sane range so 0 and 1 are valid and reasonable for the extremes though you would expect the spread to be weighted towards 0.5. Bell curve stuff. Thats the expectation, but of course always test the values of your custom AI drivers values to see if they are matching the result you would expect, and adjust it accordingly for your custom sets.
    • Any missing or invalid values are replaced with the original values of the AI driver that would be picked for that car in that event.
    • For now this feature is disabled in multiplayer mode.
    • What each personality value does:
      • name: Driver name.
      • country: 3 letter country code. This is used for displaying the country flag.
      • race_skill: Race session driver skill. It is mapped into a smaller range based on the "Opponent Skill Level" slider setting. Example:
        • For example, at 90% "Opponent Skill Level" slider setting: it builds a range from 85% to 95% (just example, the exact numbers vary for each vehicle model), so a 1.0 race skill driver would be 95% skill and a 0.0 race skill driver would be 85% skill in this example.
      • qualifying_skill: Same as above but for practice/qualifying sessions. Its completely independent from the race_skill. One detail is that a lower qualifying_skill value increases the likelihood of AI programmed mistakes during qualifying hotlaps.
      • aggression: Driver aggression. It is scaled by the "Opponent Aggression" setting:
        • At Low "Opponent Aggression" setting, the 0.0-1.0 aggression value is mapped into a 0.0-0.8 range.
        • At Medium "Opponent Aggression" setting, the 0-1 aggression value is mapped into a 0.2-1.0 range.
        • At High "Opponent Aggression" setting, the 0-1 aggression value is mapped into a 0.6-1.0 range.
        • At Max "Opponent Aggression" setting, all drivers have 1.0 aggression.
      • defending: How much the driver will try to defend his position. Is also scaled by the "Opponent Aggression" slider setting. One detail is that a lower defending value increases the likelihood of AI programmed mistakes when under pressure.
      • stamina: Lower stamina value means the driver loses more of his skill during the session, and also makes the driver to become tired earlier (which increases the likelihood of AI programmed mistakes)
      • consistency: Lower consistency value means the driver skill can be randomly reduced more (basically, the lower the consistency value of a driver, the more skill he can lose from the consistency logic). The randomness is biased towards not losing too much skill, so there is a higher probability for the drivers to lose few skill than to lose much skill. Its has a per-weekend effect (determined upon loading of a track) and also a per-lap effect (determined every new lap or so). One detail is that a lower consistency value slightly increases the likelihood of AI programmed mistakes during the session.
      • start_reactions: Lower start_reactions value means the driver will take more time to react to the race green flag and is more likely to make race start programmed mistakes at the moment of the race green flag (like losing rear grip with some smoke).
      • wet_skill: How good he is on a wet track. Controls how much he will slow down in curves as the track gets wet (lower wet_skill value means he will slow down more), and how likely he will make programmed mistakes related to wetness, like losing grip in puddles or in wet surface (lower wet_skill value increases the likelihood of those mistakes). For example, if a high race skill driver does a curve at 100km/h when its dry, and he has high wet skill, then at wet track he will do that curve at say 90km/h, while if he had low wet skill he would do it at say 85km/h. So if a low race skill driver does that curve at 95km/h in dry, and he has high wet skill, then he might do it at say 88km/h in the wet. Another way to explain it is: it controls how much percent slower a driver will be in a fully wet corner compared to his own speed in the dry in that same corner. For example: in a given class all drivers with 1.0 wet skill go 10% slower on a fully wet corner compared to their own speed on that same corner fully dry. And all drivers with 0.0 wet skill go 20% slower on a fully wet corner compared to their own speed on that same corner fully dry. (note those numbers are just examples, the actual percentage varies per class).
      • tyre_management: How good he is in preventing tyre wear (higher values means he will have less tyre wear and consequently he will be able do keep doing good laptimes for a longer period and pit later due to that). This doesn't change the behavior of the driver (i.e. he won't drive differently to try to save tires), just the tyre wear.
      • fuel_management: For now this parameter works in oval tracks only (but in future it will be extended to all track types); The higher the value, the more the AI will try to save fuel in some strategic situations instead of pushing, like when it sees it can maybe save a pitstop, it will try to stay in draft and coasting instead of overtaking while at the same time trying to not lose much distance to the race leader. It doesnt mean high value is better than low value, its just a characteristic of the driver.
      • blue_flag_conceding: Drivers with high blue_flag_conceding will work harder to concede the position when under blue flag.
      • weather_tyre_changes: Drivers with high weather_tyre_changes are more likely to make pitstops for changing tyres when the track wetness state changes. It doesnt mean 1.0 is better than 0.0, its just a characteristic of the driver, not really a skill. Sometimes staying longer on the track with the wrong tyres is better, sometimes its worse.
      • avoidance_of_mistakes: Drivers with lower avoidance_of_mistakes value are more likely to make AI programmed mistakes during the session in general (like understeer, oversteer, recoverable and non-recoverable mistakes).
      • avoidance_of_forced_mistakes: Drivers with 1.0 value for avoidance_of_forced_mistakes wont have their chances of mistakes increased when under pressure (when defending position). Drivers with lower value for avoidance_of_forced_mistakes will have their chances of mistakes increased when under pressure (compared to their chances of mistakes when not under pressure).
      • vehicle_reliability: In short this is a ratio between the lowest and highest possible reliability for the car/class in question. Read instructions on how to set this in its own section below.

    New in update V1.4.0.0:

    Two new custom AI parameters were added: fuel_management and vehicle_reliability. The former is explained above, and the later is explained in detail below:


    Vehicle Reliability

    To make sense of vehicle_reliability, you need to be aware of the reliability range we have set for each class. We list the ranges as minimum and maximum mean minutes between failures below. If you're working on a mean minutes between failures basis you need to do some math to turn it into the final reliability for a driver in the class in question - best to do in a spreadsheet or other tool when working on a set.

    Gather minimum (y) and maximum (z) mean minutes between failures for the class you're working on (see below), then consider your driver/team target mean minutes between failures (x) that you may have derived from some real race statistics for example. You can use this formula to calculate vehicle_reliability:
    Code:
    sqrt((x-y) / (z-y))
    If we had a minimum of 25 mins, maximum of 700 mins, and our target was 500 mins between failures, result of that formula and thus our vehicle reliability would be 0.839. You simply insert it to a driver's personality values:
    Code:
    <vehicle_reliability>0.839</vehicle_reliability>
    Alternatively if you wish to just set a reliability and see what happens, know that values above 0.6 are generally better for each class - relative to how reliable or unreliable the class should be. But for maximum chaos you can of course give low reliabilities a try.

    If you wish to go below 0.0 or above 1.0, that can be done too. But know that if you go negative, the formula changes to this:
    Code:
    -((y/x)-1)
    When negative, vehicle reliability is used as a divider for the minimum mean time so we need this extra step.

    Note that mean minutes between failures is simply a way to quantify reliability. In the end there can be a lot of variance and generally speaking if you want someone to last for 60 minutes consistently, better make them much more reliable than that.

    Current failure time ranges
    Very Low (5-400):
    • Copa Truck
    • F-Junior
    • Group A
    • Karting 125CC, GX390, Rental, Shifter & Super Kart
    • M1 Procar
    • Vintage Touring Cars T2
    Low (25-700):
    • F-Vintage Gen 1-2
    • F-Retro Gen 1-3
    • F-Classic Gen 1-4
    • F-HiTech Gen1-2
    Medium (50-1000):
    • Aussie Racing Camaro
    • Caterham 620R, Academy, Superlight & Supersport
    • Copa Classic B & FL
    • Copa Fusca
    • Copa Uno
    • F-3
    • F-Dirt
    • F-Inter
    • F-USA Gen 1 & Gen3
    • F-V12
    • F-Vee
    • Ginetta G40 Cup
    • GT5
    • Hot Cars
    • Kart Cross
    • Lancer Cup
    • Old Stock Race
    • P2, P3 & P4
    • RX
    • Sprint Race
    • Stock Car Brasil 1979, 1986 & 1999
    • Street Cars (Chevrolet Camaro SS)
    • Vintage Touring Cars T1
    High (100-1500):
    • F-V10 Gen 1-2
    • F-USA Gen 2
    • Group C
    • GT Classic
    Very High (300-2000):
    • Copa Montana
    • DPi
    • F-Reiza
    • F-Ultimate Gen 1-2
    • F-USA Gen 4
    • Ginetta G55 Supercup
    • GT1
    • GT3 Gen1-2
    • GT4
    • GTE
    • GT Open
    • LMDh
    • P1 Gen1-2
    • Porsche Cup
    • Stock Car Brasil 2019-2024
    • Street Cars - Hyper & Super
    • Super V8
    New in update V1.3.5.0:

    Starting on AMS2 V1.3.5.0, we implemented forced and unforced mistakes logic for AI, with support for user overriding the likelihood of forced and unforced mistakes personality values for AI drivers (check above to learn how to override the new avoidance_of_mistakes and avoidance_of_forced_mistakes personality values).

    The AI may make understeer or oversteer programmed mistakes in the following situations: on race reaction to green flag (depending on his start_reactions personality value), on puddles (depending his wet_skill personality value), on brakezones, on mid corners and on throttle appliance in corner exit, depending on his avoidance_of_mistakes personality values. The types of mistakes also depend on if the car is FWD or RWD.

    Some mistakes are programmed to be recoverable (i.e. minor mistakes, wont cause AI to spin or go off track, are more likely to occur) and some mistakes are programmed to be non-recoverable (i.e. major mistakes like spin or go off track, are less likely to occur).

    The likelyhood of a mistake on a given moment depends on several factors, like if he has poor related personality traits like the avoidance_of_mistakes personality value and the consistency value, or is suffering pressure (even more if the pressure occurs near the end of race or if he has poor defending or poor avoidance_of_forced_mistakes personality value), or track is wet and he has poor wet_skill, or he has slicks in wet, or he is in qualifying hotlap and has poor qualifying_skill value, or he is tired (due to poor stamina for example), or his tyres are worn. Mistakes will be less likely if that part of road has walls near (to simulate him being more careful to mistakes on tracks with walls near road).


    New in update V1.3.4.0:


    Starting on AMS2 V1.3.4.0, now you can optionally override AI driver values for specific tracks. See example below:
    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <custom_ai_drivers>
        <driver livery_name="Ministry Motorsport #51">
            <name>John Smith</name>
            <country>USA</country>
            <race_skill>0.75</race_skill>
            <qualifying_skill>0.823</qualifying_skill>
            <aggression>0.3</aggression>
            <defending>0.51</defending>
            <stamina>0.998</stamina>
            <consistency>0.2</consistency>
            <start_reactions>0.36</start_reactions>
            <wet_skill>0.25</wet_skill>
            <tyre_management>0.85</tyre_management>
            <fuel_management>0.0</fuel_management>
            <blue_flag_conceding>0.53</blue_flag_conceding>
            <weather_tyre_changes>0.12</weather_tyre_changes>
            <avoidance_of_mistakes>0.39</avoidance_of_mistakes>
            <avoidance_of_forced_mistakes>0.69</avoidance_of_forced_mistakes>
            <vehicle_reliability>0.847</vehicle_reliability>
        </driver>
        <driver livery_name="Ministry Motorsport #51" tracks="Azure_Circuit_2021,Long_Beach,Salvador_Street_Circuit">
            <race_skill>0.99</race_skill>
            <qualifying_skill>0.998</qualifying_skill>
            <consistency>1.0</consistency>
            <wet_skill>0.95</wet_skill>
            <blue_flag_conceding>0.75</blue_flag_conceding>
            <stamina>1.0</stamina>
        </driver>
        <driver livery_name="Ministry Motorsport #51" tracks="Jacarepagua_OVAL">
            <race_skill>0.5</race_skill>
            <tyre_management>0.4</tyre_management>
            <defending>0.0</defending>
            <stamina>0.9</stamina>
            <aggression>0.0</aggression>
            <avoidance_of_mistakes>0.1</avoidance_of_mistakes>
            <avoidance_of_forced_mistakes>0.9</avoidance_of_forced_mistakes>
        </driver>
        <driver livery_name="ABS Racing #14">
            <name>William Shakespeare</name>
            <country>GBR</country>
            <race_skill>0.12</race_skill>
            <qualifying_skill>0.0</qualifying_skill>
            <consistency>1.0</consistency>
        </driver>
    </custom_ai_drivers>
    In the above example, you can see there are 3 driver entries for the same livery (Ministry Motorsport #51).

    The first entry doesn't contain a tracks list, so it means those are the base values of the driver of that livery on any tracks. For example, on any tracks, his race_skill will be 0.75.

    The second entry contains a tracks list with comma separated track names ("Azure_Circuit_2021,Long_Beach,Salvador_Street_Circuit"), so it means the driver of that livery has some specific personality values to those 3 tracks. So on Azure, Long Beach and Salvador, his race_skill will be 0.99 instead of 0.75, for example. The fields that arent present will still use the base value of that driver: for example, aggression isnt present, so it will use his base value for aggression on any tracks which is 0.3.

    The third entry contains a tracks list with only one track name ("Jacarepagua_OVAL"), so it means the driver of that livery has some specific personality values to this track. So on Jacarepagua_OVAL track, his race_skill will be 0.5 instead of 0.75, for example. The fields that arent present will still use the base value of that driver: for example, qualifying_skill isnt present, so it will use his base value for qualifying_skill on any tracks which is 0.823.

    You can add as many track overrides as you want, for as many drivers (liveries) as you want.

    The full list of track names is in the spoiler below:
    Adelaide_Historic
    Adelaide_Modern
    Ascurra_Dirt
    Ascurra_RX
    Azure_Circuit_2021
    Bathurst_1983
    Bathurst_2020
    BrandsHatch_GP
    BrandsHatch_Indy
    Brasilia_Full
    Brasilia_Outer
    Buenos_Aires_Circuito_6
    Buenos_Aires_Circuito_6T
    Buenos_Aires_Circuito_7
    Buenos_Aires_Circuito_8
    Buenos_Aires_Circuito_9
    Buenos_Aires_Circuito_12
    Buenos_Aires_Circuito_15
    Buskerud_Long
    Buskerud_Short
    CadwellPark
    CampoGrande1
    Cascavel2
    Cleveland_GP
    Barcelona_1991
    Circuit_de_Catalunya_GP
    Circuit_de_Catalunya_GP_NC
    Circuit_de_Catalunya_NATL_NC
    Circuit_de_Catalunya_RX
    Cordoba_GP
    Cordoba_International
    Cordoba_NATL
    CuritibaInternacional
    Curitiba_outer
    CurveloLong
    CurveloShort
    Daytona_Speedway_Tri_Oval
    Daytona_Road_Course
    Daytona_Nascar_Road_Course
    Donington_GP
    Donington_Nat
    Cascais
    Cascais_1988
    Cascais_Alternate
    Fontana_OVAL
    Fontana_SCC
    Foz_RX
    Galeao_Airport
    Gateway_OVAL
    Gateway_RC1
    Gateway_RC2
    GoianiaMixed
    GoianiaOuter
    GoianiaShort
    CopaSaoPauloStage2
    GranjaVianaKart101
    GranjaVianaKart102
    GranjaVianaKart121
    Guapore
    Hockenheim_GP
    Hockenheim_ShortA
    Hockenheim_ShortB
    Hockenheim_National
    Hockenheim_2001
    Hockenheim_1988
    Hockenheim_1988_short
    Hockenheim_1977
    Hockenheim_RX
    Ibarra2
    Ibarra_Reverse
    Indianapolis_2022_Oval
    Indianapolis_2022_RC
    Imola_GP_2018
    Imola_GP_1972
    Imola_GP_1988
    Imola_GP_2001
    Interlagos_1991
    Interlagos_1993
    Interlagos_GP
    Interlagos_SCB
    Interlagos_Historic
    Interlagos_Historic_Outer
    InterlagosKart1
    InterlagosKart2
    InterlagosKart3
    Jacarepagua_Historic
    Jacarepagua_2005
    Jacarepagua_OVAL
    Jacarepagua_SCB
    Jacarepagua_SHORT
    Jerez_GP1988
    Jerez_GP2019
    Jerez_Standard
    Kansai_GP
    Kansai_Classic
    Kansai_East
    Kansai_West
    Kyalami_2019
    Kyalami_Historic
    Laguna_Seca_2020
    Le_Mans_24h
    Le_Mans_Circuit_Bugatti
    Londrina_short
    Londrina_long
    LondrinaKart1
    LondrinaKart2
    Long_Beach
    Montreal_Historic
    Montreal_Historic_1991
    Montreal_Modern
    Monza_1971_10k
    Monza_1971_10knc
    Monza_1971
    Monza_1991
    Monza_1971_Junior
    Monza_2020
    Monza_2020_Junior
    Nordschleife_2020
    Nordschleife_2020_24hr
    Nurb_GP_2020
    Nurb_GP_2020_Veedol
    Nurb_GP_2020_Sprint
    Nurb_GP_2020_Sprint_S
    Nurb_1971_Beton
    Nurb_1971_Gesamt
    Nurb_1971_Nords
    Nurb_1971_Suds
    Nurb_2020_RX
    Ortona1
    Ortona2
    Ortona3
    Ortona4
    OultonPark_International
    OultonPark_Classic
    OultonPark_Fosters
    OultonPark_Island
    Road_America_RC
    Road_America_RCB
    Salvador_Street_Circuit
    SantaCruzDoSul
    Silverstone_1975
    Silverstone_1975_No_Chicane
    Silverstone_1991
    Silverstone_2001
    Silverstone_2001_International
    Silverstone_2001_National
    Silverstone_GP
    Silverstone_Intl_2019
    Silverstone_Natl_2019
    Snetterton_100
    Snetterton_200
    Snetterton_300
    Spa_Francorchamps_1970 (this is the Chicane version)
    Spa_Francorchamps_1970_1000km (this is the No Chicane version)
    Spa_Francorchamps_1993
    Spa_Francorchamps_2020
    Spa_Francorchamps_2022
    Spa_Francorchamps_2022_RX
    Speedland1
    Speedland2
    Speedland3
    Speedland4
    Spielberg_Historic
    Spielberg_Vintage
    Spielberg_Modern
    Spielberg_Short
    Taruma_Internacional
    Taruma_Chicane
    Termas_Rio_Hondo
    Tykki_Dirt1
    Tykki_Dirt2
    Tykki_RX
    Tykki_Tarmac
    VeloCitta1
    VeloCittaTD
    VeloCittaClubDay
    Velopark_2010
    Velopark_2017
    Virginia_Full
    Virginia_Grand
    Virginia_North
    Virginia_Patriot
    Virginia_South
    Watkins_Glen_GP
    Watkins_Glen_GPIL
    Watkins_Glen_S
    Watkins_Glen_SIL


    Note: This is the only official post about custom AI drivers, and we keep it updated. Any posts below this one may be outdated or inaccurate.
     
    Last edited: Apr 1, 2024
    • Informative Informative x 29
    • Winner Winner x 13
    • Like Like x 12
  2. SaxOhare

    SaxOhare Well-Known Member AMS2 Club Member

    Joined:
    Mar 10, 2016
    Messages:
    2,235
    Likes Received:
    1,047
    Nice post,

    How can I determine what car the driver belongs to ?
    <driver livery_name="Ministry Motorsport #51"> meaning ?

    Thanks
     
  3. gian

    gian Administrator Staff Member AMS2 Club Member

    Joined:
    Mar 16, 2020
    Messages:
    91
    Likes Received:
    123
    Its the name of the livery that the driver belongs to (case sensitive), as seen in the vehicle selection screen in the game, check this screenshot:

    Livery.PNG
     
    • Informative Informative x 2
    • Like Like x 1
  4. F_B

    F_B Well-Known Member AMS2 Club Member

    Joined:
    Apr 25, 2016
    Messages:
    849
    Likes Received:
    776
    [​IMG]
     
    • Funny Funny x 3
  5. SaxOhare

    SaxOhare Well-Known Member AMS2 Club Member

    Joined:
    Mar 10, 2016
    Messages:
    2,235
    Likes Received:
    1,047
    Just to experiment a little

    I made a custom file for GT3 al cars are called after there number, so it will be easy to recognize the cars. ( Formula classic Gen3 is also included but not complete)
    Skill in each type of car 0.1,0.2 ..... 1
    And I added comments to keep the file organized

    I added the content below,
     

    Attached Files:

    • Like Like x 3
  6. SaxOhare

    SaxOhare Well-Known Member AMS2 Club Member

    Joined:
    Mar 10, 2016
    Messages:
    2,235
    Likes Received:
    1,047
    <?xml version="1.0" encoding="UTF-8"?>
    <custom_ai_drivers>
    <!-- GT3 -->
    <!-- McLaren -->
    <driver livery_name="McLaren 720S GT3 #04">
    <name>McLaren 04</name>
    <race_skill>0.1</race_skill>
    <weather_tyre_changes>1.0</weather_tyre_changes>
    </driver>
    <driver livery_name="McLaren 720S GT3 #06">
    <name>McLaren 06</name>
    <race_skill>0.2</race_skill>
    <weather_tyre_changes>1.0</weather_tyre_changes>
    </driver>
    <driver livery_name="McLaren 720S GT3 #12">
    <name>McLaren 12</name>
    <race_skill>0.3</race_skill>
    <weather_tyre_changes>1.0</weather_tyre_changes>
    </driver>
    <driver livery_name="McLaren 720S GT3 #14">
    <name>McLaren 14</name>
    <race_skill>0.4</race_skill>
    <weather_tyre_changes>1.0</weather_tyre_changes>
    </driver>
    <driver livery_name="McLaren 720S GT3 #27">
    <name>McLaren 27</name>
    <race_skill>0.5</race_skill>
    <weather_tyre_changes>1.0</weather_tyre_changes>
    </driver>
    <driver livery_name="McLaren 720S GT3 #38">
    <name>McLaren 38</name>
    <race_skill>0.6</race_skill>
    <weather_tyre_changes>1.0</weather_tyre_changes>
    </driver>
    <driver livery_name="McLaren 720S GT3 #45">
    <name>McLaren 45</name>
    <race_skill>0.7</race_skill>
    <weather_tyre_changes>1.0</weather_tyre_changes>
    </driver>
    <driver livery_name="McLaren 720S GT3 #72">
    <name>McLaren 72</name>
    <race_skill>0.8</race_skill>
    <weather_tyre_changes>1.0</weather_tyre_changes>
    </driver>
    <driver livery_name="McLaren 720S GT3 #80">
    <name>McLaren 80</name>
    <race_skill>0.9</race_skill>
    <weather_tyre_changes>1.0</weather_tyre_changes>
    </driver>
    <driver livery_name="McLaren 720S GT3 #90">
    <name>McLaren90</name>
    <race_skill>1.0</race_skill>
    <weather_tyre_changes>1.0</weather_tyre_changes>
    </driver>
    <!-- Porsche -->
    <driver livery_name="Porsche 911 GT3 R GT3 #05">
    <name>Porsche 05</name>
    <race_skill>0.1</race_skill>
    <weather_tyre_changes>1.0</weather_tyre_changes>
    </driver>
    <driver livery_name="Porsche 911 GT3 R GT3 #10">
    <name>Porsche 10</name>
    <race_skill>0.2</race_skill>
    <weather_tyre_changes>1.0</weather_tyre_changes>
    </driver>
    <driver livery_name="Porsche 911 GT3 R GT3 #03">
    <name>Porsche 03</name>
    <race_skill>0.3</race_skill>
    <weather_tyre_changes>1.0</weather_tyre_changes>
    </driver>
    <driver livery_name="Porsche 911 GT3 R GT3 #17">
    <name>Porsche 17</name>
    <race_skill>0.4</race_skill>
    <weather_tyre_changes>1.0</weather_tyre_changes>
    </driver>
    <driver livery_name="Porsche 911 GT3 R GT3 #41">
    <name>Porsche 41</name>
    <race_skill>0.5</race_skill>
    <weather_tyre_changes>1.0</weather_tyre_changes>
    </driver>
    <driver livery_name="Porsche 911 GT3 R GT3 #68">
    <name>Porsche 68</name>
    <race_skill>0.6</race_skill>
    <weather_tyre_changes>1.0</weather_tyre_changes>
    </driver>
    <driver livery_name="Porsche 911 GT3 R GT3 #70">
    <name>Porsche 70</name>
    <race_skill>0.7</race_skill>
    <weather_tyre_changes>1.0</weather_tyre_changes>
    </driver>
    <driver livery_name="Porsche 911 GT3 R GT3 #75">
    <name>Porsche 75</name>
    <race_skill>0.8</race_skill>
    <weather_tyre_changes>1.0</weather_tyre_changes>
    </driver>
    <driver livery_name="Porsche 911 GT3 R GT3 #82">
    <name>Porsche 82</name>
    <race_skill>0.9</race_skill>
    <weather_tyre_changes>1.0</weather_tyre_changes>
    </driver>
    <driver livery_name="Porsche 911 GT3 R GT3 #93">
    <name>Porsche 93</name>
    <race_skill>1.0</race_skill>
    <weather_tyre_changes>1.0</weather_tyre_changes>
    </driver>
    <!-- Mercedes-AMG -->
    <driver livery_name="Mercedes-AMG GT3 #01">
    <name>Mercedes-AMG 01</name>
    <race_skill>0.1</race_skill>
    <weather_tyre_changes>1.0</weather_tyre_changes>
    </driver>
    <driver livery_name="Mercedes-AMG GT3 #09">
    <name>Mercedes-AMG 09</name>
    <race_skill>0.2</race_skill>
    <weather_tyre_changes>1.0</weather_tyre_changes>
    </driver>
    <driver livery_name="Mercedes-AMG GT3 #15">
    <name>Mercedes-AMG 15</name>
    <race_skill>0.3</race_skill>
    <weather_tyre_changes>1.0</weather_tyre_changes>
    </driver>
    <driver livery_name="Mercedes-AMG GT3 #19">
    <name>Mercedes-AMG 19</name>
    <race_skill>0.4</race_skill>
    <weather_tyre_changes>1.0</weather_tyre_changes>
    </driver>
    <driver livery_name="Mercedes-AMG GT3 #33">
    <name>Mercedes-AMG 33</name>
    <race_skill>0.5</race_skill>
    <weather_tyre_changes>1.0</weather_tyre_changes>
    </driver>
    <driver livery_name="Mercedes-AMG GT3 #42">
    <name>Mercedes-AMG 42</name>
    <race_skill>0.6</race_skill>
    <weather_tyre_changes>1.0</weather_tyre_changes>
    </driver>
    <driver livery_name="Mercedes-AMG GT3 #60">
    <name>Mercedes-AMG 60</name>
    <race_skill>0.7</race_skill>
    <weather_tyre_changes>1.0</weather_tyre_changes>
    </driver>
    <driver livery_name="Mercedes-AMG GT3 #77">
    <name>Mercedes-AMG 77</name>
    <race_skill>0.8</race_skill>
    <weather_tyre_changes>1.0</weather_tyre_changes>
    </driver>
    <driver livery_name="Mercedes-AMG GT3 #81">
    <name>Mercedes-AMG 81</name>
    <race_skill>0.9</race_skill>
    <weather_tyre_changes>1.0</weather_tyre_changes>
    </driver>
    <driver livery_name="Mercedes-AMG GT3 #85">
    <name>Mercedes-AMG 85</name>
    <race_skill>1.0</race_skill>
    <weather_tyre_changes>1.0</weather_tyre_changes>
    </driver>
    <!-- BMW M6 -->
    <driver livery_name="BMW M6 GT3 #2">
    <name>BMW M6 2</name>
    <race_skill>0.1</race_skill>
    <weather_tyre_changes>1.0</weather_tyre_changes>
    </driver>
    <driver livery_name="BMW M6 GT3 #8">
    <name>BMW M6 8</name>
    <race_skill>0.2</race_skill>
    <weather_tyre_changes>1.0</weather_tyre_changes>
    </driver>
    <driver livery_name="BMW M6 GT3 #11">
    <name>BMW M6 11</name>
    <race_skill>0.3</race_skill>
    <weather_tyre_changes>1.0</weather_tyre_changes>
    </driver>
    <driver livery_name="BMW M6 GT3 #22">
    <name>BMW M6 22</name>
    <race_skill>0.4</race_skill>
    <weather_tyre_changes>1.0</weather_tyre_changes>
    </driver>
    <driver livery_name="BMW M6 GT3 #61">
    <name>BMW M6 61</name>
    <race_skill>0.5</race_skill>
    <weather_tyre_changes>1.0</weather_tyre_changes>
    </driver>
    <driver livery_name="BMW M6 GT3 #83">
    <name>BMW M6 83</name>
    <race_skill>0.6</race_skill>
    <weather_tyre_changes>1.0</weather_tyre_changes>
    </driver>
    <driver livery_name="BMW M6 GT3 #87">
    <name>BMW M6 87</name>
    <race_skill>0.7</race_skill>
    <weather_tyre_changes>1.0</weather_tyre_changes>
    </driver>
    <driver livery_name="BMW M6 GT3 #91">
    <name>BMW M6 91</name>
    <race_skill>0.8</race_skill>
    <weather_tyre_changes>1.0</weather_tyre_changes>
    </driver>
    <driver livery_name="BMW M6 GT3 #96">
    <name>BMW M6 96</name>
    <race_skill>0.9</race_skill>
    <weather_tyre_changes>1.0</weather_tyre_changes>
    </driver>
    <driver livery_name="BMW M6 GT3 #99">
    <name>BMW M6 99</name>
    <race_skill>1.0</race_skill>
    <weather_tyre_changes>1.0</weather_tyre_changes>
    </driver>
    <!-- Formula Classic Gen 3 -->
    <driver livery_name="Fathom Motorsport #3">
    <name>John Smith</name>
    <race_skill>1.0</race_skill>
    <weather_tyre_changes>1.0</weather_tyre_changes>
    </driver>
    <driver livery_name="Fathom Motorsport #4">
    <name>John Smith</name>
    <race_skill>1.0</race_skill>
    <weather_tyre_changes>1.0</weather_tyre_changes>
    </driver>
    <driver livery_name="Piratelli Racing #23">
    <name>John Smith</name>
    <race_skill>1.0</race_skill>
    <weather_tyre_changes>1.0</weather_tyre_changes>
    </driver>
    <driver livery_name="Piratelli Racing #24">
    <name>John Smith</name>
    <race_skill>1.0</race_skill>
    <weather_tyre_changes>1.0</weather_tyre_changes>
    </driver>
    <driver livery_name="LeClerc Sportif #25">
    <name>John Smith</name>
    <race_skill>1.0</race_skill>
    <weather_tyre_changes>1.0</weather_tyre_changes>
    </driver>
    <driver livery_name="LeClerc Sportif #26">
    <name>John Smith</name>
    <race_skill>1.0</race_skill>
    <weather_tyre_changes>1.0</weather_tyre_changes>
    </driver>
    <driver livery_name="Scuderia Milano #27">
    <name>John Smith</name>
    <race_skill>1.0</race_skill>
    <weather_tyre_changes>1.0</weather_tyre_changes>
    </driver>
    <driver livery_name="Scuderia Milano #28">
    <name>John Smith</name>
    <race_skill>1.0</race_skill>
    <weather_tyre_changes>1.0</weather_tyre_changes>
    </driver>
    <driver livery_name="Dajara Racing #35">
    <name>John Smith</name>
    <race_skill>1.0</race_skill>
    <weather_tyre_changes>1.0</weather_tyre_changes>
    </driver>
    <driver livery_name="Dajara Racing #36">
    <name>John Smith</name>
    <race_skill>1.0</race_skill>
    <weather_tyre_changes>1.0</weather_tyre_changes>
    </driver>
    <driver livery_name="Didcot Racing #5">
    <name>John Smith</name>
    <country>USA</country>
    <race_skill>0.75</race_skill>
    <qualifying_skill>0.823</qualifying_skill>
    <aggression>0.3</aggression>
    <defending>0.51</defending>
    <stamina>0.998</stamina>
    <consistency>0.2</consistency>
    <start_reactions>0.36</start_reactions>
    <wet_skill>0.25</wet_skill>
    <tyre_management>0.85</tyre_management>
    <blue_flag_conceding>0.53</blue_flag_conceding>
    <weather_tyre_changes>1.0</weather_tyre_changes>
    </driver>
    <driver livery_name="Didcot Racing #5">
    <name>William Shakespeare</name>
    <country>GBR</country>
    <race_skill>0.12</race_skill>
    <qualifying_skill>0.0</qualifying_skill>
    <consistency>1.0</consistency>
    <weather_tyre_changes>1.0</weather_tyre_changes>
    </driver>
    <driver livery_name="Lewis Homes Racing #15">
    <name>Lorem Ipsum</name>
    <weather_tyre_changes>1.0</weather_tyre_changes>
    </driver>
    <driver livery_name="Lewis Homes Racing #16">
    <name>John Smith</name>
    <stamina>1.0</stamina>
    <weather_tyre_changes>1.0</weather_tyre_changes>
    </driver>
    <driver livery_name="Aurora Motorsports #17">
    <name>John Smith</name>
    <race_skill>1.0</race_skill>
    <weather_tyre_changes>1.0</weather_tyre_changes>
    </driver>
    <driver livery_name="Aurora Motorsports #18">
    <race_skill>1.0</race_skill>
    <weather_tyre_changes>1.0</weather_tyre_changes>
    </driver>
    <driver livery_name="Torino Corse #32">
    <race_skill>1.0</race_skill>
    </driver>
    <driver livery_name="Torino Corse #33">
    <race_skill>1.0</race_skill>
    <weather_tyre_changes>1.0</weather_tyre_changes>
    </driver>
    </custom_ai_drivers>
     
    Last edited: Nov 19, 2021
    • Like Like x 1
  7. Brett Nagle

    Brett Nagle Well-Known Member AMS2 Club Member

    Joined:
    Oct 14, 2016
    Messages:
    1,183
    Likes Received:
    654
    So I am a little confused by this.

    <driver livery_name="ABS Racing #14">
    <name>William Shakespeare</name>
    <country>GBR</country>
    <race_skill>0.12</race_skill>
    <qualifying_skill>0.0</qualifying_skill>
    <consistency>1.0</consistency>
    </driver>
    <driver livery_name="Bradley GP #12">
    <name>Lorem Ipsum</name>
    </driver>
    <driver livery_name="Full Time Sports #111">
    <stamina>1.0</stamina>
    </driver>
    <driver livery_name="Eurofarma RC #29">
    <race_skill>1.0</race_skill>
    </driver>
    </custom_ai_drivers>

    what does this portion of the example code allude to if the example is pointing at the #51 formula classic gen 3 #51 car? Also what happens if we say want to exclude certain cars from being selected? Like say I want to do a multi class race and I only want 3 McLaren GT3s chosen. How do I make sure only the 3 I want get selected and so on and so fourth for the rest of the vehicles?
     
  8. gian

    gian Administrator Staff Member AMS2 Club Member

    Joined:
    Mar 16, 2020
    Messages:
    91
    Likes Received:
    123
    The example isnt just for the #51 car. The example contains 5 overriden drivers, 1 for each livery_name specified, only one of them is for the #51 car. You can add drivers for as many liveries as you want.
     
    • Informative Informative x 1
  9. Reiche

    Reiche Member AMS2 Club Member

    Joined:
    May 18, 2016
    Messages:
    30
    Likes Received:
    25
    Can you put the code in spoilers/„Code“? So the reader won’t have to scroll through a wall of text?

    like this

    or that


    Code:
    This here
    Is just
    An example
    i guess spoiler’s best suited
     
    • Like Like x 1
    • Informative Informative x 1
  10. MrRandom287

    MrRandom287 Active Member AMS2 Club Member

    Joined:
    Mar 30, 2016
    Messages:
    101
    Likes Received:
    34
    Even works with a custom livery name (e.g. Team Red #1) in the livery overrides section.

    Awesome job :)
     
    • Like Like x 1
    • Agree Agree x 1
  11. Harry H

    Harry H Active Member AMS2 Club Member

    Joined:
    Mar 25, 2020
    Messages:
    232
    Likes Received:
    193
    ...but if you customize every car in a given livery set and then create a custom championship with fewer than the max cars for that set, it should be the same customized drivers that show up in every round, right?
     
    Last edited by a moderator: Dec 13, 2021
  12. Harry H

    Harry H Active Member AMS2 Club Member

    Joined:
    Mar 25, 2020
    Messages:
    232
    Likes Received:
    193
    Here's a fictional set of drivers for the Ginetta G40 Cup car, with random skill / aggression / consistency values. It's just so nice to see some different names on the grid at last!
     

    Attached Files:

  13. Harry H

    Harry H Active Member AMS2 Club Member

    Joined:
    Mar 25, 2020
    Messages:
    232
    Likes Received:
    193
    Answering my own question: yes
     
    • Informative Informative x 2
    • Funny Funny x 1
  14. SaxOhare

    SaxOhare Well-Known Member AMS2 Club Member

    Joined:
    Mar 10, 2016
    Messages:
    2,235
    Likes Received:
    1,047
    I made a Custom file for the Formula V10 2000 skins made by Alain Fry and his friends
    [AMS2] F1 2000 Season

    Based on these values

    View attachment 17955
    All values are related to the end score in the WK, except the rain values, these are based on the Race in Canada
    tyre_management, stamina, consistency and blue_flag_conceding still have the same value for every driver.
    (Toyota probably had test drivers, I choose Ryan Briscoe and Allan McNish)

    Tanks to Alain Fry and friends for making these skin

    <<< System Changed File doesn't work anymore >>>>
     
    Last edited: Nov 23, 2021
    • Like Like x 8
    • Winner Winner x 5
    • Creative Creative x 2
  15. 2ndLastJedi

    2ndLastJedi Free speech matters AMS2 Club Member

    Joined:
    Sep 7, 2016
    Messages:
    4,908
    Likes Received:
    2,150
    I so glad we have a community with brains because... Screenshot_20211120-213717_Google.jpg
     
    • Funny Funny x 2
    • Like Like x 1
    • Agree Agree x 1
  16. F_B

    F_B Well-Known Member AMS2 Club Member

    Joined:
    Apr 25, 2016
    Messages:
    849
    Likes Received:
    776
    Great to see the first creations here, keep it coming. :)
     
    Last edited by a moderator: Dec 13, 2021
    • Agree Agree x 1
  17. SaxOhare

    SaxOhare Well-Known Member AMS2 Club Member

    Joined:
    Mar 10, 2016
    Messages:
    2,235
    Likes Received:
    1,047
    Edit
     
    Last edited: Nov 23, 2021
    • Like Like x 1
  18. Harry H

    Harry H Active Member AMS2 Club Member

    Joined:
    Mar 25, 2020
    Messages:
    232
    Likes Received:
    193
    I've never used scripts but I have managed to run it using your code. But how do I construct the .csv? Do I create the headers per column in an .xls (in row 1) and then put the data for each livery etc., under those headers for each driver (in rows 2,3,4 etc), then export as a .csv?

    Thanks for any help, Sax!
     
  19. SaxOhare

    SaxOhare Well-Known Member AMS2 Club Member

    Joined:
    Mar 10, 2016
    Messages:
    2,235
    Likes Received:
    1,047
    I put the data in a spreadsheet , (you can add extra columns for WK-standing or a special race like I did in the example in post #25 above, this makes it each to reorder the rows if you want some order in the values, I removed these columns before the export to csv)


    <<< System Changed File doesn't work anymore >>>>
     
    Last edited: Nov 24, 2021
    • Like Like x 1
  20. Harry H

    Harry H Active Member AMS2 Club Member

    Joined:
    Mar 25, 2020
    Messages:
    232
    Likes Received:
    193
    doh! I missed your first .xls file. Extra info is useful though, thanks!
     

Share This Page