[SOLVED] AI RCD Files

Discussion in 'Modding' started by prescient, Dec 29, 2019.

  1. prescient

    prescient Registered

    Joined:
    Dec 20, 2019
    Messages:
    14
    Likes Received:
    19
    I'm working on building a custom AI championship for GT3 cars. One of the things that I would like to be able to do is specify driver skill levels. To the end I've created RCD files and skins for reach of the drivers in my settings files, and I've tested with the 2018 Audi R8 LMS GT3 cars. The custom AI names show up in the race, but there is almost no correlation between the driver speed settings and the qualifying times.

    The track settings for Sebring are as follows:
    • AI Strength:95%
    • Aggression: 25%
    • AI Limiter: 5%
    A sample RCD file that is stored in the "\rFactor 2\UserData\player\Settings\Audi_R8LMS_GT3_2018" folder looks like this:
    //[[gMa1.002f (c)2016 ]] [[ ]]
    GT3
    {
    Dominic Toretto
    {
    Team = 2018 Audi R8 LMS
    Component = Audi_R8LMS_GT3_2018
    Skin = alt.dds
    VehFile = R8LMS_77FDF19309.VEH
    Description = Audi_R8LMS_GT3_2018
    Number = 89
    Classes = fast_n_furious
    Category = fast_n_furious
    Aggression = 80
    Reputation = 80
    Courtesy = 80
    Composure = 80
    Speed = 100
    QualifySpeed = 100
    WetSpeed = 90
    StartSkill =100
    Crash = 0
    Recovery = 80
    CompletedLaps = 100
    MinRacingSkill = 90​
    }​
    }​
    Each driver has a custom config that is based on this file with names and sebring qualifying lap times:
    [​IMG]

    If anyone can tell me what I'm doing wrong it would be greatly appreciated.
     
    Last edited: Dec 29, 2019
  2. ADSTA

    ADSTA Registered

    Joined:
    Nov 19, 2011
    Messages:
    1,995
    Likes Received:
    1,340
  3. Bernd

    Bernd Registered

    Joined:
    Jul 9, 2013
    Messages:
    1,434
    Likes Received:
    673
    Also just an idea: the entry for "classes" in the RCD file is "fast_n_furious" but the RCD file is for GT3, as the first entry, the one before the first bracket, states.
    I would suspect that the classes entry and the first entry has to be the same, to get the RCD files working for the specified class.
    And the driver name "Dominic Toretto" has to be the same as in the veh file "R8LMS_77FDF19309.VEH" too.
     
    ADSTA likes this.
  4. prescient

    prescient Registered

    Joined:
    Dec 20, 2019
    Messages:
    14
    Likes Received:
    19
    Thanks folks. The fix was easy enough. I just needed to add GT3 to classes.

    Sample rcd for anyone who comes across this:
    //[[gMa1.002f (c)2016 ]] [[ ]]
    GT3
    {
    Brian O'Conner
    {
    Team = 2018 Audi R8 LMS
    Component = Audi_R8LMS_GT3_2018
    Skin = alt.dds
    VehFile = R8LMS_77FDF19309.VEH
    Description = Audi_R8LMS_GT3_2018
    Number = 43
    Classes = GT3 fast_n_furious
    Category = fast_n_furious
    Aggression = 80
    Reputation = 80
    Courtesy = 80
    Composure = 80
    Speed = 100
    QualifySpeed = 100
    WetSpeed = 90
    StartSkill =100
    Crash = 0
    Recovery = 80
    CompletedLaps = 100
    MinRacingSkill = 90
    }
    }

    Some proof that it worked (though I think Mia may have spun off the track):
    [​IMG]
     
    Corti likes this.
  5. ADSTA

    ADSTA Registered

    Joined:
    Nov 19, 2011
    Messages:
    1,995
    Likes Received:
    1,340
    Good to see Bernd didn't waste your time. ;)
     
    prescient likes this.
  6. Bernd

    Bernd Registered

    Joined:
    Jul 9, 2013
    Messages:
    1,434
    Likes Received:
    673
    Fiddling around with rfactor 2 is (almost) never wasted time. :D
     
    Corti, ADSTA and prescient like this.
  7. ADSTA

    ADSTA Registered

    Joined:
    Nov 19, 2011
    Messages:
    1,995
    Likes Received:
    1,340
    I'm hearing you Bernd.
     
  8. Emery

    Emery Registered

    Joined:
    Oct 24, 2010
    Messages:
    2,656
    Likes Received:
    1,297
    Change AI Limiter to 0% when testing RCD files otherwise you'll get inconsistent results when doing repeated trials. The RCD 0 to 100 Speed range is approximately 3% on track. For gameplay, I recommend no more than 1% AI Limiter, as track conditions and cars battling will provide a realistic amount of variance beyond the range in the RCD. You can edit the player file to provide increments smaller than 1% AI Limiter.
     
    Last edited: Dec 30, 2019
  9. prescient

    prescient Registered

    Joined:
    Dec 20, 2019
    Messages:
    14
    Likes Received:
    19
    @Emery
    A few questions:
    1. How does speed interact with the AI strength setting?
    2. If you want cars to battle more should you up the aggression? I'm trying to balance the AI battling vs not just running into me when they decide I'm in the way.

    Thanks!
     
    Last edited: Dec 30, 2019
  10. Emery

    Emery Registered

    Joined:
    Oct 24, 2010
    Messages:
    2,656
    Likes Received:
    1,297
    1. AI Strength scales the Speed and Qualify Speed. For range, it is dependent on a setting in the track's AIW, so a track designer can override the default 80%-120% range to mean something tighter or broader (or even a lopsided scale towards the high or low end). Everybody's Player.json file has an entry that also defines whether AI Strength affects engine power, gearing, fuel or all three...AI Power Calibration.
    2. Aggression is now what Courtesy used to be in early rF1 days. High aggression means the AI will give other cars less room, both while passing and while following. It also increases the frequency at which they try to pass and the increases the threshold they are willing to endure before giving up a pass (or crashing, as the case may be...). The aggression slider in the UI also affects this directly. RCD Aggression * UI Aggression = final....and should always be between 0-100%. See https://forum.studio-397.com/index.php?threads/rcd-talent-file.52996/#post-860574
    3. For the impression of more AI battles, I'd increase the AI Limiter rather than increasing Aggression because of the negatives that too much Aggression causes. The AI Limiter controls an oscillator that simulates the AI charging (getting a second wind) and fallbacks (losing focus). To me, it seems more powerful than Aggression and I use the AI Limiter to match what I expect for AI consistency. With it set to zero (usually for testing RCDs), there are no surges; with it set to 0.01 to 0.02 range, you some nice & mild surges. With it set to 0.20, which I think was the default, there's so much surging and falling back that the RCD becomes nearly meaningless in my opinion. AI Limiter has to be non-zero for certain effects, however, such as AI Mistakes and/or Mechanical Failures (I think those are the primary ones). AI Mistakes are mainly limited to poor judgement in picking their line compared to the AIW.
    For myself, I typically have the Aggression slider at 50%, otherwise the AI won't press me hard enough, won't make those occasional unexpected passing attempts that humans do when racing online.
     
    Corti, Seven Smiles and davehenrie like this.
  11. davehenrie

    davehenrie Registered

    Joined:
    Jul 6, 2016
    Messages:
    3,090
    Likes Received:
    1,748
    We are getting individual pieces of AI control, it might be time for a Bible of AI edits to be assembled.
     
  12. prescient

    prescient Registered

    Joined:
    Dec 20, 2019
    Messages:
    14
    Likes Received:
    19
    Thanks Emery. I appreciate the info.
     
  13. Emery

    Emery Registered

    Joined:
    Oct 24, 2010
    Messages:
    2,656
    Likes Received:
    1,297
    I started to refresh Marc's document a couple years ago, but then the new S397 UI was coming any day...
     
    Lazza likes this.
  14. Littlefysh

    Littlefysh Registered

    Joined:
    Jan 15, 2020
    Messages:
    4
    Likes Received:
    0
    This solution works only with S397 content in my experience. I'm trying to get the URD Detroit/Ford GT to be competitive with the S397 GTEs, not run away by 2 seconds a lap. I add the following 3 lines to the .rcd files:

    Speed = 40
    QualifySpeed = 40
    WetSpeed = 40

    These will slow a Porsche GTE by around 2 seconds a lap, but the URD cars are unaffected. It'd be great if I could BOP these and use them, any help is appreciated.
     
  15. davehenrie

    davehenrie Registered

    Joined:
    Jul 6, 2016
    Messages:
    3,090
    Likes Received:
    1,748
    I would imagine the Detroit would have been very close PRIOR to the LM24hr BOP. That really impacted the GTE's laptimes.
     
  16. Littlefysh

    Littlefysh Registered

    Joined:
    Jan 15, 2020
    Messages:
    4
    Likes Received:
    0
    Indeed, but I can't BOP the Detroits against the other GTEs because I can't make the others faster. That would be fine but the only available method of slowing the Detroit that I know of appears to not work on the Detroit and only the Detroit.
     
  17. SharD

    SharD Registered

    Joined:
    Apr 17, 2019
    Messages:
    56
    Likes Received:
    56
    I am also not getting the .rcd files to work with custom mods. I've added the correct classes and names, but the game does not load or use them. The .rcd files are located in the MAIN and the TEAMS .mas, to make sure they are loaded.

    Where did you place the .rcd files?
     
  18. Littlefysh

    Littlefysh Registered

    Joined:
    Jan 15, 2020
    Messages:
    4
    Likes Received:
    0
    I don't know what you're doing honestly but for skins you don't need to mess with .mas files, it's usually a simple copy/paste. Whole car mods or certain skin packs might use a package file with the extension .rfcmp which goes in the packages folder here:
    \rFactor 2\Packages

    Generally for skins of existing cars I put the .rcd and associated image files (.mas or loose) here:
    \rFactor 2\UserData\player\Settings
    and then place it in the folder for the car concerned, for example:
    \rFactor 2\UserData\player\Settings\McLaren_Senna_GTR_2019

    This works fine, even for the URD Detroit but this is not what I'm having an issue with.

    The contents of the .rcd don't have an effect on the AI running the car, like talent adjustment using the following text lines:
    Speed = 40
    QualifySpeed = 40
    WetSpeed = 40

    I'd also like to force alternative liveries on certain tracks like forcing the Le Mans Ford GT liveries at certain circuits, but the way to do this in the UI doesn't work and using the old rF1 method in the .rcd doesn't work.
     
    Last edited: Jan 16, 2020

Share This Page