0% found this document useful (0 votes)
746 views6 pages

Rfactor AIWCAM Editor Guide

1. This document provides tips for using the rFactor AIW Editor to create a track abstraction file that defines the main racing line, pit lane, and start locations for AI vehicles. 2. Key steps include recording the main racing path, creating the pit lane path and connecting it to the main path, finding corridors to define the drivable width at each waypoint, and marking starting grid locations either manually or automatically. 3. It is recommended to run rFactor in windowed mode for easier saving, and to create a temporary track surface if the starting position is below the real track, to allow moving the vehicle onto the proper track initially. Frequent saving is also advised as there is no undo function

Uploaded by

Raphael Eckert
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
746 views6 pages

Rfactor AIWCAM Editor Guide

1. This document provides tips for using the rFactor AIW Editor to create a track abstraction file that defines the main racing line, pit lane, and start locations for AI vehicles. 2. Key steps include recording the main racing path, creating the pit lane path and connecting it to the main path, finding corridors to define the drivable width at each waypoint, and marking starting grid locations either manually or automatically. 3. It is recommended to run rFactor in windowed mode for easier saving, and to create a temporary track surface if the starting position is below the real track, to allow moving the vehicle onto the proper track initially. Frequent saving is also advised as there is no undo function

Uploaded by

Raphael Eckert
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

rFactor AIW Editor Documentation, Tips and FAQs

ISI doc edited by Bill Pryor 5/26/06 - v.1

This is a first pass as improving the AIW Editor documentation released by ISI. If anyone has any
additions or corrections, please e-mail me at [email protected]. I make no warranties as to the
accuracy, nor take any responsibility if you mess up your AIW file because of my doc. Use at your
own risk. ;-)

First, make sure that the following contents of the AIW editor download are in the root folder for
your rFactor installation: rfactor AIW editor.exe, and the DEVFILES folder. You can put the AIW
Editor Docs folder anywhere that’s convenient.

Before you start:

- If the DEVFILES folder is not in the rFactor folder, the menus will not show up in the editor.
- rFactor v1.087 is recommended, but it appears to also work with 1.070.

Interface tips

Menu Navigation

When you select an option from the main menu it will change to a different menu. There is
typically a menu item to return to the previous menu, but when selecting and editing waypoints,
the menu changes automatically when you select a waypoint(s). To return to the previous menu
you must deselect all waypoints.

To select a menu option you can either type the number in front of it(if it is less than 10), or click
on the item you want with the mouse. The item will change from green to red when you can click.

Waypoint selection

To select a waypoint click and drag a selection rectangle around the waypoint(s) you want to edit.
They will change from green to red. To deselect, just drag around them again. Make sure if you
are in a view with waypoints in the background that you don’t accidentally select them too, both
when selecting and deselecting.

Moving waypoints and paths

All paths(most?) you create can be moved after creation. To do so, go to the “show/hide” menu
and show the path you want to edit. Make sure that is the only path showing. Select a waypoint(s)
nearest the path where you want to move it. Now you can move the path by pressing the arrow
keys(separate ones, not on the keypad) while holding the “SHIFT” key. If you hold the “ALT” key
at the same time it will allow for smaller increments for more accurate movement. Remember,
there’s no undo function, so either save a copy of the file before you start editing, or you will need
to go back and manually put the waypoints back where they were if you make a mistake.

Viewpoint

I have found that in most cases it is easiest to edit waypoints and paths in the swingman camera
view. To go into this view, press the Page Up key, then use the 7 and 9 key to zoom and the 8
and 2 key to change the viewing angle.

1. Getting the Editor Running: Start “rfactor AIW editor.exe” (It is recommended you run the
game in windowed mode, so that you can manually backup the AIW at various stages of
completion). As when you run the regular game, choose the car you want to use during editing,
and then select “Test Day”. The editor only works in Test Day. Now select the track you want to
edit and “Race”.

Note: It is recommended that you run the game in windowed mode so you can manually backup
the AIW at various stages of completion. The editor does not have an undo function. To run in
windowed mode(if you aren’t already), you will need to run “rF Config.exe” and click the
“windowed” checkbox.

2. Moving in the Editor: If an “.AIW” file does not exist for the track you are editing, your car will
be placed at wherever (0,0,0) is on the track. (See image1) Move onto the track using the CRT-
SHIFT-ARROW(not on the number pad) keys. Holding the “ALT” key will speed up the
movement. Clicking on the right and left arrow(4 and 6) on the number pad will rotate the car.
You can also drive onto the track if you are not “stuck” where you can’t drive. You can either
drive or move with the arrow keys anytime in the editor. Use whichever makes the most sense at
the time.

Notes: If you are too far above or below the track’s surface, then there is no way to move onto the
track. This usually means that your track was not built at the correct x,y,z coordinates and you will
need to move the complete track to 0,0,0 so the car will be on the track. Following is a trick that
was suggested by a user (Simracer on rscnet.org) to get on the track in this situation without
moving the track:

What I did was to create a temporary drivable surface just below 0,0,0
(call it temp_track.gmt, and make sure the material is Road or grass etc.), then tilt it
so it intersects the actual model’s surface somewhere.

This way the editor drops the car onto something solid, and you can then move the
car onto the proper track.

Add to the scene file:


Instance=temp_track
{
MeshFile=temp_track.gmt CollTarget=True HATTarget=True
}

3. Creating the Main Path: We’ll first record the main path (See image2). You can start
anywhere on the main track. Click on the menu option “record new path”. Try to drive as closely
as possible to the middle of the road. Do not try to drive the fastest path now, you will do that
later. Just record a nice smooth path as if you were a pace car during a formation lap. Once you
come back around to your start point, the recording will automatically end and connect your path
into a complete circuit. The menu options will now change and you will be given a choice as to
what this new path represents (See image3). Select "add new path as main".

4. Creating the Pit Lane: Next we define the pit lane. Drive around the track to the point where
you want the cars to pull off the main path for pitting (image4). Be sure to leave a large zone
before and after the main path to allow for enough distance to integrate one path to the other.
Select from the menu “record new path”. Drive pit lane as close to the way you'll want the AI to
drive. After you finish this path, select "Add new path and mark as 1st pit" (See image5).

5. Connecting Pit Lane to Main Path:

A. We must now connect the beginning and end of the pit path to the main path. Drive near
either end of the path, select the last waypoint on the pit path, and a waypoint on the main path,
at least as far apart as the distance between the waypoints on the main path. (See image6).
Selecting waypoints brings up a new menu. Select "Join as branch". (See image7)

B. Repeat step 5 for the other end of the pit path. (See image8 and image9)

6. Save your work: It's a good idea to save often. There is no undo function, so it is wise to keep
copies of the AIW files at various stages of completion.

7. Finding AI Corridors(boundaries): The first part of our track abstraction is complete, the
actual waypoints themselves. Now it's time to determine the width of the track at every waypoint.
Once Find Corridors is selected, the editor will automatically find the corridors. This will take a
while. (See image10).

HINT: What I did to make this process more accurate, and requiring less tweaking at the end, is
create a wall around the inside and outside of the track. I use ZModeler2 and this was a pretty
simple process. After doing this, add the entries for the walls in your SCN file. You’ll only need
them up for this step. Obviously you’ll need to quit and re-enter the editor using the modified SCN
file, so make sure you’ve saved and backed up your AIW file.

Use the Show/Hide Menu to show corridors (See image11) You can also find corridors on
individual waypoints in case you change some local geometry and in this way you don't have to
recalculate the whole track. It may be necessary to manipulate corridors waypoint by waypoint.
(See image12) As long as corridors are being shown, you may select waypoints and move the
corridors with the SHIFT key and the arrows. Use left and right arrow keys to move the right
corridor in and out, and up and down arrow keys to move the left corridor in and out. You can
select and edit multiple waypoints at a time, or you can select a series of waypoints and chose
the "normalize Blocks" option, which moves all the corridors inward to make a smooth transition
from the 2 waypoints not selected on either end. (See image13) Remember that these corridors
represent the allowable surface racers are allowed to drive on for a particular segment of the
track; if a driver should never race on a particular part of the surface, move the corridors in to
prevent the AI from using that part of the track. (See image14)

8. Marking starting locations (grid, pit, garage and alternative starting grid): (See image15)
The alternative starting grid is optional and in most cases not used, but can be used when you
want the cars to start in another place for rolling starts. When marking these special locations, it's
often helpful to be showing the current locations from the Show/Hide menu.

A. Mark grid locations. There are two ways you can do this.

1) You can mark each and every point by hand. (See image16) In this way you can
exactly match up the positions to whatever graphical representation is visible.

2) You can choose to automatically set all the grid positions based on the position of the
first two spots. To activate this, go to the "unsupported/test" options (See image17).
From there select "Auto grid Gen Off" (See image18) until it sets the auto generator
to the path you want the locations to follow. (See image19) Now when you set the
first two spots, all the rest of the starting grid will be created following the fastest line.
(See image20)

IMPORTANT NOTE: Before your track is ready for public distribution, you must
save your waypoint path by leaving the game (out to the main menu, NOT the track
monitor), and then re-enter your track. Upon re-entering the track, the program will
generate waypoints for pit locations and start locations that the AI will use. Once
you are back in real-time, save one last time so that the program doesn't need to
generate these waypoints every time someone enters the game.
9. Mark Pit Locations: Go to the “show/hide menu” and select “show pit spots”. (See image21)
Basically follow the same procedure as the starting grid, but set the pit spots in their correct
locations. There is no option to auto generate. See IMPORTANT NOTE above.

10. Mark Garage Locations: (See image22) To add Garage locations move your car to the first
garage location, select “show garage spots” from the “show/hide” menu, then from the “set
grid/pit/garage locations” menu choose “Add Garage Location”, then choose “record pit 1 garage
1 (empty)”, and then “empty” will change to “done”. You can record up to three garage locations
for each pit stall, but only two are required.

Note: If a Garage location says “done” instead of “empty”, you can reset them by overwriting
them. It will say “Done!!!”.

Note: If the track doesn't have a garage, simply put all the garage locations for a given pit stall in
the pit stall.

11. Mark AUX Locations: Auxiliary locations are used to place the pace car. Position 1 is on
the main track (for formation laps) and position 2 is in the pits. Drive, or move, to the location you
want for position one and select “Set grid/pit/garage locations”, then “Add AUX location”, then
“Record AUX loc 1 (empty)”. “Empty” should change to “done”. Now move to the location that you
want the car in the pits and repeat the steps above, except chose “Record AUX loc 2 (empty)”.

Note: Make sure and put the car in the pits in a place where it’s not in the path of the cars leaving
the garage area or they’ll run into it.

12. Mark Special Slow Down Spot: We need to specifically mark the first waypoint before the
XPITIN object so that AIs know to decelerate to the pit lane speed *before* they cross that line.
Select the waypoint before XPITIN, and then select the "special slowdown" option from the menu.
(See image23)

Note: The waypoint should be on the pit lane, and NOT a point on the main path before the pit
exit. Also, there is no visual feedback that the slowdown has been marked, nor anyway to unmark
it…except possibly under the “unsupported/test options” / “reset special waypoints”…but I have
not confirmed this and I have no idea what other “special waypoints” are reset. If you need to
change its location without starting your AIW file from scratch, open the aiw file(make sure you’ve
quit out of the editor) in a text editor and search for the line “wp_wpse=(1,15529628) “. (I do
not know if the second number changes, but it is also the only “wp_wpse” entry with a “1”. All the
others are set to (0,0), but I’m sure this could change in time.) Now change the numbers to (0,0)
and save the file. Restart the AIW Editor and now you can set the slow down waypoint again.

13. Driving Lines: We need to define various lines around the track that our AI will attempt to
follow as closely as possible. The easiest and most common method is to drive the path yourself.
The editor will keep track of your best time, and update your driving line every time you best it.
Even so it is often necessary to "smooth" out the line and optimize it. The Editor has a built in
smooth function that is somewhat accurate over short distances.(See image24 and image25).
The Smoothing function will work on whatever line you are currently showing (either fastest or
inside/left line). As a last resort you may move the line at individual waypoints with Shift + the left
are right arrow keys. For minute movements use Shift+Alt+ the left or right arrow keys. It is
useful to show the "Speed Text" from the show/hide menu. (See image26) This shows you an
extremely rough speed in MPH that a car can take a given point. It is not very accurate (and
slopes and banks make it even less so), but it is a good guide to show you trouble spots.

A. Drive the Fast Path. This is the path the AI will try to take as they race around the track. Put
your car on the track and select “record fast path” from the main menu. Every time you complete
a lap with a better time, the previous fastest path will be replaced with the path you just drove.
You can reset the path at anytime. This is the most important step, and probably the one that you
will spend the most amount of time on. A great fastest path is essential for competitive and
realistic AI behavior.

Note: Although ISI suggests driving a fast lap over and over to get a good line, I have found that
driving a medium speed smooth line produces the best AI fast line. The speed you drive the path
has nothing to do with the speed the AI will follow it at. The smoother the line the faster the AI will
go.

B. Drive the Left Path. This is a path that the left car in a formation lap will take. You need to
leave enough room to the right of the car all the way around the track for another car to drive
beside you. (See image27) The Left path must always be done after the fastest path. Put your
car on the left side of the track, then select “record left path”. Drive the left path. Once the left
path is done, you may re-drive the fastest path and not affect the left path.

14. Mark Teleport Spot:

Select the waypoint you want to be the teleport spot. I used grid position “1”. Select Mark as
Teleport Spot from the menu. The rest of the teleport locations will be created after saving the
AIW file and leaving the editor as explained in the IMPORTANT NOTE below.

IMPORTANT NOTE: The actual locations will not be generated until you leave the track
(out to the main menu, NOT the monitor) and reload the track. Once you reload the track,
the teleport locations will be created and you must save the AIW file again.

Note: If you must move the teleport locations, you must manually delete the teleport locations out
of the AIW file using a text editor. From the top of the file search for "[TELEPORT]". Delete all
the text between the TELEPORT header and the next header. Save the file and re-enter the
editor. The teleport locations will be automatically generated next time you enter real-time.

15. FAQ

Q. What if I want the cars to start in another location for rolling starts?

A. You need to add this line to the track .GDB file: "RollingStartLoc=1" (See OrchardLake
road course for example.) This tells the game that our starting position for the rolling starts will be
in the pit (at the Alt Starting locations).

Q. What are “cut corridors”?

A. The cut corridors tell the game when someone cuts the track so they can be penalized.
These corridors are defined when you run the “find corridors” option. You can show them by
selecting “show cut corridors” in the “show/hide menu”. You can edit them by selecting the
waypoint(s) and using the shift-arrow keys to change them.

Q. What is “Simulate Fuel Usage” in the unsupported options menu?

A. This option will establish a value in the AIW file that will affect how fast cars use fuel. They
suggest selecting this option while running the ZRZ car. I have no idea how long or how fast
you’re supposed to run the car to establish a good value. I have found that simply copying the
value for “FuelUse” out of an ISI track(such as Tobin) is a good shortcut. This will establish a
starting point, which you are going to have to tweak anyway.

IMPORTANT NOTE: The default value ISI puts in the FuelUsevariable is “0”. Don’t leave it this
way. You must have a “good” value for “FuelUse” in the AIW file, or the cars will run out of gas in
one lap(very confusing if you don’t know why).

Q. What is “delete all waypoints” in the unsupported options menu?

A. This will delete all your path waypoints and allow you to start over again. It does not affect the
pit or garage positions. I’m not sure about grid positions.

Q. What do I do if there’s a jog in the fast or left path?

A. Select a couple of waypoints on either side of the jog and select “normalize curve” from the
waypoints menu. It should smooth the lines out.

Q. What do I do if the AI cars fly off of a corner and don’t follow the fast path?

A. The best way I’ve found that works is to move a waypoint near where they go off the track.
This will cause them to slow down a little at that point and should keep them on the path. To
move a path, show only the path you want to edit, select the waypoint(s) where you want the path
altered, then hold the SHIFT key and press the arrow keys. Hold down ALT at the same time to
move in smaller increments.

Q. What do I do if my AI drivers slow down when they shouldn’t?

A. View your fast path in the editor and look for rough spots. Smooth them out. The smoother the
curves in the fast path, the faster the AI will go.

Q. Why won’t my lap times counter work, or why don’t the laps count, or the sector times
work?

A. Do you have your XPITIN, XPITOUT, XFINISH, XSECTOR1 and XSECTOR2 objects placed
and oriented correctly? Make sure their surfaces are oriented in the correct direction and intersect
the track. Make sure entries are correct for them in the SCN file.

Q. How do you calculate the distance for each of the sectors and the total
length of the track?

A. When you create your main path these numbers are automatically calculated for
you and entered in the AIW file. The XFINISH, XSECTOR1 and XSECTOR2 objects
must be in place and oriented correctly for this to work.

Q. The overall lap is the distance in meters, correct?

A. Yes.

You might also like