SOLVED [AIW] AI not pitting after running.

Discussion in 'Track Modding' started by FRMracing, Mar 1, 2020.

Tags:
  1. FRMracing

    FRMracing Registered

    Joined:
    Apr 30, 2017
    Messages:
    36
    Likes Received:
    3
    How do you get the AI to use the pit boxes? I'm having a weird issue where they're driving right through the pits to go back to garage and they go back out without pitting, this is unexpected behavior compared to previous AIWs I've done... What went wrong? Did I miss something about connecting pit boxes to pitline??
     
  2. hpk

    hpk Registered

    Joined:
    Jan 15, 2013
    Messages:
    18
    Likes Received:
    18
    in aiw editor -
    reset special waypoints - save aiw - leave and reload track
    in show/hide menu - show wp connections to check if the
    garage spots are connected to the pit path
     
  3. FRMracing

    FRMracing Registered

    Joined:
    Apr 30, 2017
    Messages:
    36
    Likes Received:
    3
    Didn't work, tried twice.
     
  4. FRMracing

    FRMracing Registered

    Joined:
    Apr 30, 2017
    Messages:
    36
    Likes Received:
    3
    So I redid the entire pit-lines & pits and still nothing. Can someone try making a simple Belgium_66.AIW and see if their AI can pit?
     
  5. FRMracing

    FRMracing Registered

    Joined:
    Apr 30, 2017
    Messages:
    36
    Likes Received:
    3
    Figured it out, had to completely clear the AIW of all info (except garage spots) and re-did EVERYTHING, now I can see the pit-boxes connected to the pit-line as expected. For some reason the pre-existing pit-boxes from ISI were bugged and wouldn't connect after I deleted the previous pit-line they were connected to...
     
  6. DimmG

    DimmG Registered

    Joined:
    Dec 19, 2020
    Messages:
    27
    Likes Received:
    40
    Hi

    I made AIW for my track, but after the race some AI cut the grass and pitted. I looked the AIW and found that it has strange wp connections.
    [​IMG]
    Then I try to remove these connections and make them manually.
    [​IMG]
    But some AI drive through the pit-lane and back to the track now.

    Is it possible to fix it? Or maybe pit-spots are too close to each other?
     
    Last edited: Mar 6, 2022
  7. DimmG

    DimmG Registered

    Joined:
    Dec 19, 2020
    Messages:
    27
    Likes Received:
    40
    It looks like I had too small distance between pitspots. After increasing distance between pits connections became correct.
     
    davehenrie likes this.
  8. svictor

    svictor Registered

    Joined:
    Jan 20, 2019
    Messages:
    935
    Likes Received:
    6,344
    Just want to add an additional piece of info and solution to potential "AI not pitting" issue.

    As many have already mentioned that both "reset special waypoints" or "corridor separation" (in various posts from other threads) can help fix "AI not pitting".

    There is however another special case that is not fixable with those two methods.

    In my case, I started to create a new AI main path (in reverse direction) directly on top of a fully function AIW file(forward direction, with 1 pit extension connect to pit path). And after done all the new paths(main, pit, extension), pit-spots special waypoint can not be correctly generated by game (30 pit spots, but only 1 special WP generated), and "reset special waypoints > save > reload track > save again" procedure can not fix this issue (corridor has also correctly set).

    After hours of searching and testing without any success, I decided to do a side by side comparison check with a new fresh created AIW file in notepad++, and have found that PitExtensionsStart value in the troubled AIW file is still pointing to the old "forward direction" main path waypoint, which is incorrect for the new main & pit path (never noticed this value until now, and there is no results yielded from forum search). After I have corrected PitExtensionsStart value, and reload the track, all 30 pit-spots special waypoints are correctly generated by game, which fixed "AI not pitting" in this case.


    TLDR:
    If "reset special waypoints" or "corridor separation" fails to fix "AI not pitting" issue (due to game unable to generate correct pit-spots special waypoints), try open AIW file in notepad, and search for PitExtensionsStart value (if the track has pit extension path), then manually correct this value. The correct value should be the last pit path waypoint index + 1. For example, in the pic below, the value should be PitExtensionsStart=(2580)
    upload_2023-1-10_10-48-40.png

    Conclusion:
    The "AI not pitting" issue, in my case, is likely caused by directly creating a reverse-direction main path on top of a forward-direction AIW path that contains at least one pit extension. And for some reason this PitExtensionsStart value does not get reset, which prevent game from correctly generate pit spots special waypoints.

    Hope helps.
     
    Emery likes this.
  9. redapg

    redapg Registered

    Joined:
    Jan 16, 2012
    Messages:
    4,008
    Likes Received:
    2,875
    @svictor I don't know exactly what you mean with "started to create a new AI main path (in reverse direction) directly on top of a fully function AIW file", but in such Cases, you always should delete the whole Content in the [Waypoint] Section from the AIW, before you start with it, to avoid any Problems like the above described ones. ;)
     
    svictor likes this.
  10. svictor

    svictor Registered

    Joined:
    Jan 20, 2019
    Messages:
    935
    Likes Received:
    6,344
    Thanks for the suggestion. I was working on a new dundrod reverse layout, which I decided to just drive a new main path on top of the normal none-reverse layout AIW file, which resulted this issue.
     
    redapg likes this.

Share This Page