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

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 Dan Allongo Reiza Backer

    Joined:
    Mar 21, 2016
    Messages:
    370
    Likes Received:
    351
    It seems that racing for laps, the AI will always take on as much fuel as they need to make it all the way through the race. The only way that I've managed to make them pit with race length in laps is to increase fuel and tire wear.
     
  3. keith windsor

    keith windsor Active Member Reiza Backer

    Joined:
    Mar 9, 2016
    Messages:
    350
    Likes Received:
    134
    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 Reiza Backer

    Joined:
    Mar 9, 2016
    Messages:
    350
    Likes Received:
    134
    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 Reiza Backer

    Joined:
    Mar 8, 2016
    Messages:
    1,217
    Likes Received:
    453
    ...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 Reiza Backer

    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 Member Reiza Backer

    Joined:
    Mar 10, 2016
    Messages:
    55
    Likes Received:
    11
    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 Reiza Backer

    Joined:
    Mar 9, 2016
    Messages:
    350
    Likes Received:
    134
    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 Member Reiza Backer

    Joined:
    Mar 10, 2016
    Messages:
    55
    Likes Received:
    11
    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 Reiza Backer

    Joined:
    Mar 9, 2016
    Messages:
    350
    Likes Received:
    134
    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 Member Reiza Backer

    Joined:
    Mar 10, 2016
    Messages:
    55
    Likes Received:
    11
    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 Member Reiza Backer

    Joined:
    Mar 10, 2016
    Messages:
    55
    Likes Received:
    11
    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:
    86
    Likes Received:
    24
    They are pit only to change tire or they are refuel also even it is banned?
     
    Last edited: Aug 29, 2017
  17. mkel1966

    mkel1966 Member Reiza Backer

    Joined:
    Mar 10, 2016
    Messages:
    55
    Likes Received:
    11
    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.
     

Share This Page