Force AI pit stop?

Discussion in 'Automobilista - Help & Support' started by Emi Macht, Jun 30, 2016.

  1. Emi Macht

    Emi Macht New Member

    Joined:
    Jun 30, 2016
    Messages:
    4
    Likes Received:
    1
    So I've done some races with the boxer cup in Montreal, and I've noticed something.

    If I set a race by time (tried with 50 minutes, which is roughly 29 laps), the AI stops half way through (around lap 14) for fuel and tires. But, if I set the race for 30 laps, they won't stop. Ever. I guess they will stop if I race like 200 laps before they ran out of fuel.

    Is there a way to enforce the AI to make at least one pit stop, while racing with laps, not time?
     
  2. gongo

    gongo Well-Known Member AMS2 Club Member

    Joined:
    Mar 21, 2016
    Messages:
    370
    Likes Received:
    351
    -
     
    Last edited: Jan 16, 2021
  3. keith windsor

    keith windsor Active Member AMS2 Club Member

    Joined:
    Mar 9, 2016
    Messages:
    495
    Likes Received:
    206
    You can tell each of your AI drivers how many times to pit and what laps to pit on. Takes a bit of work, but once you have created your list of drivers you can copy/paste and vary the lap numbers from track to track.

    In the GDB file, add the following lines:

    PitStopStrategies
    {
    Nigel Mansell = 2 - 20,30
    Riccardo Patrese = 2 - 25,50
    Alain Prost = 3 - 15,30,45
    }


    Explanation:
    Nigel Mansell = 2 - 20,30
    Nigel Mansell is the name of the driver as used in the veh file
    2 is the number of pit stops
    20,30 are the lap numbers that the driver will stop on

    IMPORTANT For this to work you must type it EXACTLY in the format shown above i.e there must be spaces round the = and the - and NO spaces between the lap numbers.
     
    • Like Like x 2
    • Winner Winner x 1
    • Useful Useful x 1
  4. Emi Macht

    Emi Macht New Member

    Joined:
    Jun 30, 2016
    Messages:
    4
    Likes Received:
    1
    Wow, very nice. Thank you.

    I have one more question. Can I invent the driver's name? Or do I have to check what they are, and use those exact same generic names?
     
  5. keith windsor

    keith windsor Active Member AMS2 Club Member

    Joined:
    Mar 9, 2016
    Messages:
    495
    Likes Received:
    206
    For the pitstrategies to work, the driver name must match EXACTLY with the driver name in each veh file of the cars that are racing with you.

    If you wanted to change driver names, then that takes a bit more work - you must edit each veh file, change the driver name (note it appears twice in each veh file so change it in both places), and ALSO you would need to change the names in the talent files to match otherwise the driver performance will be adversely affected.
     
    • Like Like x 1
    • Winner Winner x 1
  6. Emi Macht

    Emi Macht New Member

    Joined:
    Jun 30, 2016
    Messages:
    4
    Likes Received:
    1
    I see. Do you know if the game uses the same names for every series? So, if I change the pitstops in one circuit, it changes it in every car I race there.
     
  7. DaVeX

    DaVeX AMSUnofficial Staff AMS2 Club Member

    Joined:
    Mar 8, 2016
    Messages:
    1,970
    Likes Received:
    1,041
    ...will be good a way to randomize this settings every race...no one at reiza can give a look at this?
     
  8. Emi Macht

    Emi Macht New Member

    Joined:
    Jun 30, 2016
    Messages:
    4
    Likes Received:
    1
    So, just an update in case anyone is reading this in the future.

    Aparently the AI follow the exact same strategy that you set in the garage menu (where you set number of stops and fuel in each stop). So, yeah, just set that as non zero (which is what I was doing) and the AI will stop.

    One thing to note, they'll stop when the tank is empty, not at half distance, so if some players save more fuel than others (which does happen) they'll stop later. It mixes things up a bit really. It can make races a bit more interesting =)
     
    • Like Like x 1
  9. Freddy Ozanne

    Freddy Ozanne New Member AMS2 Club Member

    Joined:
    Aug 24, 2016
    Messages:
    6
    Likes Received:
    0
    Hi mister thank you for this!! I have the same probleme and I didn't know how to fix it. My futur race will always by time and not by laps. Thanks again.
    Sorry for my poor english :oops:
     
  10. mkel1966

    mkel1966 Active Member AMS2 Club Member

    Joined:
    Mar 10, 2016
    Messages:
    101
    Likes Received:
    26
    Sorry to have revived this, but does this work still? I used this for Buenos Aires#15 with Formula Classic but they just won't pit. Is there something wrong with the parameters?
    pitstop002.jpg
     
  11. keith windsor

    keith windsor Active Member AMS2 Club Member

    Joined:
    Mar 9, 2016
    Messages:
    495
    Likes Received:
    206
    I haven't tried it for quite a while, but one thing I see wrong is that you have

    PitStopStrategies_26

    You should remove the _26 so that it just reads

    PitStopStrategies

    The other lines look ok I think.
     
  12. mkel1966

    mkel1966 Active Member AMS2 Club Member

    Joined:
    Mar 10, 2016
    Messages:
    101
    Likes Received:
    26
    Hi Keith.."_26" was not there when I used it. I just added it when I posted here. But yes, I couldn't use this anymore. I don't know why.
     
  13. keith windsor

    keith windsor Active Member AMS2 Club Member

    Joined:
    Mar 9, 2016
    Messages:
    495
    Likes Received:
    206
    I just did some tests for this and it does still work, but:

    It works in cars that are allowed to refuel, but not in cars that don't refuel (such as Formula Classics).
    BUT you can still get it to work in any other car, if you select them from the 'All cars and tracks' menu.
     
  14. mkel1966

    mkel1966 Active Member AMS2 Club Member

    Joined:
    Mar 10, 2016
    Messages:
    101
    Likes Received:
    26
    The only cars that can be refueled in "All Cars & Tracks" menu are the Marcas and Formula Vee, and I checked each one from that group of cars that can't be refueled. I'll try the forced pitstopstrategy for Formula Classic in "All Cars & Tracks" menu. Thanks for checking out.:)
     
  15. mkel1966

    mkel1966 Active Member AMS2 Club Member

    Joined:
    Mar 10, 2016
    Messages:
    101
    Likes Received:
    26
    Yup..the force AI PitStopStrategies works for Formula Classic in "All Cars & Tracks" menu. Happy camper here now.:):):)
     
  16. Philip00

    Philip00 Member

    Joined:
    Apr 11, 2016
    Messages:
    95
    Likes Received:
    27
    They are pit only to change tire or they are refuel also even it is banned?
     
    Last edited: Aug 29, 2017
  17. mkel1966

    mkel1966 Active Member AMS2 Club Member

    Joined:
    Mar 10, 2016
    Messages:
    101
    Likes Received:
    26
    I'm sure they change tires but not refueling. Whenever I force AI to pit, I make tire wear and fuel usage to normal. For me, as long as they pit(and me, too) because it can change the outcome of the race.
     
  18. Val Hoggard

    Val Hoggard New Member

    Joined:
    May 13, 2022
    Messages:
    24
    Likes Received:
    1
    Howdy all, I am curious to know where you can make AI changes in AMS 2?

    Thanks!
     
    Last edited: Jul 7, 2022

Share This Page