How to set pitstops in Rfactor 2

Discussion in 'General Discussion' started by FullThrottleF1, Apr 28, 2015.

  1. peterchen

    peterchen Registered

    Joined:
    Oct 25, 2011
    Messages:
    2,099
    Likes Received:
    287
    Yes, that´s how I understood this. But it doesn´t work!
    Seems as we are on a bug here.

    Just out of interest: Do you have FixedSetups and FixedAISetup in player.JSON on or off?
     
  2. Yurich77

    Yurich77 Registered

    Joined:
    Jul 5, 2015
    Messages:
    14
    Likes Received:
    1
    I've tryed both with no result
     
  3. fluffert

    fluffert Registered

    Joined:
    Jan 12, 2012
    Messages:
    35
    Likes Received:
    4
    I'd like to see the GDB approach reinstated - it worked exactly as intended in rF1, not sure why it was left out!
     
    RoboCAT10 likes this.
  4. AceLain

    AceLain Registered

    Joined:
    Jan 13, 2012
    Messages:
    551
    Likes Received:
    43
    A quick way to test this is to change something obvious on the setup, like change the gear ratio to something really really short and watch if the IA hit the limiter really really soon.
    You will quickly find if the assign IA works or not.

    Where I think your problem is, is that the IA as something that they are changing... they are changing their fuel and their tires (I think)
    so if you put them with rain tire and its dry, they should have dry tires on the track even if you put rain.
    It is part of their "intelligence" they are changing the fuel if the race is short too.

    Again, Never tested it myself, put it was always something logical that I thought was like that
     
  5. Yurich77

    Yurich77 Registered

    Joined:
    Jul 5, 2015
    Messages:
    14
    Likes Received:
    1
    Fuel amount in my test setup was only for one lap,so I'm 100% sure,when it works or not.
    The most important goal is to know - does it work with others and I'm just doing something wrong or we have some kind of bug here as peterchen suggested above.
     
  6. RoboCAT10

    RoboCAT10 Registered

    Joined:
    Oct 18, 2014
    Messages:
    639
    Likes Received:
    114
    I've found that the AI done follow the fuel settings. I've tested it over and over with obvious gear changes and the AI follow that. However they don't follow fuel and tires, which is a shame as it would be great to have some various strategies and make the racing more exiting.

    When you are in the garage click on an AI driver, choose your setup, and click AI setup. This should then be saved in the settings folder and the AI should then use this setup for that track from now on.

    I honestly wish and hope that the track GDB pit settings would return, that was absolutely perfect to be able to choose what laps the AI pit on.
     
  7. MarcG

    MarcG Registered

    Joined:
    Oct 4, 2010
    Messages:
    6,854
    Likes Received:
    2,234
    As peterchen (I believe, maybe wrong) brilliantly alluded to in the Wish List forum, the Pit Strategies would be much better in the RCD files.
     
  8. Yurich77

    Yurich77 Registered

    Joined:
    Jul 5, 2015
    Messages:
    14
    Likes Received:
    1
    Strange,but I've got fuel setup working with AI, but only when AI make a stop inside session after doing some laps on track.
    The other way I think might be work is to assign every AI different HDV file with different fuel tank size.
     
  9. RoboCAT10

    RoboCAT10 Registered

    Joined:
    Oct 18, 2014
    Messages:
    639
    Likes Received:
    114
    When you say they make a stop inside session, does this mean the AI are following their fuel setups? Does the AI driver pit for you depending on his fuel amount?

    That's an interesting idea and you should give it a go. The only thing is though is to work out what the values mean? I might have a go myself.
     
  10. RoboCAT10

    RoboCAT10 Registered

    Joined:
    Oct 18, 2014
    Messages:
    639
    Likes Received:
    114
    Sorry I think I understand what you mean now. So you are saying the AI follow the fuel settings in practice and qualifying, but not in the race?
     
  11. RoboCAT10

    RoboCAT10 Registered

    Joined:
    Oct 18, 2014
    Messages:
    639
    Likes Received:
    114
    I'm interested to see what these lines mean in the HDV file.

    FuelRange=(7.432432,0.675676,316) // 0.74kg/litre (approx 163kg capacity)
    FuelSetting=30
    NumPitstopsRange=(0, 1, 3, 5)
    NumPitstopsSetting=0
    Pitstop1Range=(1.0, 1.0, 80)
    Pitstop1Setting=40
    Pitstop2Range=(1.0, 1.0, 80)
    Pitstop2Setting=40


    Perhaps by altering these we can try decide what each individual driver (each HDV) pit? I wouldn't know where to start though.
     
  12. RoboCAT10

    RoboCAT10 Registered

    Joined:
    Oct 18, 2014
    Messages:
    639
    Likes Received:
    114
    Here is a little update on this progress. I altered one of my drivers HDV file to this...

    FuelRange=(0.2) // 0.74kg/litre (approx 163kg capacity)
    FuelSetting=30
    NumPitstopsRange=(0, 1, 3, 5)
    NumPitstopsSetting=3
    Pitstop1Range=(1.0, 1.0, 80)
    Pitstop1Setting=40
    Pitstop2Range=(1.0, 1.0, 80)
    Pitstop2Setting=40
    Pitstop3Range=(1.0, 1.0, 80)
    Pitstop3Setting=40


    By reducing the FuelRange by a significant amount I found that the driver stalled on the grid and had no fuel to go any further. His fuel indicator came on as soon as he was on the grid. I will try increase the fuel range in a hope that he will pit for a refuel.
     
  13. RoboCAT10

    RoboCAT10 Registered

    Joined:
    Oct 18, 2014
    Messages:
    639
    Likes Received:
    114
    Update 2

    I changed the FuelRange line completely, as this what is was in other mods I used. I havr discovered that where it says '20' it equals the number of liters. So in this case this driver started with 20 liters of fuel which took him into five laps of the race. I even selected his vehicle and went to garage > default setup: this is where in fuel it showed he had 20 liters/5 laps.

    FuelRange=(1.0, 1.0, 20)
    FuelSetting=30
    NumPitstopsRange=(0, 1, 3, 5)
    NumPitstopsSetting=3
    Pitstop1Range=(1.0, 1.0, 80)
    Pitstop1Setting=40
    Pitstop2Range=(1.0, 1.0, 80)
    Pitstop2Setting=40
    Pitstop3Range=(1.0, 1.0, 80)
    Pitstop3Setting=40


    My next task is to alter with the fuel from after the driver has made his first pit stop and try make it so he pits again.

    ---

    In this thread it explains the fuel better.
     
  14. RoboCAT10

    RoboCAT10 Registered

    Joined:
    Oct 18, 2014
    Messages:
    639
    Likes Received:
    114
    Update 2

    I changed the PitStop1Range to 10 (10 litres does about 3 laps at Albert Park). My driver pitted to refuel on lap 5 after starting on 20 liters. Three laps later on lap 8 the driver pitted again. This proves that after his first stop he took on another 5 liters to take him for another 3 laps. The good news is that this method of choosing when AI drivers pit works! :D

    FuelRange=(1.0, 1.0, 20)
    FuelSetting=30
    NumPitstopsRange=(0, 1, 3, 5)
    NumPitstopsSetting=3
    Pitstop1Range=(1.0, 1.0, 10)
    Pitstop1Setting=40
    Pitstop2Range=(1.0, 1.0, 80)
    Pitstop2Setting=40
    Pitstop3Range=(1.0, 1.0, 80)
    Pitstop3Setting=40


    The only issue now is to try and calculate how many liters a lap it is at each circuit, though I;m sure there are tools around for this? Also make sure to create a seperrate HDV file for each of your drivers. Edit the fuel values as you need, and there is your alternate fuel strategies! :D
     
  15. Rich Goodwin

    Rich Goodwin Registered

    Joined:
    May 3, 2012
    Messages:
    1,219
    Likes Received:
    9
    Sorry I've only just seen this, that's what I did for the ISI megane to force a stop!
     
  16. RoboCAT10

    RoboCAT10 Registered

    Joined:
    Oct 18, 2014
    Messages:
    639
    Likes Received:
    114
    Does anyone know what these lines mean?

    FuelRange=(1.0, 1.0, 20)
    FuelSetting=30
    NumPitstopsRange=(0, 1, 3, 5)
    NumPitstopsSetting=3
    Pitstop1Range=(1.0, 1.0, 10)
    Pitstop1Setting=40
    Pitstop2Range=(1.0, 1.0, 80)
    Pitstop2Setting=40
    Pitstop3Range=(1.0, 1.0, 80)
    Pitstop3Setting=40

    I know that pit stop range is the ammount of liters of fuel to top up. not sure what pit stop setting means?

    EDIT: I figured it out. Pitstopsrange means (minumin fuel, steps, maximum fuel). Pitstop setting is thenumber of litres to top after each pit stop.
     
    Last edited by a moderator: Jul 23, 2015
  17. RoboCAT10

    RoboCAT10 Registered

    Joined:
    Oct 18, 2014
    Messages:
    639
    Likes Received:
    114
    I have hit a road block on this, and wondering if anyone else would have some idea's.

    This is how I have edited my AI drivers (Arden Hutchinson) HDV fuel setting:

    FuelRange=(1.0, 1.0, 10)
    FuelSetting=10
    NumPitstopsRange=(0, 1, 4)
    NumPitstopsSetting=3
    Pitstop1Range=(1.0, 1.0, 20)
    Pitstop1Setting=20
    Pitstop2Range=(1.0, 1.0, 10)
    Pitstop2Setting=10
    Pitstop3Range=(1.0, 1.0, 150)
    Pitstop3Setting=150


    I then went into the game to 'play' as this AI driver. This is what I seen when I opened up the garage menu:

    http://gyazo.com/b949c79a525c5c1e18962112501e6810

    I know know for sure that editing the HDV file is working. The amount of pit stops and liters of fuel per stop has been successfully loaded into the game.

    I then proceeded to play as another AI driver and race against only Arden Hutchinson. I watched his first part of the race. He made his first pit stop on lap 2which is perfect to me; he has followed the changes to the HDV and his fuel strategy setup as in the screenshot.

    I then expected him to pit on lap 7as this is what the screeshot (His garage) tells us; he was supposed to top another 19 liters to last another 5 laps. However instead he pitted on lap 4. He then pitted on lap 6. Pitted on lap 8, 10, 12... you get the idea; every second lap.

    What this means is that he is only following the first two fuel lines in the HDV file. This:

    FuelRange=(1.0, 1.0, 10)
    FuelSetting=10


    10 litres is equal to 2 laps around Albert Park, so his first pit stop makes sense.

    But he has forgot about the rest of the fuel lines in the HDV, these:

    NumPitstopsRange=(0, 1, 4)
    NumPitstopsSetting=3
    Pitstop1Range=(1.0, 1.0, 20)
    Pitstop1Setting=20
    Pitstop2Range=(1.0, 1.0, 10)
    Pitstop2Setting=10
    Pitstop3Range=(1.0, 1.0, 150)
    Pitstop3Setting=150


    Obviously editing the HDV file works, as we have proof by his garage in the screenshot. What I want to know is why he is not following the rest of the fuel settings, but only the first pit stop (starting fuel)?

    Any ideas? :D
     
  18. Golanv

    Golanv Registered

    Joined:
    Nov 7, 2012
    Messages:
    1,041
    Likes Received:
    9
    I do miss this feature from games mentioned above, and as expected it works in GSC as well [ AI Pit Stop Strategies ], and then there is the Race 07 or Evolution or whatever with the ingame UI function for it, that was the bees knees.
     
  19. RoboCAT10

    RoboCAT10 Registered

    Joined:
    Oct 18, 2014
    Messages:
    639
    Likes Received:
    114
    Indeed, it was great to have. I do wonder how hard it would be to implement it again, considering it was aviable in rf1 and F1 Challenge before that. I wouldn't know myself what type of coding that would require though.
     
  20. Lazza

    Lazza Registered

    Joined:
    Oct 5, 2010
    Messages:
    12,386
    Likes Received:
    6,602
    My brain's a bit fuzzy right now, but I think the above line (FuelRange) is actually setting the size of the tank. So the pitstop settings are useless, because he can only get 10L in the tank. Hence pitting every 2 laps.

    *By the way, in rF2 most/all "Range" values are starting value, step size, and number of settings. So FuelRange=(5.0,2.5,11) would give you minimum starting fuel of 5L, and a maximum of 30L, in 2.5L steps.
     

Share This Page