Hey guys. I just got my brand new computer put together and I can actually spawn in AI controlled traffic now. I have a few maps with racetracks. The AI traffic is great for regular maps. However, when I drive on the racetracks, the AI controlled cars don't race me or each other and I'm getting a large amount of traffic coming the other way, right at me. Is there a setting in the game already to make the cars behave correctly on racetracks or is there a mod that will modify the traffic to behave like racecars when they are on racetracks but still behave normally on regular roads surrounding the racetrack?
As far as I know there's no way to use regular traffic and have the traffic AI behave differently on different roads. If you want races against the AI your best bet is to disable traffic and spawn individual vehicles to race against. Take a look at ai.driveUsingPath in vehicle LUA. The function is well documented with a comment explaining what each parameter does. If you pass a looping waypoint path (first and last waypoints are the same) to this function with more than 1 laps the AI will enter "race" mode. Without this the AI wants to slow down for each waypoint. That's how I got the best AI behavior so far. AI still overuses brakes so it might end up crashing after a couple laps but it's way more competitive than traffic. It's also not a perfect AI, if you use the same config you're pretty much guaranteed to be able to beat it. For a challenge give yourself a performance handicap and try to beat the AI with good driving.