1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Information for Customizing AI drivers in AMS2

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

  1. SaxOhare

    SaxOhare Well-Known Member AMS2 Club Member

    Joined:
    Mar 10, 2016
    Messages:
    2,235
    Likes Received:
    1,047
    What country codes can we use so they are recognized by the game ?
     
  2. F_B

    F_B Well-Known Member AMS2 Club Member

    Joined:
    Apr 25, 2016
    Messages:
    849
    Likes Received:
    776
    When I try to copy/paste the XML code to a new document there's always double " added everywhere, so it is quite tedious to delete them all again. Am I missing something here?
    fyi: I'm editing in OpenOffice, perhaps that might be a reason?
     
  3. Rober

    Rober Member

    Joined:
    Jul 7, 2020
    Messages:
    55
    Likes Received:
    71
    Never use Office-like programs for programming/editing code files: Notepad++, Atom, PSPad, VS Code, etc. Those can even check the "validity" of the files.
     
    • Agree Agree x 2
    • Informative Informative x 1
    • Useful Useful x 1
  4. kkdrummer

    kkdrummer Well-Known Member AMS2 Club Member

    Joined:
    Jun 25, 2016
    Messages:
    1,576
    Likes Received:
    761
    Yeah good shout. Notepad plus is great and I would recommend a quick download for this job.
    Using word docs will mess up your special characters etc.
     
  5. stealthradek

    stealthradek Smooth operatooooooor AMS2 Club Member

    Joined:
    Nov 22, 2020
    Messages:
    757
    Likes Received:
    658
    I'll see what if there's anything I can do about but I have little control over how software handles it. The output is generated correctly as far as it is displayed in XML tab.

    As a workaround I'd suggest pasting the output to Notepad (or other pure text editor) and find/replace "" with ".
     
  6. F_B

    F_B Well-Known Member AMS2 Club Member

    Joined:
    Apr 25, 2016
    Messages:
    849
    Likes Received:
    776
    Yep, that’s the strange thing: in the XML tab everything looks good. Perhaps it’s just a thing the native text edit app in Windows can’t handle? Or it’s because I open your file in OpenOffice. Will try what the guys above have said.
     
    • Like Like x 1
  7. azaris

    azaris Well-Known Member AMS2 Club Member

    Joined:
    Aug 30, 2020
    Messages:
    1,177
    Likes Received:
    584
    It's actually the opposite to that suggested by others, it only works if you copy-paste the XML to another Office suite program (like Word), otherwise you get all content of the cells wrapped inside a "" (with every quotation mark within the xml file doubled):

    https://answers.microsoft.com/en-us...ell-with/28e23792-4b66-4d6b-94f9-4720c238659a
     
    • Agree Agree x 1
    • Informative Informative x 1
  8. stealthradek

    stealthradek Smooth operatooooooor AMS2 Club Member

    Joined:
    Nov 22, 2020
    Messages:
    757
    Likes Received:
    658
    Ladies and gentlemen - thank you for your feedback and pointing me in the right direction. Given that this issue seems to appear only on multi-line cells I've removed the indentation and hopefully this fixes the issue.

    The output is less readable, but the XML is definitely valid and should work seamlessly regardless of your Excel/Open Office stack.

    So you can re-download the file and see XML (no indents) worksheet.

    AMS2 AI XML generator.xlsx

    Let the creativity begin (again)!
     
    Last edited: Dec 3, 2021
    • Like Like x 5
    • Winner Winner x 2
    • Friendly Friendly x 2
  9. Sparviero

    Sparviero Member

    Joined:
    Aug 10, 2021
    Messages:
    78
    Likes Received:
    25
    Is it just me or multiclass/championship custom grid was not fixed in 1.3.1?
     
  10. chonk

    chonk Well-Known Member AMS2 Club Member

    Joined:
    Jul 3, 2021
    Messages:
    502
    Likes Received:
    265
    I tried setting it up briefly last night, but so far no joy. I may very well be doing it wrong though.
     
  11. deadly

    deadly Well-Known Member

    Joined:
    Jul 8, 2016
    Messages:
    1,512
    Likes Received:
    532
    Does the country flag work for you, guys? My game just shows me any flags at the end of the race.

    Example: Have this driver within a mod, should be british, but game shows any random flag, like the ones from Thailand or Colombia. It is the same with all cars.

    <driver livery_name="Team Havoline Racing #5">
    <name>Nigel Mansell</name>
    <country>GBR</country>
    <race_skill>1.0</race_skill>
    <qualifying_skill>1.0</qualifying_skill>
    <start_reactions>0.95</start_reactions>
    <blue_flag_conceding>1.0</blue_flag_conceding>
    <weather_tyre_changes>0.90</weather_tyre_changes>
    </driver>

    Am I doing something wrong?
     
    Last edited: Dec 4, 2021
    • Agree Agree x 2
    • Like Like x 1
  12. F_B

    F_B Well-Known Member AMS2 Club Member

    Joined:
    Apr 25, 2016
    Messages:
    849
    Likes Received:
    776
    No, same here.
    Even in MP my country flag sometimes changes randomly.
     
    • Like Like x 2
  13. deadly

    deadly Well-Known Member

    Joined:
    Jul 8, 2016
    Messages:
    1,512
    Likes Received:
    532
    Thanks, so it's not my inability to edit the files the right way. ;)
     
    • Funny Funny x 1
  14. DaveC187

    DaveC187 Member

    Joined:
    Aug 2, 2020
    Messages:
    62
    Likes Received:
    55
    Hey guys, question on driver count.
    If I create a custom AI grid using all the liveries of a given car and then start a race / championship with AI count that exceeds the number of liveries, how do I prevent duplicate names? In other words, in a race with duplicate liveries, how do I prevent the same driver name from appearing?
    Ex. I create custom AI grid using Arc Camaro, which has 20 liveries. Then I set up a race with 28 AI cars. There are cars with the same name in the race. Is there a way to edit this? Like have 2 different AI names for the same livery?
    Thanks
     
  15. sampopel

    sampopel Active Member AMS2 Club Member

    Joined:
    Mar 31, 2020
    Messages:
    337
    Likes Received:
    150
    Have lists of default skin names been published to save having to manually go through each car in game and type out the full name?
     
    • Optimistic Optimistic x 1
  16. chonk

    chonk Well-Known Member AMS2 Club Member

    Joined:
    Jul 3, 2021
    Messages:
    502
    Likes Received:
    265
    So it is working now, you just have to be more specific then I thought, I haven't tested it in a championship though.

    You need a custom AI driver file for each class you want to use and each of those files should only have the number of drivers you want that class to have in the race. Then you need to set the number of opponents to the total number of drivers -1. The -1 being your spot.

    Edit: just to add I couldn't be happier. This is such an awesome addition the games thank you so much @gian it is very much appreciated.
     
    Last edited: Dec 4, 2021
    • Informative Informative x 1
  17. RockettSally

    RockettSally The Average AMS2 enjoyer

    Joined:
    Mar 31, 2020
    Messages:
    75
    Likes Received:
    76
    So, two things.

    1 - Where can I get all the available flags?
    2 - The flags themselves are bugged and are swapped with other, unrelated flags (possibly assuming old AI flags?)

    But damn, this addition is such a wondeful piece of immersion!
     
    • Agree Agree x 3
  18. br1x92

    br1x92 Active Member

    Joined:
    Aug 1, 2021
    Messages:
    327
    Likes Received:
    146
     
    • Useful Useful x 1
  19. Rob Fitness

    Rob Fitness Active Member AMS2 Club Member

    Joined:
    Mar 28, 2016
    Messages:
    141
    Likes Received:
    154
    As others have reported 3 letter flag codes doesn't work for me, have tried a couple to experiment and definitely seems to not work. AUS & NZL .
     
  20. br1x92

    br1x92 Active Member

    Joined:
    Aug 1, 2021
    Messages:
    327
    Likes Received:
    146
    Didn't work for me either but that's what we are supposed to use.
    Current patchlog also has this:
    But I didn't have the chance to try 1.3.1.0 yet, so I can't confirm.
     

Share This Page