1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
Dismiss Notice
Like RaceDepartment on Facebook.

Misc speed limit for AI on Nordschleife Flugplatz 1.1

ai_hints data mod to prevent AI cars flying of Flugplatz at the Green Hell

  1. Sunny Sky Speed

    Sunny Sky Speed
    Livery Designer Premium Member

    Sunny Sky Speed submitted a new resource:

    speed limit for AI on Nordschleife Flugplatz - ai_hints data mod to prevent AI cars flying of Flugplatz at the Green Hell

    Read more about this resource...
     
  2. I didn't know anything of this "ai_hints.ini" stuff before and now, thanks to you, I think this is brilliant and could be the perfect solution for the same problem I've in some other mod tracks where the AI drives too fast in some spots, especially before some tricky corners.
    Can you please explain how to write a proper ai_hints.ini file or can you point me to any resources that explain it?
    Again, thank you very much!
     
    • Like Like x 1
  3. Sunny Sky Speed

    Sunny Sky Speed
    Livery Designer Premium Member

    Well I will do my best to explain...
    1) Open the ai_hints file (that you downloaded) in ks_nordschleife/nordschleife and on top you will see this :
    ; flugplatz
    [HINT_0]
    START=0.096
    END=0.111

    VALUE=0.40
    In step 4 at the bottom of this explanation you will need the blue highlighted underlined section!

    This "flugplatz" data isn't there in the original ai_hints file, I created it based on the data already present in the file AND based on the camera file of that track. If you want to create new ai_hint data for any track, you will need to understand how to relate to the camera positions on that track.
    2) Open the camera file of nordschleife. You will see all data of all camera positions, like this one:
    you will need the underlined, highlighted green area in this data section. This is the start camera of the track, as the IN_POINT = 0. All camera's are positioned between 0 and 1 and have their specific start angle (IN_POINT) and ending angle (OUT_POINT).

    [CAMERA_51]
    NAME=51
    POSITION=-498.051 ,141.1 ,2382.49
    FORWARD=-0.47224 ,-0.0251615 ,-0.881219
    UP=-0.0118839 ,0.999683 ,-0.0221802
    MIN_FOV=10
    MAX_FOV=10
    IN_POINT=0
    OUT_POINT=0.00750582

    SHADOW_SPLIT0=20
    SHADOW_SPLIT1=70
    SHADOW_SPLIT2=300
    NEAR_PLANE=1
    FAR_PLANE=2000
    MIN_EXPOSURE=0
    MAX_EXPOSURE=10000
    DOF_FACTOR=10
    DOF_RANGE=10000
    DOF_FOCUS=0
    DOF_MANUAL=0
    SPLINE=
    SPLINE_ROTATION=0
    FOV_GAMMA=0.75
    SPLINE_ANIMATION_LENGTH=15
    IS_FIXED=0

    3) Find the right camera for the right area you want to edit the AI behaviour on track:
    Based on the camera data, you will need to find the right area to edit in the ai_hints file.
    First, record a lap on the track (just one lap from start, use quick race because the grid is your start camera position) by saving the replay.
    Then, find the start camera in the camera file of the track, like demonstrated above.
    Start your replay and count the camera's from start until the point you want to edit. Then go to the camera file and count the same amount of camera's starting from the IN_POINT=0 camera.
    For Nordschleife this is :
    [CAMERA_5]
    NAME=6
    POSITION=-2256.21 ,102.905 ,1453.21
    FORWARD=0.637247 ,-0.0809126 ,0.766447
    UP=0.0517291 ,0.996722 ,0.0622176
    MIN_FOV=6
    MAX_FOV=6
    IN_POINT=0.0913458
    OUT_POINT=0.121369

    SHADOW_SPLIT0=12
    SHADOW_SPLIT1=80
    SHADOW_SPLIT2=450
    NEAR_PLANE=1
    FAR_PLANE=1000
    MIN_EXPOSURE=0
    MAX_EXPOSURE=10000
    DOF_FACTOR=10
    DOF_RANGE=10000
    DOF_FOCUS=0
    DOF_MANUAL=0
    SPLINE=
    SPLINE_ROTATION=0
    FOV_GAMMA=0.75
    SPLINE_ANIMATION_LENGTH=15
    IS_FIXED=0

    4) Now you know the referrence point of the camera, you can start editing the area in the ai_hints file because, here's the clue, the camera referrence points (IN/OUT_POINT) are roughly the same as the ai behaviour points (START/END). See the blue highlighted section in paragraph 1 on top ;-)

    First, in the ai_hints file, name the area (just for convenience reasons) like following :
    ;flugplatz
    then you create the new data by copying already existing data and pasting it in the CORRECT order and name the [HINT] file chronologically according to the others, rename them too. As the "flugplatz" HINT file comes before all others, it is named [HINT_0] and all others have been adjusted accordingly.
    Then, by watching your replay, you can start playing around with the referrence points where exactly the ai needs to behave slower/faster.
    for flugplatz this is
    START=0.096
    END=0.111

    (see how the START/END value of the ai_hint file lies between the IN/OUT_POINT value of the camera file? :geek:;))

    The VALUE= is the amount of speed, power,downforce? I am not really sure?, an ai car uses to alternate its behaviour. You will need to play with this too, I had to drop this significantly for flugplatz and set it at
    VALUE=0.40.

    5)Test your data input to see if the ai behaves better and responds accurately. Based on this information, you should be able to create ai_hints files in any track.:whistling:

    Hope you learned a bit and I didn't make it too complicated.:confused::D

    Any further questions, shoot away;)
     
  4. This is amazing!
    Following your clear guide I already did some tests and it works perfectly!
    I've come to understand that the START/END points in the hints file are simply the percentage of the AI fastlane spline length, so you can play a bit and find the correct values even if a mod track comes without cameras file.
    Again in the hints file VALUE seems to be the percentage of the original speed resulting from the fastlane in that point.
    So for example, in a 1000 meters long track (fastlane), if you want the AI to go 85% of their fastlane speed from the 600 meters point to the 650 meters point the resulting HINT would be:
    [HINT_0]
    START=0.600
    END=0.650
    VALUE=0.85

    I'm going to experiment some more to be sure of all this but you already helped me to understand a new and very useful aspect of the game!
    Thanks! :)
     
    • Love Love x 1
  5. jlnprssnr

    jlnprssnr
    Premium Member

    They're reworking the Flugplatz at the moment, I was under the impression that there'll be no speed limits once that's finished. Not sure though. But that's nitpicking anyway :p
     
    • Beer Beer x 1
  6. Sunny Sky Speed

    Sunny Sky Speed
    Livery Designer Premium Member

    Sunny Sky Speed updated speed limit for AI on Nordschleife Flugplatz with a new update entry:

    Added Hohenrain ai_hint data

    Read the rest of this update entry...
     
  7. Chris Stacey

    Chris Stacey
    Ted Kravitz Appreciation Society Staff Premium Member

    Changed resource to Misc.
     
  8. This is so awesome. Based on this info, I assume there's a way to make AI not go WOT at the start of a race? Would love to adjust it so they accelerate just below the point of tyre spin off the start line... like real life... :geek:
     
    • Agree Agree x 1
  9. Hi !!

    Do somebody have the original ai hints file for the endurance ( I have not kept the original one...)

    Thanks a lot !
     
  10. Sunny Sky Speed

    Sunny Sky Speed
    Livery Designer Premium Member

    You could check the game integrity to restore original files. I messed up myself with the switch of the files. Apologies
     
  11. ok no prob ! problem is I have quite a lot of modified files that I don't want to restore to the originals...is there a way to replace just one ??
     
  12. Here's the KS original ai_hints file. I have the same problem, so many modded files that I hate to do integrity checks. Creates like an hour of extra work for me to restore AC back to how I modded it :D
     

    Attached Files:

    • Like Like x 1
  13. Sunny Sky Speed

    Sunny Sky Speed
    Livery Designer Premium Member

    Same here. ...to be safe I store all my mods in a backup and also all original data for that matter. But things can get messy sometimes.
     
    • Like Like x 1
  14. Steam really needs a system to check for modded files and then present a list to the user where they can select which files they actually want replaced/over written.
     
    • Agree Agree x 2
  15. Stereo

    Stereo
    Premium Member

    Just FYI, if you open AC's AI recording app (I believe this requires enabling dev apps), it'll list "Normalized pos" in red in the top left corner of your screen, that's a much easier way to get the ranges of values than using the cameras.
     
    • Love Love x 1
  16. Sunny Sky Speed

    Sunny Sky Speed
    Livery Designer Premium Member

    I knew there would be an easier way :)
    thx for that :thumbsup:
     
  17. Sunny Sky Speed

    Sunny Sky Speed
    Livery Designer Premium Member

  18. It's easier to use the DRS app than the cameras to find the correct points.
     
    • Like Like x 1