AI fuel stop in dedicated server setup ?

Discussion in 'General Discussion' started by ceecee, Oct 28, 2015.

  1. ceecee

    ceecee Registered

    Joined:
    Jan 10, 2012
    Messages:
    691
    Likes Received:
    286
    After searching for AI Fuel /Pit stops in rFactor 2, I have drawn a blank.
    I have run a small Friday rFactor1 server for some friends for a couple of years now.
    We decided to now move to rFactor2, server now up and running but I cannot seem to get the AI to pit.
    Also Pitstops are not available in game menu, probably due to the mod.
    In rFactor 1 I can set the AI to pit 2 or 3 times during a 5X fuel usage 14 lap race.
    Where do I go and how do I implement this in rFactor 2 ?
    Can anybody help ?
    Otherwise we have to stay with rFactor1 and that will be a pity as Rfactor 2 immersion is great !
     
  2. Juergen-BY

    Juergen-BY Registered

    Joined:
    Jun 16, 2012
    Messages:
    3,089
    Likes Received:
    440
    Isn`t possible with rF2, maybe would be implemented later. Same with forced pitstops for human player...
     
  3. ceecee

    ceecee Registered

    Joined:
    Jan 10, 2012
    Messages:
    691
    Likes Received:
    286
    Thanks JuergenBY for the fast reply.
    Looks like we will have to stay with rFactor1, sad.
     
  4. MarcG

    MarcG Registered

    Joined:
    Oct 4, 2010
    Messages:
    6,854
    Likes Received:
    2,234
    If the mod doesn't allow refuelling then that's the mods fault or intention (by design, same with "Pitstops not allowed"), if it's a fault then contact the author (you haven't stated what mod btw).
    If a mod allows refuelling then you can use the Multiplier in RF2 just like in RF1.
     
  5. Juergen-BY

    Juergen-BY Registered

    Joined:
    Jun 16, 2012
    Messages:
    3,089
    Likes Received:
    440
    He was asking for setting multiple pitstops for the AI`s...?
     
  6. DurgeDriven

    DurgeDriven Banned

    Joined:
    Mar 20, 2012
    Messages:
    6,320
    Likes Received:
    43
    I only ever use Ai in my room when too many are off the pace or for a challenge

    The other night 3 of us tried to race 10 ai .

    Our scores for causing a race re-start 4 - 4 - 0

    I was 0.

    See it is the same with Ai........ Ai are not the problem. :)

    I say if someone wants to drive inferior physics because they can't get Ai to pit when they want let them.

    It is their loss.


    Sure even I use Ai " rarely" for something different and to show people it is not as easier as it seems ( like the other night proved to a couple Pros)

    But to race every night with them, nuh.
     
  7. RoboCAT10

    RoboCAT10 Registered

    Joined:
    Oct 18, 2014
    Messages:
    639
    Likes Received:
    114
    I'm pretty certain you make a mod refuel by changing a line in the vehicles HDV file. I made the FISIR2012 cars able stop to refuel, so I'm sure it can be done.
     
  8. MarcG

    MarcG Registered

    Joined:
    Oct 4, 2010
    Messages:
    6,854
    Likes Received:
    2,234
    like I said...
     
  9. ceecee

    ceecee Registered

    Joined:
    Jan 10, 2012
    Messages:
    691
    Likes Received:
    286
    Hi RoboCAT10,

    I have still not unpacked any of the rFactor 2 files in order to look at the HDV file.
    Any info you have about this will be much appreciated. (I think I came across a thread you had on this subject)
    It took some time to figure out how to get the AI to pitstop in rFactor 1 using Fuel X5 and adjusting some files but rFactor 2 is something else.
    We are following the F1 2015 season using F1RSH2015 1.4 and F1RSH15 tracks and generally a 14 lap race.
    I noticed the F1RSH2015 does not allow pitstops so this will probably need some adjustments as well.
    @Durgedriven, my friends and I only have Friday night to practice and race (depending on wives/girlfriends as we are all selfemployed and do not have time during the week) thus a private server with enough AI to make up the field is what we do. And thus "my loss" :)
     
  10. ceecee

    ceecee Registered

    Joined:
    Jan 10, 2012
    Messages:
    691
    Likes Received:
    286
    Hi RoboCAT10,
    I found an earlier thread where you had mentioned making the AI stop.
    Was this by changing the HDV file ? I found that if I extract F1RSH2015.mas then I can access the F1RSH2015.HDV file.
    In rFactor 1 I used to change this data:
    FuelRange=(0,1.3495146,103) // 0.741 kg/litre (approx 139 l. capacity)
    FuelSetting=18
    NumPitstopsRange=(0,1,1)
    NumPitstopsSetting=0
    Pitstop1Range=(0,1.3495146,1) // refuelling only during Practice/Qualy
    Pitstop1Setting=0
    Pitstop2Range=(0,1.3495146,1)
    Pitstop2Setting=0

    Do I do likewise here and repack the MAS file ?
    Sadly one source of rFactor 2 information is not to be found, everything seems quite spread out.
    Appreciate you taking your time to help !
     
  11. RoboCAT10

    RoboCAT10 Registered

    Joined:
    Oct 18, 2014
    Messages:
    639
    Likes Received:
    114
    Hi mate, no worries, this is what I use.

    FuelRange=(290, 1.0, 1.0)
    FuelSetting=97
    NumPitstopsRange=(0, 1, 4)
    NumPitstopsSetting=2


    In this instance this is the values I use for Albert Park. A lap around Albert Park is roughly 5 litres - so 5l per lap x 58 laps = 290. So we will will put 290 in the fuel range like I have - fuel range means the maximum amount of fuel the car can carry.

    Now we need to decide what fuel strategy you want your drivers on. In this example I try to work it out by the number of stops you want your AI to make.
    For a 1 stop strategy - 290/2 = 145l.
    For a 2 stop strategy - 290/3 = 96.6l
    For a 3 stop strategy - 290/4 = 72.5l

    You could go on, but in my example I chose the AI for a 2 stop strategy so I entered 96.6 (rounded it to 97 to be safe) into Fuel Setting. The Fuel Setting means the AI will start the race with 97 litres and will pit every time he runs out if that 97 litres, which if course would make him do two stops over the course of a 58 lap race at Albert Park.

    I left the PitStopRange and Settings out because I find the AI don't follow this anyway and saves you the trouble of editing those values. You are right also, just repack the mas file and make a new rfcmp and the AI should pit as you required them too. You could also make separate HDV files for all your drivers and have them on a variation of 1,2, or 3 stop strategies. Hope this help a bit.
     
  12. ceecee

    ceecee Registered

    Joined:
    Jan 10, 2012
    Messages:
    691
    Likes Received:
    286
    Hi RoboCAT10,
    Thanks very much !
    Now can get started tomorrow and start testing.
    Much appreciated :)
    Regards !
     
  13. ceecee

    ceecee Registered

    Joined:
    Jan 10, 2012
    Messages:
    691
    Likes Received:
    286
    Hi RoboCAT10,

    Me again !
    After experimenting, I found that if tyre wear is on 3X in a 14 lap race (Yas Marina), the AI pit once, however they also take fuel onboard.
    Do you know of any way to start the AI with full tanks in a race that they only come in for a tyre change ?
    I tried changing the HDV file to pitstopfuel=0 but the problem remains of the AI leaving on 60% fuel tanks on start.
    The option of switching off fuel usage is not interesting as we enjoy the car getting lighter as the race goes on.
    Regards,
    ceecee
     
  14. redapg

    redapg Registered

    Joined:
    Jan 16, 2012
    Messages:
    4,008
    Likes Received:
    2,876
    What you also can try is to change settings in the player.JSON file of the Dedicated Server,
    like e.g. "AI Fuel Mult".
    There are some more AI settings that can't be done in the normal UI, just try them out.

    The AI always uses the Setting from the HDV as default.
    So if you set the values for the FuelRange= (which is the fuel level at start) to "full" or high enough so that it is sufficient for the race , the AI shouldn't come to pit because of a lack of fuel.
     
    Last edited by a moderator: Nov 21, 2015
  15. ceecee

    ceecee Registered

    Joined:
    Jan 10, 2012
    Messages:
    691
    Likes Received:
    286
    Hi redapg,
    I appreciate you taking the time to answer, I have tried and used your great tool, Online JSON generator already ! Hats off !
    What I am trying to achieve is a DED server 14 lap F1 race where the AI pit once to change tyres, this I succeeded with by increasing tyre wear to 3X.
    But I noticed that besides changing tyres, they also refuel, I changed the HDV file to 135 litres (full) and on pitstops put 0, however they seem to start the race with around 55-65% fuel and then refuel on the pitstop.
    My idea was if I could get the AI to start the race with a full tank, they should not have to refuel but only pitstop for tyres.

    In player.JSON I found this line :

    "GPRIX FreeSettings#":" and 4=starting fuel
    Any idea what this does and how to use it ?

    At the moment the HDV file is set to :

    FuelRange=(1.0, 1.0, 135)
    FuelSetting=135
    NumPitstopsRange=(0, 1, 4)
    NumPitstopsSetting=2
    Pitstop1Range=(1.0, 1.0, 135)
    Pitstop1Setting=0
    Pitstop2Range=(1.0, 1.0, 135)
    Pitstop2Setting=0
    Pitstop3Range=(1.0, 1.0, 135)
    Pitstop3Setting=0

    Any help is much appreciated :)
    Regards,
    Ceecee
     
    Last edited by a moderator: Nov 21, 2015
  16. RoboCAT10

    RoboCAT10 Registered

    Joined:
    Oct 18, 2014
    Messages:
    639
    Likes Received:
    114
    Nit sure if it will make a difference, but they this instead:

    FuelRange=(135, 1.0, 1.0)
    FuelSetting=135
    NumPitstopsRange=(0, 1, 4)
    NumPitstopsSetting=1
    Pitstop1Range=(135, 1.0, 1.0)
    Pitstop1Setting=135
    Pitstop2Range=(135, 1.0, 1.0)
    Pitstop2Setting=135
    Pitstop3Range=(135, 1.0, 1.0)
    Pitstop3Setting=135

    What I am trying to achieve is a little different you as I want my AI to refuel, and because I that I turn off tyre wear altogether so it won't effect their fuel strategies. If you don't want your AI to refuel and only stop for tyres maybe it would be best to turn off fuel usage altogether? That way your AI will pit only for tyre changes and not worry about fuel.
     
  17. ceecee

    ceecee Registered

    Joined:
    Jan 10, 2012
    Messages:
    691
    Likes Received:
    286
    Thanks RoboCAT10,

    I will try this tomorrow and post the outcome.
    The reason to make the AI only change tyres is that we are trying to keep close to the current F1 rules of no refueling in a race.
    We want to keep the fuel usage (now on 3X) because we enjoy the changing behaviour of a car getting lighter. (on the pitstop we change from soft to super-soft and thus the tyres last a bit longer).
    We also plan to run Apex GT3 in the winter so your tyre/fuel setup is also interesting for a longer race.

    Regards,
    ceecee
     
  18. redapg

    redapg Registered

    Joined:
    Jan 16, 2012
    Messages:
    4,008
    Likes Received:
    2,876
    Maybe you should try it with
    NumPitstopsSetting=0
    But i don't know if they will pit for tires then, you will have to test it.

    And the Free Settings are used for/in combination with "Parc Ferme".
    If Parc Ferme is activated, with Free Settings you can allow what the Driver may do nevertheless.
    If you e.g. set it to 4, you allow them to change the starting fuel.
    If you e.g. set it to 5 (1+4) you allow them to change starting fuel and Steering lock.
    Just add the numbers of the things that you want to allow.

    EDIT i just read the threads title again ".....in dedicated server setup"
    If you want to edit player.JSON entries for the dedicated server, be sure that you also edit all relevant entries starting with "MULTI".
     
    Last edited by a moderator: Nov 22, 2015
  19. ceecee

    ceecee Registered

    Joined:
    Jan 10, 2012
    Messages:
    691
    Likes Received:
    286
    Thanks for the input redapg,
    Once my 3 client updates are out of the way I will get started on testing both RoboCAT10 and your info.
    Does anyone know if Parc Ferme has anything to do with AI ?
    I found this on another site.

    ParcFerme = 1 // Control over what changes can be made between qualifying and race; default=0, possible values are 0=no restrictions, 1=restrictions apply, 2=restrictions apply as long as it doesn't rain in qualifying or afterwards
    // Whether fuel level remains the same (only if parc ferme is applicable). In general, this value specifies what fraction of the qualifying session is reached before fuel usage becomes "free"; default=0.0, possible
    // values are 0.0-1.0, where 0.0 indicates fuel level is always free, 0.5 would mean fuel level at the halfway point of qualifying will be used to start the race, and 1.0 means fuel level at the end of qualifying will
    // be used to start the race (and no refueling allowed during qualifying).
    ParcFermeFuel = 0.0
    ParcFermeTires = 10 // How many of the top qualifiers have to keep their used tires on for the race (only if parc ferme is applicable); default=0, possible values are 0 and up (300 recommended if everybody has to keep their used tires).
    ParcFermeSetup = 1 // Whether setup used during qualifying must be used during the race (only if parc ferme is applicable), except for the RFM/season/GDB or PLR file "FreeSettings"; default=1, possible values 0 or 1.

    It seems to default on (1) so turn it off or edit it to your liking ! simply turn it off and no more parc ferme !!

    I see you have a Nordscheife logo, redapg. There is a live APEX Nordschleife 24 hour race online at the moment finishing about 1600 today (CET time) at http://www.hitbox.tv/p1-gaming/profile
     
    Last edited by a moderator: Nov 22, 2015
  20. redapg

    redapg Registered

    Joined:
    Jan 16, 2012
    Messages:
    4,008
    Likes Received:
    2,876
    To be honest, i never played around with the AI seriously.
    We never used AI on our Servers.
    So i can not answer e.g. if Parc Ferme also affects the AI. But i would suppose that it affects the AI.
    But to be sure, better try it out. ;)
    And think at, to set the MULTI Free Settings to 4 (at least) to allow the AI to fill up fuel before the race starts.
    And i guess some of the settings for Parc Ferme have to be done in the rfm file, if they aren't available in player or Multiplayer JSON.

    And thanks for the hint concerning the NOS 24h race, i did see the announcement here in the forum. :)
     

Share This Page