AMS modding newbie here who recently got back into sim racing. I'm absolutely loving driving Automobilista, especially CART Extreme (since I'm a huge AOWR fan). Would love to contribute to this awesome game and put in some work on improving mod track AIWs – for example on the JNS Oval tracks.
How to go about doing this? Any experts have any tips they can share?
Disclaimer: I don't think this question has been explicitly addressed in existing threads. If it has, my apologies – in this case, it'd be greatly appreciated if you could direct me to those discussions.
**One potential method that came to mind after doing some research: for rFactor conversions, could one modify the AIW "the old-fashioned way" using the rFactor AIWCAM Editor on the old rFactor track and then use that AIW file in the AMS version?
Yeah, the AI do jam on the brakes under blue flags sometimes. In a multiclass race, the faster-class AI also struggle sometimes to overtake in a straight line, usually needing to brake or let off the throttle behind the slower-class car.
Matthew Sibanyoni, the modder behind the Grand Touring Group 5 mod for AMS, has toyed around with various blue flag series file settings and has come up with well-optimized parameters to make them behave as well as they can. I'm currently away from my home PC, but when I'm back, I'll share them here (and remind me if I forget!).
However, I'm not aware of a fix for the straight line multiclass issue in AMS or its sister titles like rF1 and GTR2. As far as I know, Le Mans Ultimate is the first isiMotor-derived AI that pulls this off successfully (which is one reason I've been really enjoying that game – you can race the AI through traffic convincingly in a top class car!).
You may be right, morsify. I've heard people say that earlier AMS versions (1.3x, perhaps) had less of an issue with straight-line passing under multiclass or blue flags.
Yeah, the AI do jam on the brakes under blue flags sometimes. In a multiclass race, the faster-class AI also struggle sometimes to overtake in a straight line, usually needing to brake or let off the throttle behind the slower-class car.
Matthew Sibanyoni, the modder behind the Grand Touring Group 5 mod for AMS, has toyed around with various blue flag series file settings and has come up with well-optimized parameters to make them behave as well as they can. I'm currently away from my home PC, but when I'm back, I'll share them here (and remind me if I forget!).
However, I'm not aware of a fix for the straight line multiclass issue in AMS or its sister titles like rF1 and GTR2. As far as I know, Le Mans Ultimate is the first isiMotor-derived AI that pulls this off successfully (which is one reason I've been really enjoying that game – you can race the AI through traffic convincingly in a top class car!).
You may be right, morsify. I've heard people say that earlier AMS versions (1.3x, perhaps) had less of an issue with straight-line passing under multiclass or blue flags.
I've had those same problems with multi-class races.
I've also found that to be an issue when a race goes green after a full course yellow. The AI seem to think they will be given some kind of penalty if they don't let leaders by, and jam the brakes to "avoid" that penalty, even if you have penalties for blue flags turned off. This is especially annoying since (at least in oval racing) slow cars are allowed to race the leaders to remain on the lead lap (provided they are not already multiple laps down).
This problem seems to occur regardless of settings on double-file restarts.
...come to think of it, I'm not entirely certain the AI are actually able to receive penalties, which makes this behavior even more strange.
It could be related, in the release notes of V1.4.5 the say: Low aggression disables all new risk bypassing functions and effectively reverts to their pre v1.4.5 behavior with regards to overtaking
Actually as I'm typing, I just remembered another parameter - in the srs file you can alter the AI blue flag radius/courtesy/reactiontime/liftunderblue . Could this be used to improve it? (sorry if that is what you were referring to trying already, Simon Aguire).
You may be right, morsify. I've heard people say that earlier AMS versions (1.3x, perhaps) had less of an issue with straight-line passing under multiclass or blue flags.
I notice a similar thing, after one of the updates to the blue flags logic, the multiclass got worse. I also notice that the lap when they are going to pit they behave a little bit erratic: breaking unnecessarily, never overtake another car (even if they are in a good situation to do so).
I often end up using free practice to drive in multiclass; the "race aspects" are no longer there but the AI behavior is much better.
It could be related, in the release notes of V1.4.5 the say: Low aggression disables all new risk bypassing functions and effectively reverts to their pre v1.4.5 behavior with regards to overtaking
I also notice that the lap when they are going to pit they behave a little bit erratic: breaking unnecessarily, never overtake another car (even if they are in a good situation to do so).
Another update, because I like people to know I'm actually doing something. (...and plus I like to see what people think.)
DrivingLines - A Summary
Each track has a piece of code in the AIW file that reads "drivinglines". This can be set to either 1 or 2. Setting it to 1 causes the AI to race like the track is a road course. Setting it to 2 causes the AI to treat the track like an oval. On paper, that sounds like a no-brainer, and that it should always be set to 2 if you are running on an oval track.
When you have drivinglines set to 2, it changes several key AI behaviors. Changes I've noted include:
Increased AI aggression against other cars and players (they are more likely to bump opponents, sometimes even forcing them into a wall)
Decrease in the "minimum distance" they try to keep in-between each other (results in larger, tighter packs)
Decrease in AIRange effectiveness (...I'll get to that in a moment)
Increase in bravery when traveling a corner (they are less likely to brake, and if they do brake it tends to be sharper)
Decrease in lap time (average lap times will easily drop a full 1-2+ seconds depending on track length)
Some other stuff I'm probably forgetting...
This also allows them to handle full course yellows much more easily. They actually allow cars an easier time to pass to correct the order of the field, allow the lucky dog to pass on the straightaways, and can even do double-file restarts (...kind of. They're not very clever about it, especially in the corners). On top of this, if the field is in the wrong order, the cars will run at a quicker pace instead of crawling around the race track, which means the front of the field is far less likely to end up crashing into the tail.
This all sounds great, but unfortunately it comes with a serious problem.
The Wrath of Spaghetti Code
As already mentioned, cars are more likely to make contact with one another. This is great for stock cars... but for open wheel racing, not so much. (I've done most of my testing with CART, so will refer to open wheel racing by that name from here on out.) The AI try to race each other aggressively, which naturally results in parts and pieces flying everywhere, and cars becoming crippled by the time you exit the second turn, assuming the field makes it that far.
Now I could just manually set the drivingline back to 1 whenever I want to go racing in CART. After all, they don't use lucky dogs or double-file restarts, so I wouldn't need to change that, as that is all dictated by the SRS file.
But then comes AISpec, which makes a mess out of an easy solution.
AISpec is a range found in each AIW file that can be set from 0.00 - 1.00. (Or at least, I assume those are the inputs it accepts...) By default for most tracks (including in the JNS Trackpack), AISpec is set to 0.10.
AISpec is an interesting little tool. It basically helps determine what the minimum and maximum difference between the best and worst car is. Obviously there are other factors at play here, such as talent files, plr file, etc., but I've found the AISpec to be rather powerful. By increasing the AISpec number, you end up with a wider range of lap times, and this tends to be divided into what I shall describe as four major categories. The first is your top runners - usually only three or four cars that are completely dialed in, run the fastest laps, and are more or less in a league of their own. Without interference, one of these guys will most likely win the race. The second group is the well-prepared. They aren't as fast as the first group, but they still run quick lap times. This group is larger, though I haven't come up with a specific number as of yet. (Let's say 10 cars.) The third group is the best of the rest. They are just average, nothing special. This is usually the largest pack by far. The last group are the damn lapped cars. They sometimes run in small groups of two to five, but often run all by themselves. They are the first to get lapped, run the slowest times, and are generally just a nuisance to the leaders.
The AISpec determines how much of a tweak all these cars get. A larger number results in the top runners getting further away, and the damn lapped cars running more slowly. Now since you can set this on a track-by-track basis, you can customize how each track behaves - for example, you can set a low number for Talladega to ensure very close running, while at a technical track such as Darlington you can run a larger number to spread the field out. (The default AISpec at Darlington is actually 0.31.)
Why am I mentioning all this? Well that's because AISpec behaves very differently depending on how you having drivinglines set to. If you set it to 1, the adjustment made to the AI is much, MUCH larger.
An example we can use is Atlanta. This is one of a handful of tracks that does not have AISpec set to 0.10 by default, but instead it is set to 0.520.
When you set the drivinglines to 2, you have a fairly realistic spreading out of the field, with cars being spaced out similar to how they would in real life.
But when you have drivinglines set to 1, things get ugly. The front runners run absurdly fast. But the bigger issue lies with the damn lapped cars. They become extremely brake happy, and run ungodly slow lap times, to the point that even the best of the rest will catch them in as little as four laps. (Consider that your average lap time is about 30 seconds in a stock car, and you can see the problem...)
So this means that the AISpec has to be turned down, to something like 0.25. But when you have the dirivnglines set to 2, this causes all the cars to be so clumped together that it not only makes racing very difficult, but it also chews up RAM. (And I mean a LOT of it.)
Now what?
This of course begs the question on how this should be handled, because most people will not be willing to manually change the track files every time they want to change between stock cars and CART.
While I could in theory duplicate every track and give them separate names (i.e. "Atlanta Motor Speedway CART, Atlanta Motor Speedway NASCAR; Gateway CART, Gateway NASCAR, etc.), I don't have the patience to do something like that, and I also don't think it's worth the hard drive space. (These tracks may not be very heavy, but it adds up!) I also considered simply selecting drivinglines on a track-by-track basis, but that becomes a bit of problem when you consider that even in 1998 (which is the year the most popular CART mod is based upon) there were two tracks NASCAR and CART ran on in the same year (Michigan and Homestead). This also doesn't account for the tracks shared by NASCAR and Indycar in 2018 (the latter being another popular mod). (Phoenix, Indianapolis Oval, and Texas.) And this still doesn't cover other tracks the three series have historically shared at some point. (Dover, Atlanta, Charlotte, Kentucky, etc.)
So it appears that I shall have to upload two versions for people to download - one with CART settings, and one with stock car settings, and simply let each person decide which rule package they plan on using more.
On a different note, I'm still updating cameras. Some tracks I did a poor job on (in part because I barely knew what I was doing), so I'm going back and redoing those. I've also been working a bit less frequently on this mod - I used to do it six days a week, now it's a bit closer to two to four days a week.
I also am planning on releasing an update to the CART mod that works both with and without the turbopatch. I basically just dug up every oval track I could find and assigned a track configuration for each one, so now the AI will actually use the proper packages as each track. (No more road course setups at Michigan!)
AISpec is a range found in each AIW file that can be set from 0.00 - 1.00. (Or at least, I assume those are the inputs it accepts...) By default for most tracks (including in the JNS Trackpack), AISpec is set to 0.10.
Are you sure you're not confusing AISpec with AIRange?
AIRange is a number between 0 and 1.00, and it is this number that determines the spread of the AI lap times, not AISpec.
AISpec is a set of 4 numbers like this:
AISpec=(0.0000,0.0000,0.6000,0.0000)
Each of these 4 numbers can be set between 0 and 1 to limit, in this order, the AI acceleration, max speed, cornering speed or deceleration. Usually you don't want to limit these so they are set to zero, except the third number, which is cornering - it is sometimes (quite often) useful to limit this a little, if the AI are spinning off or crashing in corners. (If you look at any AIW in rFactor or AMS , you will often see this one is set to 0.7 or thereabouts).
Are you sure you're not confusing AISpec with AIRange?
AIRange is a number between 0 and 1.00, and it is this number that determines the spread of the AI lap times, not AISpec.
AISpec is a set of 4 numbers like this:
AISpec=(0.0000,0.0000,0.6000,0.0000)
Each of these 4 numbers can be set between 0 and 1 to limit, in this order, the AI acceleration, max speed, cornering speed or deceleration. Usually you don't want to limit these so they are set to zero, except the third number, which is cornering - it is sometimes (quite often) useful to limit this a little, if the AI are spinning off or crashing in corners. (If you look at any AIW in rFactor or AMS , you will often see this one is set to 0.7 or thereabouts).
Alright, so I want to prove I'm not talking out my ass and that I am actually making progress. so I booted up AMS and ran a couple of races.
First race shown is the one with all the original track files. Second race (starting at 1:24) is with updates to the AIW, CAM, and GBD file. Video shows the start of both races as well as the first four laps, seen through the trackside cameras and a bumper cam view as well.
(I apologize if the render quality is poor. It seems something may have gone wrong with the rendering, and I can't be bothered to do it again.)
There's additional information in the video's description if you want to learn more.
Are you sure you're not confusing AISpec with AIRange?
AIRange is a number between 0 and 1.00, and it is this number that determines the spread of the AI lap times, not AISpec.
AISpec is a set of 4 numbers like this:
AISpec=(0.0000,0.0000,0.6000,0.0000)
Each of these 4 numbers can be set between 0 and 1 to limit, in this order, the AI acceleration, max speed, cornering speed or deceleration. Usually you don't want to limit these so they are set to zero, except the third number, which is cornering - it is sometimes (quite often) useful to limit this a little, if the AI are spinning off or crashing in corners. (If you look at any AIW in rFactor or AMS , you will often see this one is set to 0.7 or thereabouts).
So it turns out I was mixing up AISpec with AIRange.
It turns out that most of the tracks had these settings set to "0,0,.95,0"... which as stated essentially meant most of the field would jam on the brakes in the middle of a corner, even if they could actually take it at speed. For whatever reason, when you set DrivingLines to 1, this problem is mostly masked. (...probably because it isn't triggered nearly as aggressively, although that is just a guess.)
Anyway, I made adjustments to a few tracks, and when you set it to more reasonable levels it allows for the AI to actually drive normally. Now I've been able to get all tracks to correctly use DrivingLines 2, which improves the racing, passing, and allows for things like the Lucky Dog/Free Pass and double-file restarts to work correctly. Oh, and cars can actually race at Daytona/Talladega without driving like they've all had a lobotomy, which is nice.
I've finished updating the cameras (...I think), so now I just have to do a LOT of testing to make sure everything is functioning correctly.
The trouble is that to make these checks, I need to do races a bit on the longer side, as the AI tend to react differently depending on how long a green flag run is going, how many cars are a lap down, etc.
Speaking of lapped cars, I decided to disable blue flags on all the JNS tracks. The reason behind is that when a race restarted and there were lapped cars running alongside, they would immediately jam on the brakes to let the lead lap cars by. Not only is this unusual behavior on the part of oval racing in America, but on top of that it would almost guarantee a crash. (I recall having one instance where nobody crashed into the lapped car, but because it came to a dead stop on the racing line the caution was brought back out!)
This project has become a huge pain, to the point that I'm actually taking a step away from it for a little while to try and regroup, as I managed to burn myself out despite taking steps to try and avoid doing just that.
I would not doubt that there is going to be all of like two people still playing this game by the time I FINALLY get this damn package shipped out...
I believe there would be more than two playing AMS. However, I'm concerned that you might be attempting something quite challenging. Various individuals have attempted this with the ISI engine since the days of NASCAR Thunder.
Just so you're aware, NASCAR Thunder 2004 was likely the game that came closest to perfecting circle track racing among all ISI engine games. Perhaps you could draw some inspiration from an AIW file from that game. They implemented both slow and fast paths effectively, but the AI still seem somewhat unexciting, almost as if they're on predetermined tracks.
I believe there would be more than two playing AMS. However, I'm concerned that you might be attempting something quite challenging. Various individuals have attempted this with the ISI engine since the days of NASCAR Thunder.
Just so you're aware, NASCAR Thunder 2004 was likely the game that came closest to perfecting circle track racing among all ISI engine games. Perhaps you could draw some inspiration from an AIW file from that game. They implemented both slow and fast paths effectively, but the AI still seem somewhat unexciting, almost as if they're on predetermined tracks.
I kind of wish I had known that NASCAR Thunder used the ISI system... I could have investigated that much earlier on.
But I feel like I've gotten to the point where the AI are "good enough". (Still need to do testing to cover any big problems... which I'm dreading.) I have no doubt that no matter what I do or how much time I devote to this there will be absolutely no possible way to perfect the AI. And even if I did perfect them with one set of cars and one style of racing, breaking out a different set of cars would almost certainly break stuff. It's a frustrating case of spaghetti code, poor documentation, and usage of a game engine that (as good as it is) is out of date.
I'd go so far as to say that you would be better off just making a new game from scratch, but it's been pretty clear that 'competence' in AI oval racing is wonky at the best of times. Ignoring NASCAR Thunder, the most recent AI package we had in any oval-racing game that I can think of off the top of my head that actually behaved similar to humans (including making mistakes, wreck avoidance, AND acknowledging that the player exists) would probably be NR2003.
Overall, we're just really overdue for a game that has decent oval AI, and unless iRacing can pull off a miracle with their current NASCAR project I don't think it'll be changing anytime soon. So I have to make do with what I got and deal with the fact it will be impossible to make anywhere near perfect.
...sorry about the rant. It's just genuinely frustrating that we've come so far in AI technology, yet getting AI to go around a race track competitively seems to keep going lower and lower on the priority list for game studios. Online is all well and good, but that comes with many limits...
I kind of wish I had known that NASCAR Thunder used the ISI system... I could have investigated that much earlier on.
But I feel like I've gotten to the point where the AI are "good enough". (Still need to do testing to cover any big problems... which I'm dreading.) I have no doubt that no matter what I do or how much time I devote to this there will be absolutely no possible way to perfect the AI. And even if I did perfect them with one set of cars and one style of racing, breaking out a different set of cars would almost certainly break stuff. It's a frustrating case of spaghetti code, poor documentation, and usage of a game engine that (as good as it is) is out of date.
I'd go so far as to say that you would be better off just making a new game from scratch, but it's been pretty clear that 'competence' in AI oval racing is wonky at the best of times. Ignoring NASCAR Thunder, the most recent AI package we had in any oval-racing game that I can think of off the top of my head that actually behaved similar to humans (including making mistakes, wreck avoidance, AND acknowledging that the player exists) would probably be NR2003.
Overall, we're just really overdue for a game that has decent oval AI, and unless iRacing can pull off a miracle with their current NASCAR project I don't think it'll be changing anytime soon. So I have to make do with what I got and deal with the fact it will be impossible to make anywhere near perfect.
...sorry about the rant. It's just genuinely frustrating that we've come so far in AI technology, yet getting AI to go around a race track competitively seems to keep going lower and lower on the priority list for game studios. Online is all well and good, but that comes with many limits...