1. Trouble with the game?
    Try the troubleshooter!

    Dismiss Notice
  2. Issues with the game?
    Check the Known Issues list before reporting!

    Dismiss Notice

Getting the AI to do laps at Hiroshi Raceway ?

Discussion in 'General Discussion' started by Enforcer_98, May 15, 2017.

  1. Enforcer_98

    Enforcer_98
    Expand Collapse

    Joined:
    Nov 6, 2014
    Messages:
    68
    Hi

    Just wondering if there is a selectable AI path that programs the AI to do laps of Hiroshi Raceway from the start line ?

    Thanks
     
  2. rocksim

    rocksim
    Expand Collapse

    Joined:
    Nov 10, 2014
    Messages:
    373
    No, but you could put in barrier props where you don't want them to go, I think. Never tried it, but I will!
     
  3. Specht77

    Specht77
    Expand Collapse

    Joined:
    Jan 16, 2013
    Messages:
    94
    No, but one way to do it, is going on the F11 editor, selecting all the roads you don't want them to drive, and change "drivabilty" to -1

    Then exit the editor and press CTRL + L so it'll reload the paths...

    Now you just need to place the cars on the staring line, and activate the cars to "random", they'll follow the only track you let with "drivability" 1


    Some warnings:

    - At the current state the AI is very, very, very dumb, they'll ignore each other and also ignore you, they'll all try to use the same line, and will grind on each other
    - They definitely don't know how to use a proper racing line, 90% of the turns they'll brake too much, 10% of the turns they'll overshoot and loose control...
     
    #3 Specht77, May 15, 2017
    Last edited: May 15, 2017
    • Informative Informative x 1
  4. Enforcer_98

    Enforcer_98
    Expand Collapse

    Joined:
    Nov 6, 2014
    Messages:
    68
    Thanks for the replies guys. Was hoping it would be a little easier. Oh well will have to go and experiment.
     
  5. Specht77

    Specht77
    Expand Collapse

    Joined:
    Jan 16, 2013
    Messages:
    94

    Oh, and I forgot to tell, they'll also ignore the barrier prop, just as they ignore other cars, so putting barriers on unwanted roads won't work, they'll crash on it
     
  6. retrospek

    retrospek
    Expand Collapse
    BeamNG Team

    Joined:
    Feb 23, 2016
    Messages:
    19
    Hi enforcer,

    take a look at this thread.

    If you still need assistance after going through the above let me know :)
     
    • Informative Informative x 1
  7. Specht77

    Specht77
    Expand Collapse

    Joined:
    Jan 16, 2013
    Messages:
    94
    Retrospek, I have some questions about the method you linked, do you think should I create a thread on my own or can I make the questions here?

    I tried the command on the commandline, but I'm getting errors and don't really know what I'm doing wrong, by the screenshot below can you discover what's wrong?


    beamNG_AI.png


    I used the following string:
    ai.driveUsingPath{wpTargetList = {'rc_asphalta', 'rc_asphalte', 'rc_dirtc', 'rc_asphaltd', 'rc_asphaltc', 'rc_asphaltb', 'rc_dirta', 'rc_asphalta'}, noOfLaps = 3, aggression = 1.44}
     
    #7 Specht77, May 18, 2017
    Last edited: May 18, 2017
  8. retrospek

    retrospek
    Expand Collapse
    BeamNG Team

    Joined:
    Feb 23, 2016
    Messages:
    19
    Hey specht, here is perfectly fine.

    So the problem is that you got the waypoint names in the wpTargetList table wrong. For example there is no node named 'rc_asphalta' as you have used above but there is a node 'rc_asphalta1' (notice the number at the end) and an 'rc_asphalta2' and so on. The same goes for the rest of the nodes that you typed in.

    To find the names of the waypoints on the map you can go to the AI app at "Debug Mode" at the "Map:" drop down list and select "Navigraph".

    Example:


    Remember that you don't need to input every single waypoint name along the route you would like the AI vehicle to follow. As I mentioned in the thread i pointed you to in my previous reply

    So if for example i wanted the vehicle in the picture below to follow the red track i have drawn i would use something like

    Code:
    ai.driveUsingPath{wpTargetList = {'rc_linka', 'rc_asphalta11', 'rc_asphaltb4', 'rc_linka'}, noOfLaps = 3, aggression = 1.44}


    If anything of the above is still not clear or if you face any other issue please don't hesitate to let me know and Ill be happy to help :)
     
    • Informative Informative x 1
  9. Specht77

    Specht77
    Expand Collapse

    Joined:
    Jan 16, 2013
    Messages:
    94

    EDIT: Ignore the Spoiler below, it was the message I had wrote, but I found what was the problem, it was missing a ' on the last 'rc_linkb'




    Thanks for your help! You were very kind with your words :D


    Now it's working :D :D :D



    I thought I understood everything, but it seems that I'm still doing something wrong...

    Now I used this string:

    Code:
    ai.driveUsingPath{wpTargetList = {'rc_linkb', 'rc_asphalta9', 'rc_dirtc7', 'rc_asphaltd12', 'rc_asphaltc10', 'rc_asphaltb7', 'rc_dirta7', 'rc_asphalta2', rc_linkb'}, noOfLaps = 3, aggression = 1.44}
    And got this error:
    beamNG_AI02.png


    btw, just for curiosity, why in your game the starting line is rc_linka and for me it's rc_linkb?

    Here's the track I tried to do:

    beamNG_AI03.jpg
     
    #9 Specht77, May 18, 2017
    Last edited: May 18, 2017
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice