AIW (AI Path) Creation Tutorial PDF

Discussion in 'Track Modding' started by Mario Morais, Nov 2, 2013.

  1. dominevski

    dominevski Registered

    Joined:
    Oct 4, 2013
    Messages:
    26
    Likes Received:
    0
    Well, I am not so sure about that. I tried many times to record
    a perfect lap and I was very careful to not go on breaks if not
    needed but AI still slows down (-30 km/h) on high speed corners
    and sometimes even on straights. When that happens, there is
    always a drop in calculated speed without no (known) reason.

    This happens mostly to "my car" controlled by AI (CTRL + I).

    The AI cars (driven by AI naturally) are usually much faster
    but they are all over the place and ignoring apex as instructed
    by the fast path.

    Now this is another thing:
    AI cars and the car controlled by AI (CTRL + I) does different
    things. Which one is the "correct" one used by AI opponents
    when the track is finally exported?. I have so far only tested
    AIW in dev mode...
     
  2. Major_Parts

    Major_Parts Registered

    Joined:
    Aug 22, 2013
    Messages:
    125
    Likes Received:
    0
    I get a CTD when I click "add path as 1st pit"

    I should point out that this track already has a pit path, but I'm not happy with it! Should I do something to the original pit path before trying to redo it? Do I have to start from scratch? There doesn't seem to be a way of deleting just the pit path.
     
    Last edited by a moderator: Nov 14, 2013
  3. Tosch

    Tosch Registered

    Joined:
    Oct 5, 2010
    Messages:
    1,872
    Likes Received:
    51
    The reason for AI slowdowns can be small kinks in the fastest path. You can edit these spots manually. In path menu select the fastest path as actionable, mark some main waypoints before and past the slowdown spot and select "normalize curve" in unsupported options menu. You can also mark one single waypoint and modify the path with ctrl + cursor keys (fastest path as actionable). Check the calculated speed to get this right.

    AI cars ignoring apex sounds like an corridor problem. Go to "show/hide menu", select "show corridors" and check the curbs. You can modify the corridors, like the paths, with ctrl + cursor keys. Make sure there is no actionable path selected in path menu. The blue part of the corridor line is not drivable for the AI. Extend the white (left) and red (right) corridor lines and include the curbs to the drivable surface.
     
  4. dominevski

    dominevski Registered

    Joined:
    Oct 4, 2013
    Messages:
    26
    Likes Received:
    0
    Nope, nothing like that. I have tried several times and my laps
    were almost perfect. As an example: There are usually "kinks"
    where the path is connected between first and last WP.
    This is easy to fix with "normalize curve" but the calc speed
    still remains and must be cleared manually...

    Corridors are fine...
     
  5. iDTDoug

    iDTDoug Registered

    Joined:
    Oct 5, 2010
    Messages:
    336
    Likes Received:
    221
    ok, so I added my garage path successfully but the ai cars dont follow it. They head straight to pit lane (path shown in pink). What am i missing??
     

    Attached Files:

  6. Michael Juliano

    Michael Juliano Track Team

    Joined:
    Oct 4, 2010
    Messages:
    371
    Likes Received:
    5
    Hi,

    Luc was asking me about this--here's what I came up with:

    Looking at the image, my assumption is that the garage path is too far away from the parking spots (the tents) for them to make a proper connection, so the AI just try to drive to pit lane directly.

    -OR-

    You may also have not connected (joined) the garage path to the pit path.

    -OR-

    You may have forgotten to cap the garage path's end waypoint.

    And, just in passing, the garage path should have a smoother blend onto the pit lane path. They can overlap a bit--won't hurt. THat will make sure the AI are actually driving along the pit path before they actually merge onto it. The transition will be smoother...
     
  7. Michael Juliano

    Michael Juliano Track Team

    Joined:
    Oct 4, 2010
    Messages:
    371
    Likes Received:
    5
    You can TRY to delete all the waypoints of the pit path, save, reload, and try a new pit path (be SURE to make a back up BEFORE you do this). If that doesn't work then your only option is to run a new MAIN path. That will delete everything else.

    I THINK at one point you could safely re-run a pit path. I'd ask Luc to ask the programmer to take a look when time allows...
     
  8. iDTDoug

    iDTDoug Registered

    Joined:
    Oct 5, 2010
    Messages:
    336
    Likes Received:
    221
    thanks, i think i may just redo the whole thing (saving the grids) knowing that.
     
  9. krivjur

    krivjur Registered

    Joined:
    Oct 5, 2010
    Messages:
    64
    Likes Received:
    7
    Is the max distance for gararage spot to garage path defined somewhere? I know with GarageDepth you can alter the distance before AI starts to look for garage path, so I'd assume with high value, the garage path could be further away (IOW the "look for garage path" distance should be offset by GarageDepth).

    Related to this, what's the reason the end capping isn't done automatically after the garage path has been joined to pit path? You could probably cap it even before that if you set assumption/option the path is driven the correct direction. Even if you want to connect another garage path to the very start of the original one, you'd still need to cap the original before joining.


    You can re-run it, the old pit path will be deleted once you complete the new path and mark it as pit path (1 or 2, same as the old). What you need to remember is that any garage paths linked to the old will be destroyed among all corridors related to old garage path and pit path.
     
  10. machine

    machine Registered

    Joined:
    Jan 31, 2011
    Messages:
    399
    Likes Received:
    295
    Any garage spots need to be within the red or white areas. The picture clearly shows the garage spots well outside the red area on that side.

    The white and red lines actually look layed out wrong. They should be at 90deg to the centre line of the garage path. I dont know that you can change that in Moddev.
     
  11. krivjur

    krivjur Registered

    Joined:
    Oct 5, 2010
    Messages:
    64
    Likes Received:
    7
    Garage spots can be on area where no corridors have been laid out. I just tried moving them around quite far away (about same as Doug's pic) from garage path and AI seemed to find garage path. Not optimal but at least working.

    The actual corridor lines around garage path on his pic seem wrong though as you said. I don't remember getting this behavior myself.
     
  12. SPASKIS

    SPASKIS Registered

    Joined:
    Sep 7, 2011
    Messages:
    3,155
    Likes Received:
    1,426
    Queastion about legal limits

    The next thing you’ll want to do is “find corridors” from the main menu. AI use corridors to get
    information on the width of the track, what is a legal racing surface as opposed to an illegal surface,
    and so on. When you click on “find corridors” you’ll get a countdown as each waypoint is processed.
    Generally, the process usually takes only a few seconds.


    In my opinion this aspect needs quite more than a paragraph. In general reading ISI documentation makes me think that whoever writes it is not in the proper mood for doing this type of work. Having a visual AIW editor and not a single picture in the whole document is difficult to undesrtand for me. Sorry Scott but I have to say that I expected a much better job in terms of tutorials.

    Getting to the subject...

    I see that there are 4 width parameters: road, far, collision and cut. I understand that road is the driveable part of the road. collision should define the limits to avoid collision but far and cheat sound to be quite the same. Can it be explained the difference between them?
    In the cases related to penalty for cutting I understand that the penalty is applied if the wheel surpasses the limit.
    I understand as well that the penalty applied in practice or qualy is to invalidate the lap. However in the race I am not sure if it can be determined how many times can a limit be surpassed before being penalized and what is the penalty system for those cases. It would help a lot for leagues to avoid replays to prevent abuses in this sense.

    wp_width=(8.909,7.161,12.491,9.278) // road left, road right, far left, far right
    wp_dwidth=(12.491,9.278,0.000,0.000) // collision left, collision right, cut left, cut right

    I don't like AIW editor and I feel more comfortable myself using excel. A 2D tool for this would be much more appropriate for all the definitions even for editting the fsat line after making a lap. BTB users will easily understand.
    View attachment 11074
     
  13. machine

    machine Registered

    Joined:
    Jan 31, 2011
    Messages:
    399
    Likes Received:
    295
    True, they work and you may or not have issues, but on one of our tracks, 2 cars around 24 & 25 to join in multiplayer were being DQ'ed the moment they tried to drive. (Hit Drive Button) We finally fixed the problem after lots of hair pulling by making sure ALL garage spots were within the corridors.
     
  14. iDTDoug

    iDTDoug Registered

    Joined:
    Oct 5, 2010
    Messages:
    336
    Likes Received:
    221
    good news: re-doing the aiw fixed the garage path, bad news, only about 3 of my workers are waving flags, the rest don't.
     
  15. MarcG

    MarcG Registered

    Joined:
    Oct 4, 2010
    Messages:
    6,854
    Likes Received:
    2,234
    Ok finally bit the bullet and started AIW Creation learning (thanks to Tosch for getting me going after a slow start!).

    So far I've done everything to the BLOCK path on a test track just to get used to things, seems relatively easy so far, but I do have a couple of early editing questions:

    - When driving the FASTEST path do you really need to keep driving until you get it "right", or can you drive slowly but on the fastest line and just save after that first lap?

    - Personally I race almost 100% Offline, if I want to "better" the AIW of a track for a particular series, is it therefore best to have that Car in DevMode and do the FASTEST lap with that? (for argument sake ignore my first question in realtion to this!)

    Thanks
     
  16. Gupster

    Gupster Registered

    Joined:
    May 19, 2013
    Messages:
    410
    Likes Received:
    27
    I have found that driving slow does not work well. You can make "kinks" in the fast path that will only slow down the AI. Even using the "normalize curve" option doesn't work as good as driving a fast, smooth line. I think it is better to run close to but not to the limit for the timed lap for a smoother path.
     
  17. MarcG

    MarcG Registered

    Joined:
    Oct 4, 2010
    Messages:
    6,854
    Likes Received:
    2,234
    aahh yes you make a good point with that thanks. As for my second query I'm drawing to the conclusion using the same car in DevMode would be better as I find my lines are slightly different in the SB, not massively different but different all the same!
     
  18. MarcG

    MarcG Registered

    Joined:
    Oct 4, 2010
    Messages:
    6,854
    Likes Received:
    2,234
    cor this is fun, in just two short evenings I've improved the AIW of a track , just a couple of issues I ran into:

    - Got the "kink" on the start/finish line, tried the Normalize Curves but nothing worked but then noticed two waypoints right on top of each other at that point, deleted one, Normalized Curves again and voila...fixed!

    - My Pit Exit sucks but it was done whilst reading the PDF so practice will make perfect!

    - Masssive Schoolboy error when I did all the Pit Garages I had the car facing inwards, so the AI have great difficulty in actually getting onto Pit Lane :eek:


    Overall delighted with my personal progress, love editing/tweaking/testing, takes me back to my first person shooter level editing days...LOVE IT!
    Now to make this AIW better and then onto the next track, Many Thanks Scott/ISI for the tutorial & to Tosch for the PM help and everyone else in this thread that I got hints & tips from reading :)
     
    Last edited by a moderator: Jan 23, 2014
  19. MarcG

    MarcG Registered

    Joined:
    Oct 4, 2010
    Messages:
    6,854
    Likes Received:
    2,234
    I think I have a problem with my Corridors, when I click "find corridors" and then Save I get the following message:
    See log file for more information
    Valid pit location is missing some valid garage locations


    Along with this I have the Blue lines on some parts of the track so somethings not quite right, when I watch the AI in game they dont follow the FASTEST path at all suggesting they;re not seeing the corridors correctly, can anyone help? thanks
     
    Last edited by a moderator: Jan 25, 2014
  20. Tosch

    Tosch Registered

    Joined:
    Oct 5, 2010
    Messages:
    1,872
    Likes Received:
    51
    You should use "find corridors" only the first time you create the AIW because it removes all changes you have made manually. Find corridors is not perfect. Curbs are not included to the drivable surface and you have to include them by selecting the waypoint/waypoints and "ctrl + cursor up/down" for the white (left) corridor and "ctrl + cursor left/right" for the red (right) corridor.
    Make backups of your AIW file during this process. If you click accidentally on "find corridors" your progress is lost.

    The missing garage locations is not a problem.
    About the blue lines on the track. When you have two paths next to each other (pit path and main path) the non drivable surface (blue lines) from the pit path is visible on the main path.
     

Share This Page