Information for Customizing AI drivers in AMS2

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

  1. stealthradek

    stealthradek Smoothie operator AMS2 Club Member

    Joined:
    Nov 22, 2020
    Messages:
    789
    Likes Received:
    683
    Hi @gian - would you be able to clarify the logic/connection between race_skill custom AI XML parameter and Opponent Skill Level setting? How does XML affect global setting (or vice versa)? We've discussed it here above (Information for Customizing AI drivers in AMS2 V1.3 and post below the linked), but I couldn't find any information clarifying this.

    This would be useful to understand so the custom AI files can be produced in a more scalable way so their performance can be adjusted. Plus it would be good to know what values to use when scaling single car grid (I bet it'll get more complicated when combining custom AI with different cars from the same class due to BOP etc).

    Thanks in advance!
     
  2. krissangel

    krissangel Member AMS2 Club Member

    Joined:
    Mar 8, 2016
    Messages:
    47
    Likes Received:
    6
    Could you share, plz ?
     
  3. SaxOhare

    SaxOhare Well-Known Member AMS2 Club Member

    Joined:
    Mar 10, 2016
    Messages:
    2,235
    Likes Received:
    1,047
    Just made a quick test and it seems to work , Values are complete bogus !!!!
     

    Attached Files:

    • Like Like x 1
  4. br1x92

    br1x92 Active Member

    Joined:
    Aug 1, 2021
    Messages:
    329
    Likes Received:
    146
    I let the full Qualifying run for my testing though, as just skipping it resulted in in ridiculous laptimes since I had to BoP the whole class with the AI driver strength so there were drivers in the Porsche with a value of up to 1 and in the Merc of a maximum of 0.78 I believe that run very competitive laptimes. When I skipped, the game just calculated the times based on the values and completely ignored the car, so the Porsche drivers were more than 2 seconds faster than the Merc drivers.
     
    • Informative Informative x 1
  5. Scraper

    Scraper Well-Known Member AMS2 Club Member

    Joined:
    Aug 9, 2016
    Messages:
    1,311
    Likes Received:
    1,038
    GPLaps would like to know if anyone has played around with AMS2 enough to know if theres a way to prevent an AI from using the same skin as him. Right now if he selects a skin there is a duplicate AI driver with it. Maybe he has too many AI selected?

    (Any help with this will make it more likely that GPLaps will feature AMS2 in his videos.) ;)
     
  6. chonk

    chonk Well-Known Member AMS2 Club Member

    Joined:
    Jul 3, 2021
    Messages:
    502
    Likes Received:
    265
    They need to use a custom AI file, but avoid assigning the livery they want to use. For example the DPi class has 15 liveries available, they would need to create a custom AI file with 14 or less drivers. The remaining skins will then be available for the player.

    It's the same story with muliticlass except that each class needs a custom file to set the number of drivers in each class. This also works for championships.

    And when you set your number of opponents it seems to need to be 1 less than the number of AI drivers defined. So 14 DPi + 14 GT3 = 27 opponents. This might not be the case though when choosing an unnassigned livery. I can't remember off the top of my head. But you definitely can't choose more opponents than you've assigned in the custom files.

    Edit:
    Also in the custom AI file it isn't necessary to add in all the skill values etc, just the basics, driver name, country etc are enough. Default skill levels for that ID seem to then be used. So you still get the normal variation we have when driving against the stock AI.
     
    Last edited: Dec 12, 2021
    • Informative Informative x 3
    • Like Like x 1
  7. Scraper

    Scraper Well-Known Member AMS2 Club Member

    Joined:
    Aug 9, 2016
    Messages:
    1,311
    Likes Received:
    1,038
    @chonk Thank you. I'll pass it on.
     
  8. Marg

    Marg Active Member

    Joined:
    Dec 7, 2021
    Messages:
    127
    Likes Received:
    49
    SaxOhare already did it. My is here, but I added Andretti, Hunt as well for a couple of default red-white liveries.
     

    Attached Files:

    • Like Like x 1
  9. stlutz

    stlutz Active Member

    Joined:
    Feb 10, 2021
    Messages:
    194
    Likes Received:
    93
    In a custom championship, are the AI values read when you st it up the first time or each race?

    Same car has won the first 4 races in the one I've got going now--didn't know if modifying the values a bit would make any difference for the rest of the races.
     
  10. deadly

    deadly Well-Known Member

    Joined:
    Jul 8, 2016
    Messages:
    1,519
    Likes Received:
    532
    delete, sry, wrong thread.
     
  11. gian

    gian Administrator Staff Member AMS2 Club Member

    Joined:
    Mar 16, 2020
    Messages:
    95
    Likes Received:
    128
    each race. If you change the values on a ongoing championship they will make a difference (the xml files are read during ams2 splash screen and they aren't saved in the championship savegame file)
     
    • Like Like x 1
  12. hollow88

    hollow88 New Member

    Joined:
    Dec 13, 2021
    Messages:
    4
    Likes Received:
    0
    Why couldn't it be a tab in the settings menu? The first post on this thread says that it has to be a file named after the vehicle class placed in the game folder. Two posts later it's custom_ai_drivers in Documents folder. I spent 4 hours restarting the game every time, nothing seems to work.
     
  13. gian

    gian Administrator Staff Member AMS2 Club Member

    Joined:
    Mar 16, 2020
    Messages:
    95
    Likes Received:
    128
    The first post is the valid official one (we keep it updated). The other posts were while the feature was being developed in beta branch and a lot has changed since then. I deleted now some of the posts with outdated info to not confuse new users.
     
    Last edited: Dec 13, 2021
    • Like Like x 1
  14. deadly

    deadly Well-Known Member

    Joined:
    Jul 8, 2016
    Messages:
    1,519
    Likes Received:
    532
    Works that way. Click on "Spoiler" in first post and you get a list of the correct names for the files.
     
  15. hollow88

    hollow88 New Member

    Joined:
    Dec 13, 2021
    Messages:
    4
    Likes Received:
    0
    Thanks for the help, I got it to work, but not really. Country flag stays Brazil for everyone for some reason
     
  16. deadly

    deadly Well-Known Member

    Joined:
    Jul 8, 2016
    Messages:
    1,519
    Likes Received:
    532
    you need to use the iso codes for the flags:
    ISO 3166-1 - Wikipedia
     
    • Informative Informative x 2
  17. gian

    gian Administrator Staff Member AMS2 Club Member

    Joined:
    Mar 16, 2020
    Messages:
    95
    Likes Received:
    128
    I explained here, but i will paste this info in first post too:

     
    • Informative Informative x 3
    • Winner Winner x 1
  18. gian

    gian Administrator Staff Member AMS2 Club Member

    Joined:
    Mar 16, 2020
    Messages:
    95
    Likes Received:
    128
    My best suggestion is testing and seeing if each driver is matching the performance you expect, then fine tune the values until you are happy with the performance of each driver. There's no true "correct" values to use
     
    • Agree Agree x 3
    • Like Like x 1
  19. stealthradek

    stealthradek Smoothie operator AMS2 Club Member

    Joined:
    Nov 22, 2020
    Messages:
    789
    Likes Received:
    683
    Thanks, that explains it perfectly. The correlation is what I suspected but I couldn't see the confirmation.

    I have worded my original question terribly :D

    What I'm after is whether different values should be added to driver if a specific car is used from the class or should they be all treated equally so skill itself is unaffected by car? For example BMW is fastest from GTE class, but AI doesn't seem to take notice so if I put my 100% top driver then laptimes/pace shouldn't change significantly regardless of the car chosen? Or do we have to bump up AI skills slightly to accommodate "slower" cars to balance the field? Hope it makes sense now.
     
  20. hollow88

    hollow88 New Member

    Joined:
    Dec 13, 2021
    Messages:
    4
    Likes Received:
    0
    You mean the numeric code?
     

Share This Page