AIW editing for mod tracks in AMS: how?

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?
 
Alright, having done all the JNS tracks (bar Talladega, which I'm dreading...), I figured it was time to share all the stuff I've learned.

Alright, almost every track has two grooves - a left one, and a right one. The right one on an oval is treated as off-line, whereas the left one is the racing line.
Because of this, pit road also has two lines - again, one left, and one right.
For some reason, every single track had both the pit lines on top of each other, meaning all the AI crammed into one lane, regardless how wide the pits actually were. So I spaced them out so that there are now two lines on all tracks. The AI treat these lanes strangely. They treat the left one as the "in" lane, using it if they have not yet had service. The right lane is the "fast" lane, and is where things get strange. If they enter side-by-side, the AI will use the fast lane when needed, but will also just come to a dead stop instead of missing their pit stall. Stranger still is that they don't always use the fast lane when exiting the pits, regardless if it would be wise. More than a few times I've seen them prefer to sit in a line rather than use the fast line, yet all the same traffic seems to be a lot worse if you have the lanes merged together as one.


Speaking of merging, when they enter the pits, there are going to be two lines that allow them to do so. One is on the left (racing line), the other on the right. By default, the right lane would immediately jump to the left and copycat all the way to the other side.
pir-1.PNG

Default pit entrance for Phoenix (on the right side)

I didn't want the AI to swerve like maniacs, so I decided to give each lane the ability to go to the pits. This has the added bonus of allowing cars to enter the pits side-by-side.
pir-2.PNG

Modified pit entrance to Phoenix, along with the modified pit road lanes

There was an unexpected consequence to this. For whatever reason, the AI does not seem very coordinated on some tracks. If a car is off-line and decides "PIT NOW", it will follow the outside pit entry line, as expected. They will account for traffic, slowing down drastically if the need arises. The first problem is that they will only slow down so much, before deciding to commit and cutting in front of cars - they seem incapable of aborting a pit stop. The bigger problem is that cars on the racing line do not always respect this, and it seems to be entirely based on the tracks rather than the drivers. The driver on the racing line will completely ignore the car trying to pit, and can inevitably crash or spin out the car trying to pit. This almost always causes the pitting car to be spun back out onto the live racetrack, potentially in harms way.

But it gets weirder. The pitting car will insist it has made it to pit road (even if it is on the track), and will beeline for it. This is mostly fine if there is no pit wall (assuming they don't take out any oncoming cars), but if there is a pit wall, the AI will decide that the most reasonable course of action is to slowly grind along the wall, wheels completely locked to the left. Once they are adjacent to their pit stall, the car will automatically teleport to its stall, receive service...and then promptly retire the race. (The game cites it as a "DNF".)

I might add this entire process does not trigger a full course yellow, unless the pitting car causes another car that is not actively pitting to crash or spin.


One final note about pit road behavior is that the AI don't always seem to fully understand how pitting should work. On some tracks, they will pit as you expect, with cars trickling in over the course of a three to seven lap interval (depending on track size and fuel consumption.) The weird thing is that this does not always seem to work as intended. On some tracks, you'll end up with the entire damn field pitting on the same lap. This seems especially common on tracks under a mile in length, though it does not seem exclusive to this.

I'm not sure why, but on some tracks the AI are obsessed with trying to destroy the wall exiting a corner. This seems to happen most often exiting the second corner (regardless of track) on the initial start, but it can go on for multiple laps. While they are smart enough to avoid the wall when running alone, when side by side the car on the left will act like there is no car on the right, forcing the latter into the wall. The really strange part is that there are some tracks where no matter how I modify the racing line, the AI will continue to do this.


Speaking of concrete, JNS did a number on some these conversions. For example, the entire outside wall at Nashville does not appear to have correct collisions. If a car hits the wall, they will be sucked in, then quickly spat back out over the course of under a second. This can cause a crash. (Or, in the case of VHR's NASCAR Trucks Mod, it can result in flight.)

Michigan also seems to have this problem, though only exiting turn two, so I simply modified the collision detection to minimize the odds of this occurring.

Nobody is perfect. I know for a fact I am not perfect.

But looking through these files, you start to question what was JNS smoking?

Let's start with the most obvious problem - pit roads. My god, did they make some weird choices. For example, virtually every racetrack has cars exiting pit road stay on the apron (off track) until they reach the backstretch, where they can then merge back onto the track. Yet most (but not all) of the track have AI merging in the middle of turn one, often on rather steep transitions between the flat apron and the banked surface.

Then you got tracks like Indianapolis Motor Speedway, where you're supposed to use the inside lane until it merges naturally on the backstretch. Yet JNS decided to just have you merge in the middle of the short chute between turns one and two.
imspit.PNG

The white line is the path you would take IRL, whereas the red one is the path the game has the AI take when exiting the pits.

Gateway is an even bigger mess. Instead of using the access road that begins entering turn three, JNS decided to have you instead use the a strip of tarmac that is meant to be used only by the pace car. This means entering the pits is both awkward and dangerous and I struggled to get the AI to consistently enter the pits without crashing. (...and even that isn't a promise.)

gatewaypit.PNG

The green line is the one you take IRL. The red one is the path the game has the AI take.

Nazareth has a similar problem to Gateway, except the strip of tarmac is not only much smaller, but it's on the very inside of a corner that is not easy to reach at speed. I've found that to be an unsolvable mess that I can only try my best to overcome.

Now you could argue that they wanted to reduce the amount of pit nodes, but that makes me ask what the hell was going on with ORP.

orp.PNG

Pit entry on ORP starts all the way at the exit of turn two, all the way down the backstretch, before finally entering the pits at turn three.
orpirl.PNG

ORP as it appears IRL, showing where you actually enter pit road in turn three...


And then you have what I like to call "trampoline curbs", quite possibly the biggest sin this entire track pack has to offer. These are found on a few tracks - in this case, I will discuss Pocono. For whatever reason, the curbs on the inside of the track lack any sort of collisions. This means your car will fall through them. Now of course it isn't actually wide enough to completely swallow a car (...as far as I've been able to find), but it can cause all sorts of carnage, especially with the AI. What I really don't understand is that while these curbs are present in turns one and three, turn two actually has proper collisions with the curbs, which means you can bounce off that one as much as you like.

I basically had to modify the AIW in a manner that makes the AI assume there is a wall there so that they avoid going too low.

poconot1.PNG

Turn one at Pocono. The pink line is collision detection, which will tell the AI there is a wall there. The pink line merges with the edge of the AI track width (the red lines), making the AI assume that the going beyond the track width will result in them hitting a wall. Note that as they exit the corner the pink line "jumps away" from the track.

It amazes me that this made it past quality control... which suggests to me there was no quality control, at least on these tracks.

Cameras are surprisingly easy to manage. When you click on the big red box that says "CAMERA NAME", the program loads up the CAM file, allowing you to see the positions of all the cameras, there activation range, field of view, and so on.

iowacameras.PNG

Cameras found on Iowa. The bright blue lines indicate cameras that physically move as they follow a car - think of a camera strapped to a zipline.

The are easy to modify, with the only real headache being that you can't physically gauge the Y-axis (height) of the camera, meaning you need to do trial and error.

That said, a large portion of the tracks (about 2/3) have a glitch where the listener positions on all the cameras are set to "-3.402823e+038, -3.402823e+038, -3.402823e+038" - essentially at the center of the track. The listener positions determine where the "microphone" of the camera is, so the fact that all the cameras have their microphone in the center of the track means the audio is always extremely distant. This is a problem I do plan on fixing, but it is sad that nobody noticed this. (...although to be fair, I didn't even notice myself, and I found the problem completely by accident.)

Oh, and Iowa is one of the few tracks where effort seems to have been made with the camera work. Most of the tracks have very few cameras in relation to the track size. (Rockingham has eight, Daytona has six... I70 only has three!!)

TL;DR: The program is handy, but there are some things I still need to fix, and even more things that need I know for a fact I am unable to fix.



(PS: This probably took me a solid 90 minutes or so to write, as well as fetch all the images. Hope this will help someone in some way, or at least explain the madness that I'm working with!)
 
Last edited:
It has been a few months since I used my windows 7 computer on steam I stay in offline mode. Maybe a steam update recently broke compatability? I don't know....I sent you a message with a fix though. Don't want to get in trouble here on RD.

Yes even in offline mode it still prompted me to go online to update, and refused to let me start it. :(
But thanks a lot for your message, I have replied! :thumbsup:
 
Last edited:
Alright, I got a new question that's been driving me nuts.
Camera flags.

Now just to make sure we are all on the same page, here's an image to show what I'm talking about:
camflag.PNG

The editor has two fields for you to fill out flags. The weird thing is that there are two in the first place. From the research I've been able to come across, I've determined the following settings exist:

flags1
  • 1 = zoom
    • This allows the camera to zoom in and out based on where the car is. It will zoom out when the car gets close, and zoom in when the car is a certain distance away. (I have no idea how to edit any of the parameters regarding the zoom amount, but I'm honestly fine with whatever the default settings are)
  • 2 = allow camera movement
    • I previously said that you can have cameras set up to physically move, as though they are attached to a zipline. Adding this flag allows the camera to move, as without it the camera will stay in its current position.
  • 4 = allow shaking
    • This enables the "Shake Rate" and "Shake Mag." fields to be enabled. What this does is that it allows the camera to physically shake when a car gets near it. I have not determined exact thresholds, but I believe Shake Rate indicates how frequently the effect can be triggered, and Shake Mag is how much the camera can physically shake. I think these numbers are 0-100, but I haven't experimented with going beyond those numbers.
  • If you want a camera with multiple effects, you just add them together. For example, if you want to enable both zooming and shaking, then you add the two flag numbers together (1 + 4) and put in the number 5.
...now this is where I have questions.

There doesn't seem to be any information regarding what other possible effects there are, and I can't find any information regarding what flags2 can even do. (When you hover over it in the editor, it literally just says "flags2 ???").

I have made multiple search attempts to find something, but have had no luck.

I did read on a separate forum that if you put "32" into "flag1", it will cause that camera to only operate when the vehicle is in the pit lane, but I have had no success with getting it to work. (The forum was regarding RaceRoom, so perhaps it's a function exclusive to that game?)
I am almost certain that there are more undocumented flags, but I am struggling to find a proper way to experiment and get conclusive results.

TL;DR:
What other flags are there? And what is "flags2" even used for?
 

Latest News

Are you buying car setups?

  • Yes

  • No


Results are only viewable after voting.
Back
Top