1. Trouble with the game?
    Try the troubleshooter!

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

    Dismiss Notice
  3. Before reporting issues or bugs, please check the up-to-date Bug Reporting Thread for the current version.
    0.35 Bug Reporting thread
    Solutions and more information may already be available.

How to make an AI Race Scenario (UPDATE)

Discussion in 'Troubleshooting: Bugs, Questions and Support' started by Aeroracer, Nov 6, 2022.

  1. Aeroracer

    Aeroracer
    Expand Collapse

    Joined:
    Jun 29, 2016
    Messages:
    106
    I've been meaning to do this for a while, but seeing that there's little support in the wiki page about this, I figured I ask here.

    I want to create a scenario taking a custom-made route around WCUSA, that also allows you to choose the opponent's car, how many laps, and if police are involved in the race too. I'm not very savvy with scenario making, or programming in general, so any help or wiki that can be provided to me to help me start making the scenarios I want to make with the flowgraph will be greatly appreciated.
     
    • Like Like x 1
  2. Aeroracer

    Aeroracer
    Expand Collapse

    Joined:
    Jun 29, 2016
    Messages:
    106

    UPDATE: Through trial, and lots of lots of error... I somewhat figured it out how to get it running... But with multiple bugs. And I still want some questions answered, since I want to generate scenarios of my own!

    • For one, I have different messages that display depending on what position you finish in, and if you finish other than 1st.. You still get congratulated for finishing 1st place, even if you don't finish 1st. Pretty self-explanatory.
    • When I start my scenario/AI race, my car starts in the proper place, but the AI start way farther ahead and off the grid spots I prepared for them. Not sure how to solve for that.
    • At the moment, I can only spawn in one type of ai car I selected through the editor menu. Though this is nice for a "One Make" race, I'd like to introduce interesting/custom configs for the AI in my races, but am not sure how to implement this feature. I guess I would have to have some prefab featuring the other racers' cars? Again, not sure.
    • This is a lesser issue, but I really want to see if it's possible for me to mess around with my automation cars as AI opponents in BeamNG. The mission editor wouldn't allow me to select them, so I'm assuming that's something I'd have to figure out in the flowgraph, which I still don't know how to use.
    Again, any and all help is welcome.
     
    • Like Like x 1
  3. alexbhambrilyte

    alexbhambrilyte
    Expand Collapse

    Joined:
    Mar 7, 2022
    Messages:
    10
    Hi press fn + f11 on your keyboard and then go to the "window" and then "Gameplay" and lastly of all, "script ai" this should get you there, from then on use this tutorial made by crashmandjaro which is with an older version so only use it from when they get to the script ai tab. i suggest saving your paths and also if they are not carried over t the next update you can go to (your old user folder location)/0.26/Replays/scriptai/tracks. they should be there. Any questions feel free to ask!

     
    • Like Like x 1
  4. Aeroracer

    Aeroracer
    Expand Collapse

    Joined:
    Jun 29, 2016
    Messages:
    106
    Hi, thanks for your input. However, I don't think this video much to help me in my current issues very much. I'm already familiar w/ how ScriptAI works, but I'm trying to make a scenario out of them racing each other. You know, like the ones added as missions in the 0.25 and 0.26 update. The ScriptAI stuff shown in the video is more in reference to him making crash compilations and making them feel natural. Not sure if you read the updated post of mine, but if you have any answers for those bugs I'm trying to work out, that'd be greatly appreciated!

    I do, however, want to ask you about prefabs and AI location.
    • For one, upon starting the race, the player starts where they're supposed to, but the AI starts way farther ahead for some reason, despite me having distinct start locations for them.
    • Secondly, I want to get to a point where I can add my own custom vehicles and configs to the race. And through the "predefined" nature of the mission editor, it doesn't quite let me. Unless, of course, I use a specific file type called a racer/prefab... I'm not sure how I would establish something like that, so any help would be appreciated.
     
  5. gary r

    gary r
    Expand Collapse

    Joined:
    Dec 10, 2021
    Messages:
    20
    Did you find out how to get ai to start were you wanted them to
     
  6. ༺LynX༻

    ༺LynX༻
    Expand Collapse

    Joined:
    May 12, 2022
    Messages:
    3
    Is the topic still relevant? I'm contemplating something similar
     
  7. gary r

    gary r
    Expand Collapse

    Joined:
    Dec 10, 2021
    Messages:
    20
    Go on YouTube and find a video by high Def He's got a few on there tells you how to do it
     
  8. ༺LynX༻

    ༺LynX༻
    Expand Collapse

    Joined:
    May 12, 2022
    Messages:
    3
    Thanks, found it. Unfortunately, that's not quite what I meant.

    I had fun racing with simple AI modes (raced to some place on the map or item). The problem with the solution shown in the video is that the cars can't see each other, and as a result they bump and smash mercilessly. That's why racing doesn't have that effect...

    I came here because I had a problem with it before, but in a slightly different form. Previously, I ran races by ordering cars to follow an item on the map. This gave a much better effect, but I noticed that sometimes it happened that again the cars did not want to overtake even though they could.

    I thought that combining these two options, i.e. starting the race with the "Hotlapping" tool and enabling the "ai.setAvoidCars" option for each car via the console, would solve the problem, but unfortunately in this situation the cars still do not overtake as efficiently as I would like...

    At the moment I am trying to find a way to do it in the .lua files responsible for AI, but I think I will create a topic in which I will try to describe the problem in detail. I'll post a link if the topic comes up.
     
  9. gary r

    gary r
    Expand Collapse

    Joined:
    Dec 10, 2021
    Messages:
    20
    When you made an Ai race did you go down to the bottom and set the AI to be more aggressive there's two or three AI options to adjust
     
  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