To help map AIW concepts to the file properties, here is an example waypoint:
wp_pos=(-361.7040,-22.4721,1872.8100) // ID=0 n/a
wp_perp=(0.8377,0.0002,0.5461)
wp_normal=(0.0103,0.9998,-0.0161)
wp_pathinfo2=(0,-2.9197,0.0252,51.4918)
wp_oriantation=(0,0.0205,2.5667,-0.0064)
wp_pathflags=(0,0)
wp_pathinfo2=(1,-4.6128,0.0266,51.1414)
wp_oriantation=(1,0.0213,2.5762,0.0026)
wp_pathflags=(1,0)
wp_pathinfo2=(2,3.2704,0.0142,52.9063)
wp_oriantation=(2,0.0184,2.5675,0.0011)
wp_pathflags=(2,0)
wp_pathinfo2=(3,3.0399,0.0139,52.7473)
wp_oriantation=(3,0.0183,2.5760,0.0026)
wp_pathflags=(3,0)
wp_width=(8.575,6.900,11.000,9.852) // road left, road right, far left, far right
wp_dwidth=(11.000,9.852,0.000,0.000) // collision left, collision right, cut left, cut right
wp_lockedAlpha=(0)
wp_test_speed=(51.49182)
wp_reverb=(0)
wp_score=(100.049)
wp_wpse=(0,0)
wp_branchID=(0)
wp_bitfields=(0)
wp_pitlane=(1)
WP_PTRS=(1446,1,1602,0) // ID=0
I will not go into all of the properties and there are probably track builders who know the details more than I do. The first three properties (wp_pos, wp_perp and wp_normal) define the waypoint coordinate. There are three corridors defined in the AIW and they are important. Corridors are defined in wp_width and wp_dwidth. I treat far left, far right and collision left, collision right as the same thing, not sure if there is some difference.
- corridor
- collision corridor
- cut corridor
There names really define what they are. The 'corridor' is the width of the raceable track from the waypoint. Note that the corridor extends left and right from the waypoint based on the orientation, so orientation matters. The 'collision corridor' is the absolute limit of the track that the AI MUST avoid to prevent having a collision. The 'cut corridor' defines the limit the AI can cut the angle of the corner. When you modify AIW, corridors are the mechanism you use to tell the AI to choose proper entry into a corner etc. For example, you come down a straight and the cars HAVE to get single file for a corner, the corridor will tell the AI to do that and avoid a mess in the corner. The corridor and cut corridor can be modified in the MODDEV launch of rfactor. I did not find a mechanism to modify collision corridors so I wrote a tool for that.
The properties wp_pathinfo2, wp_orientation and wp_pathflags define each line at each waypoint location. The first value is the line number (0, 1, 2 ...) which map to (FASTEST, LEFT, RIGHT ...). These properties can be modified in MODDEV launch of rfactor. The line can be moved left and right and the orientation can also be adjusted (the way the car is pointed when running that line and reaching that waypoint). There is also a property that will set a speed adjustment for the line.
wp_pathrecrad=(0,-0.0251)
This property is very powerful as it can adjust the AI speed to make more sense when it hits a line that bends too much and thereby becomes jagged to the AI. I have seen a lot of cases where the AI is much slower than they need to be through a corner. The first value is 0 for a speed adjustment. The second value is the speed adjustment where a negative value makes the AI go faster than the computed speed. Note that these values are also set in MODDEV launch of rfactor.