Safety car bugs

Discussion in 'Technical & Support' started by flyfisho, Feb 22, 2020.

  1. flyfisho

    flyfisho Registered

    Joined:
    May 28, 2017
    Messages:
    58
    Likes Received:
    7
    So hosting a race last night at Adelaide and trowing a safety car brought out a few bugs. The person in first place was getting told to overtake the safety car and for everyone else the positions were a bit confusing as some were being told to catch up to others or let them pass and it was making an absolute mess of the positions. I for one was getting told in 3rd position to also overtake the safety car for being a lap down!! So what governs the safety car and how it all acts?
    So there is the rfm file, the track gbd file, player json file and the multiplayer json file. These all have safety car seetings in there. How is the AI safety car judging on where everyone should be on the track as it seems to be messing it up and how can this be fixed?
     
  2. JimmyT

    JimmyT Registered

    Joined:
    Jan 16, 2012
    Messages:
    725
    Likes Received:
    445
    WARNING: wall of text incoming.
    You've been warned.:)
    This is the section I've added to the rfm I use on my server and it sort of works (given the broken nature of the FCY) (more chat at bottom.)

    LuckyDog = 0 // Whether leading car one lap down can re-gain his lap during a full-course caution. Possible values are 0=off, 1=used at ovals only, 2=used at road courses only, 3=used everywhere.
    LuckyDogLapsLeft = 0 // How many laps must be left for lucky dog to take effect; default = 10, possible values are 0 (meaning it is always applicable) and up.

    MinimumYellowLaps = 1 // Minimum laps during a full-course yellow; default = 2, possible values are 1 (?) and up ... remember that it might be useful to override this one in some track GDBs.
    RandomYellowLaps = 0 // Additional random yellow laps; default = 1, possible values are 0 and up.
    ClosePits = 0 // Whether pits are closed during the first part of the full-course yellow; default=0, possible values 0 or 1.
    PitsClosedLaps = 1 // How many laps the pits remain closed during the first part of the full-course yellow; default=1, possible/ values are 1 and up (probably needs to be less than MinimumYellowLaps, though)
    LeadYellowLaps = 2 // This is the threshold for the number of yellow flag laps to determine whether the lead-lappers get to pit before everyone else. Only valid if ClosePits is enabled; default=2, possible values are 0 (never let leaders pit first) and up.
    ClosedPitPenalty = 1 // Penalty given for getting served on a closed pitlane (meaning that the vehicle entered AFTER the pit was closed); default=2, possible values are 0=stop/go 1=drivethru 2=longest line.

    LocalYellowsRoad = 1 // Whether local yellows are available, which can be different for road vs. oval courses; default=1, possible values 0 or 1.
    LocalYellowsOval = 1

    BlueFlags = 1 // 0=no blue flags, 1=show but never penalize, 2=show and penalize if necessary for vehicles within 0.3 seconds, 3=0.5 seconds, 4=0.7 seconds, 5=0.9 seconds, 6=1.1 seconds

    PrivateQualifying = 0 // Private qualifying, which means that everyone is qualifying simultaneously but alone on track; default=0, possible values 0 or 1.

    AdditivePenalties = 0 // Whether penalties add to each other, essentially meaning they can all be served at once; default=0, possible values 0 or 1.

    LapsToServePenalty = 3 // Number of laps to serve the penalty before being disqualified; default=3, possible values 1 and up.

    PassingBeforeLineOval=0 // Whether passing is allowed on starts and restarts before the start/finish line; default=0, possible values are 1=passing on right is legal, 2=passing on left is legal, and 3=passing anywhere is legal.
    PassingBeforeLineRoad=0

    FreezeOrder = 1 // Whether order of vehicles is frozen when the full-course yellow is first shown. If necessary, server will correct the order as people cross the start/finish line; default=0, possible values 0 or 1.

    // Behavior if full-course yellow is active at the end of a race; default=0, possible values are 0=race finishes normally, 1=finish will be delayed one time only and will allow one lap after the green flag,
    // 2=finish will be delayed one time only and will allow two laps after the green flag, 3=finish can be delayed multiple times, with only one lap allowed after the green flag (not sure this option works as expected),
    // 4=finish can be delayed multiple times, with two laps needed after the green flag. Note that a full-course yellow called on the very last lap will NOT currently delay the finish. Also note that this feature does
    // not work for timed races.
    FinishUnderCaution = 0

    CountCautionLaps = 1 // Whether caution laps are counted towards the total number of laps; default=0, possible values 0 or 1.

    DoubleFileRestarts=0 // Whether restarts are double-file and how many laps left are required to do so; default=0, possible values are 0=off, 1+=laps left required to convert to double file.

    ------------------------------------------------------------------




    This means the safety car only comes out for 1 lap (adjustable at MinimumYellowLaps=) if the track is cleared and you hold the position you're in when you cross the start / finish line
    Beware...the lap you're on when FCY is called, before SC comes out, the AI can and will overtake you and won't redress (I haven't worked out how to stop this from occurring (any help for this would be appreciated)) Once you cross the Start/Finish on the SC lap they stay in position, albeit randomly stopping and driving like drugged morons. The line RandomYellowLaps= controls how many extra laps the SC stays, I found 0 worked best for me. Like I said it's OK but not perfect.

    I added another section to my rfm which controls pit lane penalties and that made a difference to our race night too.

    Here are a few more lines I found in my rfm that control the call out rate for SC

    SafetyCarRoadMult=1.00 // Safety car threshold multipliers, in other words an adjustment for the sensitivity of the game to calling full-course cautions.
    SafetyCarOvalMult=1.0 // Lower numbers result in more full-course cautions; default=1.0, possible values are 0.01 (very sensitive) and up.
    SpinRoadSeverity=0.00 // Whether full-course cautions may be called for a spin more than 90 degrees where the driver keeps going.
    SpinOvalSeverity=0.10 // Higher values will result in more full-course cautions due to these temporary spins; default=0.0, possible values are 0.0-2.0.

    GOOD LUCK.;)
     
    Last edited: Feb 22, 2020
    atomed and buzz hornet like this.
  3. flyfisho

    flyfisho Registered

    Joined:
    May 28, 2017
    Messages:
    58
    Likes Received:
    7
    Yeah Cheers JimmyT
    So i have FreezeOrder set to 1 as well and default is 0 im wondering the fact that the server states that "If necessary, server will correct the order as people cross the start/finish line", is this going to be regardless of the 1 or 0 setting for freeeze order. And where is the code for the server to make that desicion. Ide like to disable that as i think its messing everything up as it shouldnt be able to make that desicion and stuff up the order after its frozen.
    What file do you think will be the one used in a race as the GDB also contains safety car rules and if the RFM and GDB are diferent how does that work?
    Other than than the safety car on a FCY was getting triggered OK. I have fairly similar settings to you in the RFM file.
    The second barrell to my question was about the finish on a lap race the server did not let anyone else finish the race after say the first three crossed the line on a 25 lap race. Why does the sever cut the race off and not let everyone cross the line even if they are say 2 laps down.
     
  4. The Iron Wolf

    The Iron Wolf Member

    Joined:
    Feb 20, 2016
    Messages:
    962
    Likes Received:
    904
    @JimmyT, are you using enhanced SCR plugin? Your post caught my eye, because you said it "sort of works". All I needs is basic F1 cooldown/imaginary cleanup Safety Car phase, and I am trying to understand if I have better chance of success with SCR plugin or .rfm settings? I currently do not use SCR plugins, but what I noticed is that FCY (and even rolling start lap) never terminates sometimes. But it seems to be very content dependent.

    Did you by any chance notice any patterns in SC problems? I noticed two things: some tracks have SC parked before s/f line, most have it after s/f line, and this difference seems to cause problems. I also think it causes more problems to have lapped cars in the grid. What are your observations?
    Thanks!
     
    Last edited: Feb 23, 2020
  5. JimmyT

    JimmyT Registered

    Joined:
    Jan 16, 2012
    Messages:
    725
    Likes Received:
    445
    No SCR.dll is in the plugin folder but disabled ;)

    Some patterns? (randoms might be a better word) Yes I think you could be right with SC before the line and Yes I think rolling start, and formation lap sometimes have never ending story issues depending on the track code / content (I've read somewhere that this may be due to teleport issue???).
    I've not noticed lapped car issues as most of my races are sprint type 10 to 20 lap, so there are no pit stops (when the AI go into the pits in numbers I get major stutters and it becomes a slide show, so I try to avoid this).
    Sorry I can't shed more light on this for you @The Iron Wolf.

    I've often thought it would be nice if the AIW had a race line, block line, wet line and a FCY line, so when the SC comes out the cars all form up and do a bit of a tyre heat weave and a bit of brake warming (predictably) then fall in when the lights go out ready for a start (just like in our V8 Super Car series) But I'm sure this is one of those things that sounds really easy but is a complete nightmare to implement due to old code and other limitations.:(

    When I said "it sort of works" I mean rarely the SC will stay out for random number of laps but I don't see a wreck still parked on track and that it's hit and miss if the AI all catch up to SC or if they drive with any consistency once they have.
    eg I had a race at Sebring in Radical SR3 (both official) and it was close racing at the lead (4 car battle) Unfortunately didn't run a qualify and had random pos on grid so there was a pile up on track (what is that ???), back in the pack a bit (19cars), didn't see it, caused a FCY and SC came out. The car behind me (approx 0.4 sec at FCY) raced me until the SC came on track and we crossed SF line then sat behind me for about 3 corners, then out of the blue dropped back about 7 seconds only to come back at me on the last straight and try to slam into me at the last corner. Just random sh*t

    Other times the AI drive along OK then just prop (stop dead) for no reason then roll on again.
    Sorry, just raving now. :oops:
     
  6. JimmyT

    JimmyT Registered

    Joined:
    Jan 16, 2012
    Messages:
    725
    Likes Received:
    445
    First part of your question, I think the GDB loads last which means that it gets the last word, I see this with pit lane speed mostly, I set it in the rfm but it gets an override from gdb. (I think)

    Second part, because.... reasons ?????:confused: yeah, I don't know, might be what The Iron Wolf was getting at with the lapped car thing, maybe the code can't handle that stuff. Make sure you don't have stock car rules enabled as that changes some of the standard road race settings.
     
  7. flyfisho

    flyfisho Registered

    Joined:
    May 28, 2017
    Messages:
    58
    Likes Received:
    7
    cheers
    seems the more you know the less you realise you know:rolleyes:
     
  8. JimmyT

    JimmyT Registered

    Joined:
    Jan 16, 2012
    Messages:
    725
    Likes Received:
    445
    Fact of life my friend :D
     
    buzz hornet likes this.
  9. JimmyT

    JimmyT Registered

    Joined:
    Jan 16, 2012
    Messages:
    725
    Likes Received:
    445
    Bumping this thread.
    Just had 3 races on a dedicated server with 2 people and 18 AI. There were a couple of FCY safety cars and they were handled pretty well.
    I use an .rfm file that is kept on the desktop of the host machine (it's pretty much the one in reply #2 of this thread) and it seems to work OK. There are still a few bugs that resist ironing out but we didn't suffer too much.
    The way I get the host to use a specific rfm is to select it while making the rfmod (see pic)
    clip 1.png
    So I go to customize and check the box then select the rfm from the desktop and it puts that file into the frmod.
    I found that when I altered the default .rfm it would change back to a standard one (must be in a hidden folder somewhere and it overwrites it?)
    We always have races based on number of laps not a specified time.
    Anyway just thought I'd share and hopefully someone can benefit from this.
     
    The Iron Wolf likes this.

Share This Page