Experimental oncoming traffic for RACER tracks
============================================================
Script created by Oliver Pieper, pieper@viaregio.de 2005-05-13
This add-on uses:
- a reversed spline.ini (to allow the ai cars to drive in the opposite direction of the player's car)
- a special.ini with 14 additional grid positions (fake, since the grid positions are all in the same place, you need to use the option random_scenario=1 in racer.ini!)
- a template ai file (duplicate this ai file and rename it to the folder name of the car(s) you want to use as ai cars).

The reverse_splines.py Python script reads the file 'spline.ini' in the current track directory and writes the reversed splines as 'spline.rev.ini'. 
The script expects a "well-formed" spline.ini, like the ones written by Racer's tracked.
The script was written and tested under Python 2.4 and 2.2.3 on Windows. Minor changes might be necessary to get it to run on a different OS or Python version.



Instructions by Bob Hojaboom, hojaboom@oregontrail.net  -  May 20, 2005

Get Python ver. 2.2.3 or 2.5.1 from www.python.org and install it in a folder named "PYTHON22" or "PYTON25".  Version 2.2.3 is recommended as version 2.5.1 requires MS msi installer.
Put a path statement in your autoexec.bat file as shown below (substitute PYTON25 if that's the version you installed:
set PYTHONPATH=C:\PYTHON22;C:\PYTHON22\DLLs;C:\PYTHON22\Lib;C:\PYTHON22\Lib\\lib-tk

Duplicate (copy) the desired track folder in the "tracks" folder and rename it "trackname_traffic" and in track.ini to indicate the track has traffic so you can find it on the menu and put everything back the way it was when you started

Copy "_make_traffic" folder to the desired track folder.

Files needed in this folder after copying:
original special.ini (copied from track folder)
original spline.ini (copied from track folder)
reverse_splines.py (should be there)
special.ini (make like shown below)
spline.ini (made from spline.rev.ini taken from the track folder)
traffic_instructions.txt (this file)

Make an "ai" folder in  the "_make_traffic" folder

Make a copy of spline.ini and special.ini and put in _make_traffic folder, rename to original special.ini and original spline.ini to keep for backup.

Make a special.ini with up to 14 additional grid positions, (these are fake positions, since the position numbers are all in the same place), by copying the original special.ini to this folder and duplicating the last grid position 14 times, renumbering each and don't forget to change the count to number of last position plus 1 (count=n+1).  Add ; fake to each added position.

Copy the python script, "reverse_splines.py", to the trackname_traffic folder and double click it .  
It generates the spline.rev.ini file in the trackname_traffic folder.
Move spline.rev.ini file into the "_make_traffic folder" and rename to spline.ini.

Make template.ini with wordpad by copying a reasonable ai.ini file from the track ai folder to this folder and replacing all the u_racingline=n.nnnn with u_racingline=0.75, rename it template.ini. OR Make an ai run with a car staying on the right side of the road at reasonable speed and name it template.ini. OR you can just use an ai file as is but it can cause chaos with cars crashing everywhere.

Copy special.ini and spline.ini to the trackname_traffic folder replacing the ones there.  
Copy template.ini to your tracks ai folder and rename as the car you want to go in reverse direction.  
Set random_scenario=1 in racer.ini file, it's at the top.

Run RACER and watch out for traffic!
don't hit shift-A unless you want the car you are driving to try to go in reverse direction.

NOTE:  Files in original _make_traffic folder:
reverse_splines.py
traffic_instructions.txt (this file)