January 23, 2018, 07:38:17 AM
bigger smaller reset 800px Wide width Full width Reset * *

NRTracks

 
Welcome, Guest. Please login or register.

Login with username, password and session length
« previous next »
Pages: [1] Go Down Print
Author Topic: Pitroad, Pitstalls, and Pit lp's "HOW TO"  (Read 10971 times)
fortine_oo
Legacy
Sr. Member
*****
Posts: 188



« on: November 22, 2011, 10:53:55 PM »

Pitroad, Pitstalls, and Pit lp's  "HOW TO"


1. a) defining pitroad
    b) coordinating the pit lp's and track.ini values
    c) getting the ai on and off pitroad via the track.ini
2. a) laying out pitstalls
    b) getting the ai in and out of the pitbox via the track.ini
3. a) making pit lp's
    b) where to locate the pit lp's (on the track)
    c) coordinating the pit lp's and track.ini values
4. pace car
5. a) make a starting grid
    b) coordinating the lp's and track.ini values
    c) standing start


I've tried to make this as inclusive as possible, but it's not practical to try and explain every variation that may arise. The information for a normal
   installation will be given first, and variations to the norm will come after the basics.
There's a lot of information, and the parts and the processes are somewhat interwoven, i.e. to achieve the final result on a particular part may require
   a combination of instructions from more than one "HOW TO" section. I mention this because the descrpitive process is long (wordy) and it will seem
   complicated and confusing, but with a little familiarity it becomes more understandable. Even with experience, getting everything correct on the first
   try really never happens.
I'm not going to explain how to use "Sandbox", that's a whole tutorial on its own. I will point out what to do to apply the proper subsurfaces to get the
   pits working correctly.


Initial definitions:
dlong_the linear location on the track based on track length from the S/F line (zero at the line, then going foward, after completing the circuit, back at
    the S/F is the total track length).
dlat_the lateral distance from the track centerline. In the foward direction travel, left of track centerline will be a positive value, right of centerline will
    be a negative value.
Surface_the track material that contains the physical properties (e.g. grip) and the visual properties (a mip). With the track opened in Sandbox, in the
    "F Section Properties" box, "Materials" (toggle "Lock Materials"), the top window, the choices are  "Asphalt/ Concrete/ Dirt/ Grass/ Gravel/ Inaccessible/
    Invisible/ Paint/ Rumble/ Sand/ TrainTracks/ Water".
Subsurface_what the track "Surface" is used for. With the track opened in Sandbox, in the "F Section Properties" box, "Materials" (toggle "Lock Materials"), in
    the window directly below the materials "Surface" type window, the choices are  "<Undefined>, Apron, Apron Near Pits, Pit Road, Pit Stall, Racing Surface".  
    The subsurfaces have a particular color designation when viewed via the Sandbox "View" tab, select "Disply Extended Surface Types". Pit Stall = light blue,
    Pit Road = blue, Apron Near Pits = yellow, Apron = gold, Undefined = red.


Note: I have used all the methods here-in. If something doesn't produce a usable result it's because I have incorrectly written the instruction (for which I
            apologize), or you (the user) have missed a step or applied an incorrect value, or it's just one of those NR2003/Sandbox idiosyncracies.
        It's helpful to "look" at another track to see how it was done, especially if you like the way the ai operate. See where the lp's are (using Reflap), and
            open the track with Sandbox to get a visual on the track.ini values.

Successful ai are made up of a gazillion properly executed little details rather than some bright idea demon tweak or radical notion
 that's going to turn the whole simworld upside down and set fire to it in the bargain
(Or maybe set it on fire first and then turn it upside down.)        
 [...with apology to BS Levy.]


      ***************         ***************          ***************
   If you have any comments or questions, please start a new topic in the General Discussion forum.

      ***************         ***************          ***************
« Last Edit: December 09, 2011, 10:53:57 PM by fortine_oo » Logged
fortine_oo
Legacy
Sr. Member
*****
Posts: 188



« Reply #1 on: November 22, 2011, 11:00:07 PM »

1. PIT ROAD
    a) defining pitroad
          Pitlane is defined by the track subsurfaces (in the ptf) and the pitlane/pitstall values in the track.ini.
          Pitroad is an extention of the track (added F Sections) beyond the racing surface, either on the left or right side of the track.
          Once the F Section(s) is (are) there, the subsurface must be designated "Pit Road" to enforce a pit speed rule.
          The subsurface must be designated "Pit Stall" where the pit boxes are located in order for the cars to recieve pit services.
          "Apron, and/or Apron Near Pits" are technically not required to get in and out of the pits and receive service. Either subsurface may be used for
                  compliance to enforce pit exit restrictions. (A penalty is applied if a car goes completely off the "Apron" subsurface before reaching the
                  "lane_merge_dlong" value).
          "Apron Near Pits" is only needed to get the spotter to inform the Player of the pitroad speed upon entry. The farther "Apron Near Pits" subsurface
                  extends from the start of pitroad, the sooner the spotter will give the pitroad speed. If the subsurface is only a very short section, you'll be on
                  pitroad before the pitspeed is given.
          All subsurfaces must be continuos for pitroad compliance, i.e. while on the pitroad/pitstall/apron subsurface complex, there can be no breaks between
                  sections linearly or laterally. For example, if there is a paint line F Section, that section must be designated the same as an adjoining section to
                  maintain the continuity of the pit subsurface. Any sections not properly assigned will break the pitroad/pit-exit continuity and cause a pit penalty
                  to be assessed.
  
    b) coordinating the pit lp's and track.ini values_
         Upon exiting the pits, if you wish to allow the Player and ai to merge back onto the track and the racing line as soon as possible, no "Apron" subsurface
                  is required. Enter the same value for "lane_merge_dlong = xx.xx" as "pit_lane_end_dlong = xx.xx", provided there is no pitwall restricting access back
                  to the track. If there is a pitwall that must be cleared, use the end of pitwall dlong for "lane_merge_dlong = xx.xx", and provide "Apron" subsurface
                  for that distance. If the ai will be allowed to rejoin at the same time as the Player, "merge_from_pit_line_dlong" will need the same value as
                  "lane_merge_dlong".
         Upon exiting the pits, if you wish to have the Player merge back onto the track after a specific location, you must use "Apron" (and/or "Apron Near Pits")
                  for that entire distance, i.e. the distance specified in the track.ini, "lane_merge_dlong = xx.xx"-(dlong to remain on the apron when exiting the pits).
                  The ai will also be required to stay on the apron subsurface for the specified distance, therefore the pit lp's must stay on the subsurface and the
                  track.ini value for "merge_from_pit_line_dlong = xx.xx" must be equal to or greater than "lane_merge_dlong = xx.xx".
          Option__If you only want the ai to merge at a specified location, but allow the Player to merge anywhere (or some distance sooner than ai), use
                   "lane_merge_dlong = xx.xx" (with supportive "Apron" subsurface) to control the Player and  use the pit lp's and "merge_from_pit_line_dlong = xx.xx"
                   to control the ai. Keep the pit lp's away from the racing line (out of race speed traffic) until you reach the distance where you want to allow the ai
                   to rejoin the race.lp.
               {On track, ai don't really "see" opponents until they're 'on' the track, so they can have a hard time with merging traffic (from pitroad) into the racing
                   line, especially when this occurs at an apex point.}

          Reflap_
          This quickie reflap how-to will not explain how to make lp's, only how to view them. Other tutorials are available for the full use of Reflap.
          Use Reflap to make the lp's visible. Lp's can only be made in "Testing Session", but you can still use reflap (to see the lp's) in "Single Race".
          The lp's (shown as colored triangles) will follow the car who's camera view is selected, and only when the action is "Live" (if you see the symbol " >>l "
              in the video controls, click it to jump to the current view).
   
          {The keystrokes required to perform the operations will be listed as such [ctrl+shift+alt+~], where " + " indicates all the keys listed much be struck
              simultaneously.}
          Start: [ctrl+shift+alt+~] When the program is operating, some red text will appear in the upper left hand corner of the screen. (For just viewing, the
               text is superfluos.)
          View each lp, use the keystrokes. Each lp made visible will stay visible until you hit the same keystrokes again. :
                minrace.lp:        [ctrl+1]   DarkGreen       Right of the race.lp
                maxrace.lp:       [ctrl+2]   DarkGreen       Left of the race.lp
                pit0.lp:             [ctrl+3]   Red               Normally between the minpit0.lp & maxpit0.lp
                minpit0.lp:         [ctrl+4]   DarkRed          Normally right of the pit0.lp
                maxpit0.lp:        [ctrl+5]   DarkRed          Normally left of the pit0.lp
                pit1.lp:             [ctrl+6]   Blue               Normally between the minpit1.lp & maxpit1.lp
                minpit1.lp:         [ctrl+7]   DarkBlue          Normally right of the pit1.lp
                maxpit1.lp:        [ctrl+8]   DarkBlue          Normally left of the pit1.lp
                race.lp:             [ctrl+0]   Green              Normally between the minrace.lp & maxrace.lp  
                                                                         {The race.lp will jump around (the ai are constanly evaluating the best racing-line path) when viewing from
                                                                            an ai's camera view. It's easier to view the race.lp by copying the race.lp and re-naming it to raceline.lp.}
                raceline.lp:                [r]                       This is not an lp for the ai, it is a visual reference for the Player.   
                minpanic/maxpanic.lp: [crtl+9]   Fuschia    Visible only as a pair. (Proper orientation (left/right) can only be determined by re-naming each to a single
                                                                                                          viewable lp.)
                limp.lp:   [Not able to select it via keystrokes, it can only be seen by re-naming it to a single viewable lp (and using that lp's keystrokes).]

    c) getting the ai on and off pitroad via the track.ini_
          [ pit_lane_0 ]
          ; AI stuff
          The lines/values in this section control the length of the pitlane speed corridor and the length of how long you have to stay in contact with pitlroad and
               apron subsurfaces, for the player and ai. It also controls the ai for when to follow the pit.lp, and 2) how the ai drive into and out of the pits (and
               the pitbox_see PITSTALLS).

          merge_from_pit_line_dlong = xx.xx   ; dlong at which the ai switch from the pit lp's control to the race.lp.  (ai only)
          merge_to_pit_line_dlong = xx.xx   ; dlong at which ai entering pits are required to leave the race.lp and use the pit lps.  (ai only)
                 The dlong at which the ai will attempt to acquire the pit lp's for entry to the pits.
                  If "merge_to_pit_line_length = 0" or isn't included, the ai will change from following the race.lp to one of the pit lp's almost immediately.
                  If this value is too close to the pitroad entry it will cause the ai to miss the entry or crash trying to get in.
          merge_to_pit_line_length = xx.xx   ; length of distance in which to merge to pit lp's  (ai only)
                  An added distance (in meters) to the dlong value in "merge_to_pit_line_dlong = xx.xx"
                  This will give the ai a transition window (the total distance from merge_to_pit_line_dlong = xx.xx + the additional distance) in which to acquire and
                  commit to the pit lp's. If the combination of "merge_to_pit_line_length" + "merge_to_pit_line_length" extend too close to the pitroad entry it will cause
                  the ai to miss the entry or crash trying to get in.
          pit_lane_end_dlong = xx.xx      ; dlong where pit lane proper ends  (ai & Player)
                  The end of pitroad (and pitspeed control) is approximately +3 meters from stall_0, regardless of this value and the "Pit Road" subsurface.
          pit_lane_start_dlong = xx.xx      ; dlong where pit lane proper begins  (ai & Player)
                  The start of pitroad (and pitspeed control) is approximately 4 meters before the first stall_x on pitroad, regardless of this value and the "Pit Road"
                  subsurface.
          lane_merge_dlong = xx.xx       ; Dlong to remain on the apron when exiting the pits.  (ai & Player)
                  This line controls how long the Player and ai are required to stay on a designated path before being allowed to re-enter the track after exiting the pits.
                  This must be supported by "Apron" subsurface covering at least this distance. [The pit lp's must remain on the "Apron" subsurface for this distance.]

   [ pit_lane_1 ]
   When "pit_lane_1" is needed or required:
        Generally, pit1 is for a second line of pits, but it is sometimes used for special pitting (or pace car) circumstances.
        If there are two rows of pitstalls, a [ pit_lane_1 ] section and pit1 lp's are required for one of the rows, the other row will use [ pit_lane_0 ] and pit0 lp's.
        If the pace car will enter pitroad at a different location than the Player and ai in order to reach its pitstall, a [ pit_lane_1 ] section (without pitstalls) and
            only a pit1.lp will be needed.

          [ AppRuleEnterPits ]
          "pit0_entrance_point0(1)_dlat" is a set of points, one left and one right, which, when combined with "pit0_entrance_point0(1)_dlong", creates an arbitrary
                  opening you have to go through to enter the pits "correctly".
              There is no direct correlation of this line to the actual start of pitlane, but many (most) tracks use the same dlong point as the start of pitlane, and the
                  dlat of the pitwall right of pitroad as point0_dlat and the dlat of the pitwall left of pitroad as point1_dlat. (point0 and point1 may need to be reversed
                  in some instances.) Having a pit entry requirement different than the actual start of pitroad adds restrictions to the player entering the pits,
                  the ai are controlled by the track.ini and pit.lp's, however, the pit lp's must pass between these imaginary points.
          {If you don't use a [ AppRuleEnterPits ] section, you won't incur any pit entry penalties.}
          Use the value closest to track centerline as point0_dlat, and the value farther from track centerline as point1_dlat. (If you get a penalty, reverse the
               dlat point0 and point1 values.)
          pit0_entrance_point0_dlat = xx.xx                     ; dlat sets the lateral point0
          pit0_entrance_point0_dlong = xx.xx                   ; dlong sets the linear point0   
          pit0_entrance_point1_dlat = xx.xx                     ; dlat sets the lateral point1   
          pit0_entrance_point1_dlong = xx.xx                   ; dlong sets the linear point1

          The same rules apply as pit0, except this is for [ pit_lane_1 ].
          pit1_entrance_point0_dlat = xx.xx
          pit1_entrance_point0_dlong = xx.xx    
          pit1_entrance_point1_dlat = xx.xx
          pit1_entrance_point1_dlong = xx.xx

          ; race control stuff
          lane_on_right = x  ; The value is 0 if the crew is on the left and 1 if on the right. This values determines which way the pit crews face and not really what
                  side of the race track pit road is on.
          lane_has_wall = 0 this value tells the game if there is a pit wall separating pit lane from the track. A value of 0 means there is no wall and a 1 means it has
                  a wall.
          speed_limit_MPH = xx.0 This sets the pit road speed limit. The speed can be any value, but the spotter will not say anything above 70, so any value greater
                  than 70 only gets reported as 70. {Beware, too high a value may cause the ai trouble when trying to get onto pitroad, and may cause more pitroad
                  collisions.}

          Option_
          Force the ai to run the pitspeed regardless of the pitstall locations.
          Sometimes you want the pits located in a particular section of the track, but you would like the ai to be at pitspeed for an additional length of pitroad before
              and/or after the span of pitstalls. Regardless of the subsurface designation and the track.ini "pit_lane_start_dlong" value, normal NR2003 procedure causes
              the ai to begin the pitspeed about 4m before the location of the first pitstall on pitroad. Likewise, regardless of the subsurface designation and the track.ini
              "pit_lane_end_dlong" value, normal NR2003 procedure causes the ai to return to race speed about 3m after the location of the last pitstall on pitroad.
          This limitation can be overcome, most of the time.
          WARNING: NR2003 and Sandbox are susceptable to idiosycracy. One or the other (or possibly both) of these methods may not work on every track.
                 {For reasons only known to the Sandbox creator(s), and maybe not even they know, Sandbox produces tracks where the dlong values are skewed
                  or incorrectly interpreted. If that is the case, it may take one or more different combinations of "Pit Road"/"Pit Stall" subsurfaces and track.ini
                  variations than I will address here, and even then it still may not work. I would just point out that tweaking the method may still yield positive
                  results.}
          Note: These are the methods I have used and attained the desired results. When doing this, test at the first opportunity, and re-test every time you make a
                    change.

          This will require the track be opened in Sandbox. You will need to change the subsurface of the track segments/sections that are to be included in the pitroad
              extension.
          Since you're adding bogus pitstalls and they won't be used, you only need "Pit Road" subsurface.  The dlat location of the pitstalls is superfluos (they're not
              being used), there's no need to alter any walls or such to accommodate the pitstalls.
          You will have to make sure the "merge_to_pit_line_dlong" + "merge_to_pit_line_length" allows the ai enough time and space to get onto the new pit entry
              extension and slow to pitspeed speed.
          For the pit exit extension, you will have to make sure the pit lp's follow the new pitroad subsurface to satisfy the "lane_merge_dlong" requirement.
              The "merge_from_pit_line_dlong" value must be equal to or greater than "lane_merge_dlong" or a pit exit penalty will be assessed.

          Pitspeed entry extension:
          Add a "stall_43" (to the list of pitstalls) at the location where you want pitspeed to take effect. For example, if "stall_42 = 2700", but you want pitspeed to
              begin at dlong = 3000, make "stall_43 = 3004", "pit_lane_start_dlong = 3000", and change the [ AppRuleEnterPits ] dlong point(s) to the same value (3000)
              or less.
          {If , for some reason, this doesn't work, make "stall_42 = 3004", the rest of the changes will be the same. Since this is likely to put the 43rd competitor out in
              no man's land, reduce the total number of competitors ("max_starters = 42") so stall_42 isn't used. Sure, it's technically not "a full field", but who's gonna
              miss one backmarker?}

          Pitspeed exit extension:
          The most effective (reliable) method I've found requires adding a [ pit_lane_1 ] section. First, add the four "pit1_entrance_point" 's to the [ AppRuleEnterPits ]
              section.
          Just copy and paste the four "pit0_entrance_point" 's and rename "pit0" to "pit1".
                    [ AppRuleEnterPits ]
                    pit0_entrance_point0_dlat = 10.00
                    pit0_entrance_point0_dlong = 6173.00
                    pit0_entrance_point1_dlat = 30.00
                    pit0_entrance_point1_dlong = 6173.00
                    pit1_entrance_point0_dlat = 10.00
                    pit1_entrance_point0_dlong = 6173.00
                    pit1_entrance_point1_dlat = 30.00
                    pit1_entrance_point1_dlong = 6173.00
          After changing the "pit_lane_end_dlong = 260.00" to the new end of pitroad value, copy the [ pit_lane_0 ] section,  
                    [ pit_lane_0 ]
                    ; AI stuff
                    merge_from_pit_line_dlong = 260.00
                    merge_to_pit_line_dlong = 5730.69
                    pit_lane_start_dlong = 6173   
                    pit_lane_end_dlong = 260.00
                    slow_pit_line_dlat_offset = 7.0  
                    begin_stall_entry_offset = 20.0
                    begin_stall_approach_offset = 40.0
                    stall_exit_goal_dlong_offset = 8.0
                    stall_exit_goal_dlat_offset = -4.0
                    lane_merge_dlong = 251.000000

                    ; race control stuff
                    lane_on_right = 0   
                    lane_has_wall = 1   
                    speed_limit_MPH = 70.0         
          You don't need the "; pace car" or "; special stalls" sections.
          Paste below the [ pit_lane_0 ] / [ starting_grid_1 ] section.
          Rename the newly pasted copy of [ pit_lane_0 ] to [ pit_lane_1 ]. Copy,
                    [ pit_lane_0 ]
                    ; regular stalls
                    stall_0 = 121.00 26.00 -0.00
                    stall_1 = 109.57 26.00 -0.01
                    stall_2 = 98.14 26.00 -0.00
                    --- etc
                    stall_42 = 6266.00 26.00 0.00
          and paste this below the newly created and pasted [ pit_lane_1 ] section.
          Change the "stall_0 = 257.00 26.00 -0.00" to the new location, 3m before the new "pit_lane_end_dlong = 260.00".



« Last Edit: June 17, 2012, 05:26:22 PM by fortine_oo » Logged
fortine_oo
Legacy
Sr. Member
*****
Posts: 188



« Reply #2 on: November 22, 2011, 11:03:03 PM »

2. PITSTALLS
    a) laying out pitstalls_
        There are programs that will generate pitstall values, "Mkstalls" (located in the Sandbox folder) and "Pit Tool Basic v1.0" (available in "The Pits - Editing Tools"
            package). There may be more that I'm not aware of.
        I don't use a program, I do it manually, locating the first stall by estimating the dlong/dlat values from the 'Geometry Editing View' in Sandbox.
            It's been my experience, minimum pitstall spacing be at least 9.5 (centerline stall to centerline stall) to avoid ai pitstall entry/exit problems.
            I recommend a minimum 10.0 spacing, and even larger spacing provides more alternatives to ai pitstall entry/exit values. (It is possible to use
            less than 9.5 spacing, but it more often than not creates ai pit entry/exit intereference with the car fore or aft, and it's really difficult for the
            Player to get in and out cleanly.)
        Each car must have a pitstall dlong and dlat value which will locate the pitbox on "Pit Stall" subsurface or it will not receive service.
        All wheels must be on pit stall subsurface to get service.
   
        stall_# = <dlong center of pitbox> <dlat center of pitbox> <angle of the car when placed in the pitbox>
        ; regular stalls  (example for a pitroad ending at 103.00 on a 3000mi track)
        stall_0 = 100.00 20.00 0.00  {dlong -3.00 from the end of pitroad} {The end of the pitspeed requirement (and technically pitroad)
        is approximately +3 meters from stall_0, regardless of the "pit_lane_end_dlong" value and "Pit Road" subsurface.}
        stall_1 = 90.00 20.00 0.00
        --- etc
        stall_10 = 0.0 20.00 0.00
        stall_11 = 2990.0 20.00 0.00  {Some pitstall programs generate negative dlong values (e.g. -10.00 here) for pitstalls located before the S/F line.
            This works on some tracks, but on other tracks, a pitstall with a negative dlong value will not receive pit service. If that's the case, you'll have to subtract
            the generated negative value from the total track distance and enter that as the value for <dlong center of pitbox>.}


        The second value {stall_# = <dlong center of pitbox> <dlat center of pitbox> <angle of the car when placed in the pitbox>}, the dlat
            center of pitbox, will normally be the same (+/-) for all the stalls if pitroad is straight. If pitroad and/or the track along pitroad is curved, this value
            will vary. This value sets the distance of the pitbox from the pitwall (if there is one).
            The pit crew location is tied to the dlat value, so you'll want to check to make sure that the value puts the crew behind the wall when not in action, and
            standing on the wall as the car comes into the pitbox. If there is no "Pit Stall" subsurface, the spotter will say, "you're too far to the right", "you're too far
            too the left", and it's impossible to position your car correctly (or get service). If the "dlat center of pitbox" is too close to the "Pit Road" subsurface, the
            spotter will say, "you're too far to the right",  "you're too far back", "you're too far foward", and "you're too far to the left, we can't change the left-side
            tires...". If the "dlat center of pitbox" is too too close to the pitwall , the car may be impaled on the pitwall when it is placed onto the pitstall, however,
            you can get serviced in a race.
         The ai mostly stop at the pitbox center location. The Player must be close to the pitbox center dlong value, but has quite a bit of left/right of center
            wiggle room.

         Pit stall dlat dimensions:
         pit crew @ rest: +/- 3.9 from pitstall center
         pit crew on wall: +/- 3.4 from pitstall center

         To receive full service:
         There are minimum and maximum distances from the track.ini stall_X dlat value where the Player's car can stop.
         +/- 0.75  center of car from pitstall center toward wall (before there's no service for tires closest to wall)
         +/- 5.0  center of car from pitstall center away from wall (pit stall subsurface must be wide enough to support this distance,
                    all wheels must be on pit stall subsurface)
 

        The third value {stall_# = <dlong center of pitbox> <dlat center of pitbox> <angle of the car when placed in the pitbox>},
            the angle of the car when placed in the pitbox, is normally 0.00 when the pitroad and the track along pitroad is straight. If pitroad and/or
            the track along pitroad is curved, an angle (a radian value, either positive or negative) will be needed to make the car parallel to the pitwall.


        special stall_
             This is the pitstall for the Player in the Qualifying Session. It is normally the same as "stall_0", but it's location is not limited to pitroad and can be
             anywhere on the track. On a long roadcourse, it's convenient to place this out on the track so the Player does not have to do a full course out lap.
        ; special stalls
        stall_qual_exit = <dlong center of pitbox> <dlat center of pitbox> <angle of the car when placed in the pitbox>

        Option_
           Regardless of the subsurface designation and the track.ini "pit_lane_start_dlong" value, normal NR2003 procedure causes the ai to begin the pitspeed
           about 4m before the location of the first pitstall on pitroad. Likewise, regardless of the subsurface designation and the track.ini "pit_lane_end_dlong"
           value, normal NR2003 procedure causes the ai to return to race speed about 3m after the location of the last pitstall on pitroad.
           To enforce the "pitspeed" beyond the normal first and last pitstall, an extra pitstall will need to be added. {see Pit Road/ c)/ Option_)


        WARNING: There must be at least as many pitstalls (stall_xx) as the number of "max_starters" listed in the track.ini or NR2003 will
              CTD (or cause a hard crash).

    b) Pit Stall layout in the track.ini_
         Information is based on a 43 car field. When less than 43 pit stalls are physically available, substitute the highest stall number for stall_42.
         Non-standard pit stall layout may result in pit penalties unless a work-a-round is employed.
         There are more pit stall layout scenarios than are addressed here, these are the main ones which mostly employ the use of a single row of pit stalls, [ pit0 ] only.


        Normal:
            43 pit stalls (maximum useable), no special configuration (i.e. [ pit0 ] only, or [ pit0 ] and [ pit1 ] for 2 lines of pit stalls)

            NR2003 wants stall_0 to be the last pit stall on pitroad, i.e. the farthest dlong value, and will only enforce the pit speed to +/- 3m after this stall dlong value.
            When stall_0 is not the last pit stall, the ai are released from the pit speed value after they pass this pit stall.

            NR2003 wants stall_42 to be the first pit stall on pitroad, i.e. the soonest dlong value, and will only enforce the pit speed from +/- 4m before this stall dlong value.
            When stall_42 is not the first pit stall, the ai will only slow to the pit speed value when they reach this pit stall.

            How the pit stalls are assigned via qualifying to the pit stalls in between the first and the last is a non-issue, i.e. it doesn't matter where (in what order) these
                 qualifiers are placed on pit road, other than between stall_0 and stall_42.

         Normal Plus:
             43 pit stalls with stall_0 as the last pit stall on pitroad and stall_42 as the first pit stall on pitroad, but the pit speed is to be required before the first pit stall on
                 pitroad and/or after the last pit stall on pitroad:
             See: 1. PIT ROAD/ c) getting the ai on and off pitroad via the track.ini/ Option_Force the ai to run the pitspeed regardless of the pitstall locations.


         Special layout:
             Pit stall locations configured to meet special track conditions.
             Work-a-rounds are required. Pit stalls that won't actually be used will be added to the track.ini.

             Example that would require a non-conventional layout:
             1. There are limited spaces in front of the garages and you want those pit stalls used before using pit stalls that are in open areas.
             2. To meet a real track situation where there are less than 43 pit stalls. However, you want to provide more pit stalls, but you want the real pit stall locations
                   used first.

             Place any pit stall at any dlong value in [ pit0 ] stall_0 to stall_42.
             Add a [ pit1 ] stanza with the stall_0 - stall_42 in numerical order of distance; e.g. a 3000m track,the farthest dlong, 200 (stall_0) down to the soonest
                 dlong, 2800 (stall_42).
             This will eliminate pit penalties and it will maintain the pit speed area to the last pit stall, but it may not help with where the ai begin using the pit speed,
                 if [ pit0 ] stall_42 is not the first pit stall on pit road.
             Add a [ pit0 ] stall_43 with the dlong of the first pit stall on pit road. It won't cause a problem because NR2003 only allows 43 competitors which occupy
              stall_0 to stall_42.


    c) getting the ai in and out of the pitbox via the track.ini_
       {Unless the pitstalls are really short, it's easier to borrow the values for ai pitting from a track where it's already working well (rather than inventing new values).}
        There are five track.ini lines that control the ai on pitroad and enter and exit the pitbox.
          [ pit_lane_0 ]
          begin_stall_approach_offset = 60   ; offset at which to begin approaching the pit stall
          begin_stall_entry_offset = 16   ; offset at which to begin entering the pit stall
          stall_exit_goal_dlong_offset = 8.0   ; goal dlong offset for the pit stall exit
          stall_exit_goal_dlat_offset = -4.0   ; goal dlat offset for the stall exit {if the ai exits left out of the pitbox this is a positive value, right is a negative value}
          slow_pit_line_dlat_offset = x.xx   ; dlat_offset of 2nd slower pit line (0 if N/A) {The dlat distance difference between the pit lp's. It helps the ai to
                use the secondary pit lp's for passing slower moving ai while under pit control as established by the track.ini.}

        The values that control the ai entering and exiting the pitbox, "begin_stall_entry_offset" - "stall_exit_goal_dlong_offset" - "stall_exit_goal_dlat_offset",
            will need to take into account the pitstall spacing (size) so the ai have clearance when angling into or out of the pitbox.
        Unless they are blocked (and sometimes even when they are), the ai will adhere to the pit.lp while on pitroad.
        At a distance from the pitstall, as established by "begin_stall_approach_offset = 60" (e.g. 60m here), the ai will move to the secondary pit lp that
            is closer to the pitstalls, either maxpit0.lp or minpit0.lp (depending on which side of the track the pits are located, maxpit0.lp if pitroad is left of
            the track or minpit0.lp if pitroad is right of the track).
        At a distance from the pitstall, as established by "begin_stall_entry_offset = 16" (e.g. 16m here), the ai will angle into their pitbox.
        When the ai exit the pitbox, they pull foward slightly as they're turning out and aim for a point (with the front center of the car) on pitroad as
            established by the combination of "stall_exit_goal_dlong_offset = 8.0" and "stall_exit_goal_dlat_offset = -4.0", where e.g., 8.0 is 8m track
            foward from pitstall center, and -4.0 is 4m onto pitroad from pitstall center. A positive "add_stall_exit_goal_dlat_offset" value will cause the
            ai to turn left from the pitbox, a negative value will cause the ai to turn right from the pitbox. Once the ai square the car after reaching that
            point, they'll merge to the pit0.lp if it is clear of other cars. It is best to use a distance for "stall_exit_goal_dlat_offset" that will land them on
            the secondary pit lp that is closest to the pitstalls.


« Last Edit: February 29, 2016, 02:07:18 AM by fortine_oo » Logged
fortine_oo
Legacy
Sr. Member
*****
Posts: 188



« Reply #3 on: November 22, 2011, 11:05:06 PM »

3. PIT LP's
    a) making pit lp's_
        NOTE_min is always on the right, max is always on the left;
             track direction, CW or CCW doesn't matter. Facing the driving direction, max is on the left, race.lp or pit0.lp is to the right of that, and
             min is farthest to the right.
        At least two pit lp's are needed to have the ai as error free as possible on pitroad. The lp's need to leave the track and run down pitroad and
             re-enter the track.

    b) where to locate the pit lp's (on the track)_
        The ai on track don't "see" the cars on pitroad, so they are likely to run into cars coming off pitroad at less than racing speed, so try to run the
             pit lp's off the racing line as much as possible until there's an appropiate place where the ai can rejoin the race traffic at the appropiate race
             speed. That's also the point/value that you'd use for "merge_from_pit_line_dlong". IMPORTANT: the pit lp's must run on
             the "Apron" subsurface for the entire "lane_merge_dlong" distance.
        It's easiest to lay down the pit lp that is the closest to the pitstalls first, then you can lay down the pit0.lp from that. Then, using the pit0.lp
             as a guide, lay down the pit lp that's closest to the racing surface, and if it's a narrow pitroad, track on the pit0.lp down pitroad,
             then (if or when it's possible) move it off the pit0.lp and toward the track as space allows. An option when there's only room for two lanes
             on pitroad, make the m--pit lp that's closest to the racing surface a copy of the pit0.lp.
        pit0.lp: The pace car follows this line for the pace lap and caution laps, so when you make it, try and run the line you would when driving the
             pace car. This is also the pit line the ai want to be on when they are required to follow the pit lp. It works the best when the pit0.lp is tracking
             on the race.lp at the dlong value of "merge_to_pit_line_dlong" line. From that point have it move smoothly to the pit road entrance, remembering
             to leave room (if possible) for the minpit and maxpit lp's. The "merge_to_pit_line_length" is distance added to the "merge_to_pit_line_dlong" value
             to give the ai some discretion on when they have to commit to the pit lp and pitting. Make sure the total distance doesn't exceed past the point
             that will allow the ai an easy entrance onto pitroad.
             If the pit0.lp is too far (laterally) from the pitstalls, the ai may slide (sideways) into the pitbox rather than drive into the pitbox.
        minpit0 and maxpit0: For the majority of the circuit, it doesn't matter where these are. As you get close to the "merge_to_pit_line_dlong" point, make
             sure the maxpit0.lp tracks on or next to the maxrace.lp, and the minpit0.lp tracks on or next to the minrace lp. Then, no matter the ai's current
             location on the track, the ai will then be able to easily capture any pit lp to begin their transition to the pits. Put the min or max (whichever is
             closest to the pitstalls) on the lane immediately next to the pitstalls. Put the pit0.lp 1-1/2 lanes toward the track from the lane next to the pitstalls.
             If there's room*** put the remaining min or max lp 1-1/2 lanes from the pit0.lp toward the track.
             *** If there is only enough width on pitroad for 2 lp's,
                  1) copy pit0.lp and rename it (minpit0.lp if it is supposed to be right of pit0.lp or maxpit0.lp if it is supposed to be left of pit0.lp),
                  2) as the lp leaves the track for the pits, merge it onto the pit0.lp path down pitroad, and when possible after clearing pitroad, run it in its
                      own space.  

    c) coordinating the pit lp's and track.ini values_
        For the "merge_to_pit_line_dlong" value, pick a distance that will give the ai time to merge to one of the pit lp's and work its way clear of race traffic
             before slowing.
        Using a "merge_to_pit_line_length" distance in addition to the "merge_to_pit_line_dlong" value will usually aid in the ai getting clear off traffic, assuming
             the pit lp's are placed to help the situation.
        The total "merge_to_pit_line_dlong" + "merge_to_pit_line_length" distance must leave enough room and time for the ai to get cleanly onto pitroad.
             Ai track speed, pitroad speed, "ai_squeeze_pcnt", and "ai_line_modifier" when it's greater than zero, all affect the ai's ability to get onto pitroad
             incident free.
        Use "merge_from_pit_line_dlong" to keep the ai following the pit lps, rather than merging back onto the racing line, until they're up to speed and in a
             safer place to blend in.


« Last Edit: July 31, 2013, 03:11:52 PM by fortine_oo » Logged
fortine_oo
Legacy
Sr. Member
*****
Posts: 188



« Reply #4 on: November 22, 2011, 11:06:14 PM »

4. PACE CAR
        The pace car is controlled by the pit0.lp (or pit1.lp) and the track.ini.
        When the pace car is in operation, it follows the pit0.lp (or pit1.lp). {There is no such thing as a pace.lp.}

        ; pace car
          This section in the track.ini is for the pace car. It works the same as [ pit_lane_0 ] ; AI stuff.

        begin_pacestall_entry_offset = 40.0                     ; offset at which to begin entering the pit stall
        begin_pacestall_approach_offset = 100.0              ; offset at which to begin approaching the pit stall
        pacestall_exit_goal_dlong_offset = 8.0                  ; goal dlong offset (ahead) for the pit stall exit
        pacestall_exit_goal_dlat_offset = 3                      ; goal dlat offset for the pit stall exit
        stall_pace = 164.67 30.76 -0.02                          ; where the pace car parks

        
        [ ai_track ]
        If "pace_merge_to_pit_line_dlong" line is missing, the pace car will try to immediately leave the track on a full pace lap.

        pace_merge_from_pit_line_dlong = xxx.xx  
             As long as the pace car is physically able to merge from the apron onto the racing surface, i.e. there's no wall or abrupt changes to the
             pavement laterally, any value will do. I normally use a value that releases the pace car as soon as possible.
        pace_merge_to_pit_line_dlong = xxxx.xx  
             I like the effect you get when the pace car veers off toward pitroad at the last instance before pitroad entry, so I use a dlong value
             about 100 -150m before pit entry. At the very least, make this value greater than half of the total track distance.


« Last Edit: February 15, 2013, 10:20:03 PM by fortine_oo » Logged
fortine_oo
Legacy
Sr. Member
*****
Posts: 188



« Reply #5 on: November 22, 2011, 11:07:42 PM »

5. STARTING GRID
    a) make a starting grid_
        Set the pole position. The usual practice is to make the preferred line into the first turn the pole side.
        However, on roadcourses, the preferred line is not always the "inside". The (Nascar) rules don't allow passing on the inside before reaching the S/F line.
             Depending on the placement of the grid and the pole-side line, you can manipulate the start by allowing almost immediate passing on the wide side of the
             track, or for all practical purposes, prevent most passing and go 2x2 into T1.
          [ track ]
          starting_grid_0 = 1       ; grid_2x2_InLinePoleOnLeft=1,right=2
          starting_grid_1 = 1      ; grid_2x2_InLinePoleOnLeft=1,right=2
        The dlat value for each [ starting_grid_0 ] & [ starting_grid_1 ] "stall_X" must represent the exact dlat location of each car's starting position.
          For "starting_grid_0 = 1", "stall_0" would be to the left of "stall_1". For "starting_grid_0 = 2", the dlats would be reversed and "stall_0" would be to the
          right of "stall_1". Normally these two lines would be located in the [ track ] section. If you wanted "InLinePoleOnLeft=1" for one starting grid,
          and "InLinePoleOnLeft=2" for the other, locate the appropiate line in the [ starting_grid_0 ] & [ starting_grid_1 ] section. If the cars [ starting_grid_0(1) ] dlat
          values aren't in sync with the "starting_grid_0(1) = 1 or 2" rule, they will swap (or try to) inside/outside positions once the pace lap begins.

    b) coordinating the lp's and track.ini values_
        Generally, the ai follow the maxrace.lp and minrace.lp on the pacing laps or during a caution. {It's not a hard and fast rule, there are track conditions which
           cause the ai to vary from that, but that's not so important for this part.} The ai will start from the grid mostly straight foward if you set one line of the
           grid more or less on the m--race.lp that is closest to the race.lp, and the other line 4m from the first line (i.e. 4m in the direction of the other m--race.lp).
           As an example, the race.lp is at 0.00 dlat, the minrace.lp is at -2.00 dlat, and the maxrace.lp is at 10.00 dlat. Stall_1 is -2.00 dlat and stall_0 is at 2.00 dlat,
           both are at the same dlong. After that it's just a matter of establishing the first row dlong and then subtracking 8 - 10 meters per row.

        Put the pace car on the pit0.lp, just behind the S/F line and 10m in front of the grid.
          Full Pace_
          [ starting_grid_0 ]
          stall_pace = 3550.00 0.00 0.00
          stall_0 = 3540.00 2.00 0.00
          stall_1 = 3540.00 -2.00 0.00
          stall_2 = 3530.00 2.00 0.00
          stall_3 = 3530.00 -2.00 0.00
          --- etc

        Use the same procedure as the full pace to set the dlat values. The best (easiest) place to set the short pace grid is on the last straight before the S/F line.
        Put the pace car on the pit0.lp, 10m in front of the grid.
          [ starting_grid_1 ]
          stall_pace = 2480.00 0.00 0.00
          stall_0 =  2470.00 -3.72 0.00
          stall_1 =  2470.00 2.85 0.00
          stall_2 =  2462.00 -3.72 0.00
          stall_3 =  2462.00 2.85 0.00
          --- etc

    c) standing start_
        Standing start method, NORMAL:
        1_
        Apply track.ini changes to <[ starting_grid_0 ]> (full pace). This leaves one pace lap for a normal rolling start.
        The ai appear will appear to start a normal pace lap, but as the pace car quickly crosses half track distance, the green flag order is given. There's a very
            short lag (less than 1 second) before the ai take off racing, but the player can just mash it as soon as you see the ai move.
       WARNING:
        The NR2003.exe considers the polesitter to be on the inside of the track and does not allow passing on the inside before the S/F line. On a CW track,
            the inside is the right side, on a CCW track, the inside is the left side. If you are in the pole-side line, you cannot pass any car in your line on the
            "inside" (as described), but you can pass anyone in the other line on the "inside". If you are in the other line, you cannot pass anyone on the "inside"
                  (as described).
        2_
        The pace car cannot start beyond the half way point from the S/F line. One meter less than half usually works.
        <stall_pace = xxx.00(half distance - 1) x.00 x.00>
        I've never had the field catch the pace car on the track using realistic (normal) pace speeds on a RC track up to 6 miles long.  
        3_
        [ ai_track ]
        pace_merge_to_pit_line_dlong = xxx.00       Arbitrarily, 100 meters less than half.
        I never had a problem with this value being farther down the track until Monaco F1. Having a value less than half track length commits the pace car to "pit in"
            when it starts, so it releases the field to a start condition (I guess).
        4_
        <[ starting_grid_0 ]> or <[ starting_grid_1 ]>
        <stall_0 = xxx.00 x.00 0.00>
        <stall_1 = xxx.00 x.00 0.00>
        etc.
        Align grid close to the S/F line. Allow a 8 - 10 meter clearance from the S/F line as a cushion so no ai cross the S/F line before the green flag flies.

        Standing start method, INSTANTANEOUS:
        1_
        Apply track.ini changes to <[ track ]> <starter_decision = XX00 XX01>. Add an arbitrary value, say 1500, to the actual track length and use the new value
             as the "starter_decision".
        The ai race (and spotter yells green flag) as soon as the pace car starts. The ai still do that twist turn as they start, so you only advantage to this method
             is the fraction of a second it takes to actually see (or hear from the spotter) a green flag.
        The drawback to this method is you lose the option to have a different (full or short) pace lap.
        WARNING:
         The NR2003.exe considers the polesitter to be on the inside of the track and does not allow passing on the inside before the S/F line. On a CW track,
             the inside is the right side, on a CCW track, the inside is the left side. If you are in the pole-side line, you cannot pass any car in your line on the
             "inside" (as described), but you can pass anyone in the other line on the "inside". If you are in the other line, you cannot pass anyone on the "inside"
             (as described).
        2_ same as NORMAL
        3_ same as NORMAL
        4_ You can have the starting grid anywhere you want (with either version), but you can't pass on the "inside" until the S/F line, and you don't want the ai
              to catch the pace car before it gets to pit road because they'll slow to stay behind the pace car.


« Last Edit: June 12, 2012, 07:01:34 PM by fortine_oo » Logged
fortine_oo
Legacy
Sr. Member
*****
Posts: 188



« Reply #6 on: November 22, 2011, 11:17:42 PM »

Pitroad_track.ini & subsurfaces

A visual accompaniment to the text.
This would be an usual layout incorporating all the options, extended pit entry pitspeed control, extended pit exit pitspeed control, and an [ AppRuleEnterPits ] location that is not the same as "pit_lane_start_dlong".

If the pitstalls are only for [ pit_lane_0 ] stall_0 to stall_42, and the additional sections are not needed for extended pit entry and/or pit exit (for additional pitspeed control), the subsurfaces for those sections would be "Apron" or "Apron Near Pits". However, pitspeed would function normally, i.e. for the length of the normal 43 pitstalls, even if the subsurfaces were to remain "Pit Road"/ "Pit Stall".


* pits_textures-subsurface.gif (301.8 KB, 2406x544 - viewed 499 times.)
* pits_textures-subsurface_Lg.7z (1691.93 KB - downloaded 174 times.)
« Last Edit: November 23, 2011, 01:08:30 AM by fortine_oo » Logged
fortine_oo
Legacy
Sr. Member
*****
Posts: 188



« Reply #7 on: November 22, 2011, 11:25:37 PM »

This is an ai exiting the pitbox.

The track.ini values:
   stall_exit_goal_dlat_offset = -4.0   ; 4m to the right of pitstall center
   stall_exit_goal_dlong_offset = 7.0   ; 7m forward from pitstall center
   The pitstalls are 10.0 center to center.

This might help you to guess-timate different values for different pitstalls spacing.  


* pitbox exit.gif (1444.41 KB, 1000x563 - viewed 487 times.)
« Last Edit: November 23, 2011, 01:08:10 AM by fortine_oo » Logged
Pages: [1] Go Up Print 
« previous next »
Jump to:  

Powered by SMF 1.1.15 | SMF © 2006-2008, Simple Machines
Leviathan design by Bloc | XHTML | CSS