The GPxTrack extension consists of track related features, the main one being a track manager.
The track manager handles the use of custom tracks and swapped default tracks within the game.
It allows a track to be used from any slot without any side effects of that particular slot.
Further it tells the game to use the tracks specified in a user supplied configuration file instead of the default ones.
They don't need to be named f1ctxx.dat (or s1ctxx.dat) or located within the circuits
directory. The maximum number of tracks is still 16 for GP3 and 17 for GP3-2000 and GP4.
Sometimes you just want to change the order of the default tracks.
This case is also handled by the track manager. In GP4, when a default .dat file is detected in a different slot,
the .wad file from the original slot will be loaded, as well as the .gpi (menu track map), loading screen .bmp image,
and track marks files. Additional settings from s1ctXX.ini files will also be handled.
See below for information for creators of custom tracks on how to prepare a track to be used with GPxTrack.
GPxTrack extends certain limits that custom track makers can run into. Tracks using parameters beyond the standard limits
require GPxTrack to work properly.
Track .dat file size
This maximum track file size is 140kB for GP3 and 200kB for GP3-2000 and GP4. GPxTrack extends it to 500kB for all.
The default maximum track length is about 8km. GPxTrack can extend this to 20km. It's not extended by default, but can be
enabled through the user interface. The 2.5km square limit of the track layout cannot be extended though.
Number of race laps
The default maximum number of race laps is about 99. It's possible to specify upto 127 laps, but certain behavior will be undefined then.
With GPxTrack, this limit is extended to 253. This allows for a proper race distance on short tracks, but also to run endurance races on
longer tracks. In theory, on a 20km track with 253 laps, and an average speed of 210kph, the race duration can be 24 hours.
The maximum number of sceneries is extended from 128 to 255.
The maximum number of kerb profiles is extended from 32 to 256.
The maximum jip length is extended from 999 to 16384.
The following options are available for GPxTrack:
- Catch menu strings. Show any detected custom track name, country,
country adjective, year, length and lap records in the game's menu's.
The country adjectives are located in the adjectiv.ini file
made by Victor Gars. If an adjective string is the same as the country string,
then it will be patched as a postfix string, as in "Grand Prix of Holland",
else it will be patched as a prefix string, as in "Dutch Grand Prix".
Note that postfix strings are only supported in GP3.
- Catch records. Show lap records in the menu's.
This will overwrite previous records driven on tracks in the same slot!
- Track set. Specifies the name of the configuration file that
contains the paths of all tracks. These paths are shown at the bottom
of the tab. If the file does not exist, the standard track will be used.
Use the "Edit" button to edit the specified file.
A dialog will be shown in which you can select all tracks you want to use.
If the track set is within the gpxpdata directory (this is the case by default),
the track files will be relative to the main GPx directory.
If the track set is outside the gpxpdata directory, then the track files will be
relative to the track set file itself. The latter allows installation independent
track sets to be distributed along with the actual tracks (track packs).
- Max. track length. If you use a custom track beyond the standard track length limit
of around 8 km (1650 segments), extend the maximum length to 10 km (2048 segments) or 20 km (4096 segments).
These lengths include the pit lane. This is still an experimental feature,
so use the smallest value needed for the selected tracks (8 km is the unpatched maximum length).
- Max. race laps. Extend the maximum number of laps in a 100% race to 125 or 253 laps.
This is still an experimental feature, so use the smallest value needed for the selected tracks (99 laps is the unpatched maximum length).
Below is information for track creators.
All files can be placed inside one directory (the directory name is not important).
It's best to give all the files the same name, namely "<prefix>.<extension>".
Most extensions are unique. File names with the same extensions will be differentiated using an extra prefix or postfix in the file name.
The prefix is normally the name of the .wad file (GP4 only), and most importantly it's also present within this .wad file for several file names.
GPxTrack tries to support old custom tracks without modification. It also tries to work together with CSM.
To achieve this, the <prefix> will be determined in the following way (first one has highest priority):
- If the prefix is already patched in GP4.EXE (CSM/TSM does this), use it.
- Find the .wad file specified by the "Wad" tag/setting in the .ini file. If found, this file will be used as the actual track .wad file, and its name is used as the prefix.
- Use the value of the "prefix" tag (see below).
- Find a unique .wad file in the same directory as the .dat file. If found, this file will be used as the actual track .wad file, and its name is used as the prefix.
- Use the default prefix for that slot as defined by GP4, e.g. 'melborne2001' for slot 1.
In the second step above, the .ini file is to be found in the same directory as the .dat file. If there's only one .ini file, its name is not considered.
In case there are multiple .ini files, the one named after the track will be chosen.
The track name is the .wad file name (i.e. <prefix>) if it has not been patched by CSM/TSM and a unique .wad file can be found in the same directory as the .dat file.
Else the track name is the .dat file name. Here, 'file name' does not include the extension.
The track name is also used for the other custom track files when their extension is not unique.
Below, the track name will be referred to as <trackname>.
Since GPxPatch 4.00, the GP3INFO/GP4INFO section within the .dat file is replaced with [Tags] section in a .ini file,
but it is still being parsed for backward compatibility reasons. For compatibility with TSM, a [Settings] section is also parsed.
Specifically, each custom track that is specified to be used in the game is parsed for extra track specific information.
These are tag/value pairs, and are specified in a .ini file under a [Tags] section (in the same directory, preferably named "<trackname>.ini").
Missing tags will be read from a GP3INFO/GP4INFO section within the .dat file,
GPxTrack will try to parse information like: name, country, year, length,
total number of race laps, and split time segment positions.
If found, it will always patch the number of laps and the split segment
positions into the game. The other values are optionally shown in the menu's.
Here's a complete list of tags:
- name: the name of the track that will be shown in the menu's.
- country: the country in which the track is located, shown in the menu's.
- adjective: the country adjective, shown in the menu's.
- event: name of an event, if applicable (not used).
- year: the year on which the track layout is based.
- laps: total number of race laps.
- lengthmeters: length of the track in meters.
- split1: segment number at which the first split time must be taken (default at 33%).
- split2: segment number at which the second split time must be taken (default at 66%).
- slot: preferred slot (not used).
- desc: description of the track (used for GP4 in the track info menu).
- laprecord: race lap record (see below for format).
- laprecordqualify: qualify lap record (see below for format).
- author: the name of the author of the track
- created: the year or date when the track was built.
- prefix: specifies the name of the .wad file (and names of files within the .wad file).
- wad (.ini file only): specifies the (relative) path of the .wad file.
- gpi (.ini file only): specifies the (relative) path of the .gpi file.
- loadingscreen (.ini file only): specifies the (relative) path of the loading screen image file (.bmp).
GPxTrack will try to parse the following format for the laprecord and laprecordqualify tags:
m:ss.ttt, driver, team, dd-mm-yyyy
1:31.481, Rubens Barrichello, Ferrari, 12-03-2000
Standard .ini files
The GPxPatch installation includes .ini files for all standard tracks. These are located in gpxpdata\track\, in a subdirectory for each GPx version.
These files can be used as a base for custom tracks, or for standard tracks that are used in a different slot than their original slot.
This is especially handy for GP4, where the .ini file contains much more settings than just the tags. All those settings are normally hardcoded to a slot number,
but can now be slot independent by including an .ini file with the .dat file. Simply copy the right .ini file from gpxpdata\track directory to the circuits directory
or whatever directory is used for the .dat file. The name of the .ini file should match the corresponding .dat file name.
GP4 custom files
For GP4 more files are required besides the .dat and .ini files.
If not already specified otherwise, GPxTrack will look for the following files:
|*.wad||Wad file||GP4's main directory|
|*.anm||Animations file||AnimationData\ inside or outside anim.wad|
|atx_w_*.tex||Wet weather crowd textures||MAPS\<prefix>\|
|*.gpi||Menu track map||MenuData\PC\GP2001\Images\|
|*.jip, *.jam||Old-style textures||MAPS\RESOURCES\jams\|
|*.crd||Crowd noise data||Samples\CrowdData\|
The files are searched in this order:
- In the same directory as the .dat file (or a sub directory thereof, depending on the file type),
using <trackname> as the file name part.
- If it cannot find the file, and it is unique, it will try to find it based on the extension only (see above).
- If still not found, it looks in the fallback directory. This is to support old custom tracks
that are already installed by manually copying files to their original directories,
swapped default tracks and custom tracks based on default tracks.
The <prefix>.wad file is mandatory.
Like the <prefix>.wad file, the <trackname>.anm file is mandatory.
If not present (and not manually added to anim.wad, which is not practical), GP4 will crash.
If the <trackname>_track.bin is present, it must also be present inside the .wad file.
The file on disk is only used by GP4 to determine dry areas on the track.
This file is not needed if the dry areas are already specified in the .dat file using command 0xD9.
GP4 always loads the wet weather crowd texture files (MAPS\<prefix>\atx_w_*.tex) from disk instead of the .wad.
Technically it's not (yet) possible to force GP4 to load them from the .wad. So instead, GPxTrack patches GP4 to load these files
from a different directory. This is the "atx" sub directory in the same directory as the .dat file is located.
If not found there, and not found in the default location, the crowd texture files from Melbourne will be used.
Dry weather crowd texture files are loaded from the .wad file, but will also be loaded from this "atx" directory if present there.
These files contain track marks (skid marks, etc.) that will already be visible at the start of a session.
The .mr files for the default tracks have an extension ranging from .mra to .mrq, with 'a' denoting slot 1, 'b' slot 2, etc.
For a custom track use the .mr extension, as it is slot independent.
Jam files are normally loaded from MAPS\RESOURCES\jams, as well as gridline.jip or gridleft.jip referenced from the .dat file.
These files are used for paint and rubber on the track and for a wet weather effect. Only part of the jam palette can be used
for these files (some gray and yellow).
GPxTrack patches GP4 to load these files from the same directory as the .dat file is located.
They may also be stored in a "jams" sub directory. If not found there, they will be loaded from the default location.
GP4 .ini file settings
Additionally, <trackname>.ini can contain information about slot dependent data like starting lights, corners, and more:
- Starting lights. The starting lights position can be specified under a section called [StartingLights],
using keys X1, Y1, Z1, X2, Y2, Z2, each with 1 floating point value. These are equal to
the values within the SLCEditor by PatrickC, and the result will be the same as when that tool is used.
If not present within the .ini file, GPxTrack will try to load <trackname>.slc and get the values
from the first track within that file.
- Corners. Corner information will be used within the track menu when pressing the 'track data' button.
There can be a maximum of 20 corners, and each is specified in a section named [Corner1], [Corner2], etc.
Each section can contain values for Name, Desc1, Desc2, and Desc3 (all are optional), which
are shown in the list of corners. Depending on the slot in which the track is installed,
a certain number of those corners can be shown on the map (use a maximum of 8 to be able to use the track
in any slot). To enable this, specify values for X and Y that represent the location on the track map.
These values are floating points values and the range is between 0.0 and 1.0, which covers the whole menu screen.
The tooltip for the 'dot' on the map will show the correct corner name, but for certain slots not all corners
will show a tooltip.
- Tarmac color. The tarmac color can be adjusted in a section called [TarmacColor], with keys AdjustRed, AdjustGreen, and AdjustBlue.
Each has a range of about -100 to 100 to adjust an RGB channel (the final RGB value will overflow when going over 255 or under 0).
The default values are 0. This setting is always applied, even when not specified.
- Progress bar color. GP4 uses 4 different colors for the progress bar. With this setting it's possible to use a custom color for your track.
The color can be specified under a section called [ProgressBar], using key Color. The value format is #rgb or #rrggbb, with hexadecimal values for each channel (like CSS syntax).
- Pit lane width. The pit lane has a certain width in relation to the total width of the pits (including garage).
This ratio is used by GP4 to determine where to draw the pit lane lines that mark the edge (white/yellow lines).
It can be specified under a section called [PitLane], using key WidthRatio. The value is a floating point value between 0.0 and 1.0.
The default value is 0.333. This setting is always applied, even when not specified.
- Pit box shadow. This setting specifies if the pit box is located in the shadow.
This affects the color of the spare tyres and pit crew when making pitstops.
It can be specified under the [PitLane] section using key PitBoxShadow. Use a value of 1 for shadow or 0 for sun.
- Track map. The in-game track map overlays are located in the .wad file in a directory called Maps\Resources\TrackMaps.
It can contain a file called trackmaps.dat (also located on disk). This file contains values for each default track that affects the track map.
The exact meaning of the values is still unknown, but they can be specified for a custom track under a section called [TrackMap], using key Data.
The value consists of 8 comma separated floating point values. The order is the same as in trackmaps.dat.
GPxTrack supports 'magic' data within custom tracks.
This concerns data like the cc setup, pitstop info and bump table.
Track creators can edit and insert this data into their <trackname>.dat file using
Marc Aarts' CMagic tool, or using GP4 Builder.
GPxTrack will detect this data in the track and makes the game use it instead
of the default track data in the game's executable. If GPxTrack is not used
then the track will still work because the game normally ignores it.
Note that there are three versions of magic data. One is compatible with GP3 1.13 (not with 1.00!),
one is compatible with GP3-2000, and one is compatible with GP4. GPxTrack does not convert any magic data
between game versions, so e.g. the magic data for GP3-2000 will be ignored if a
track with that data is loaded in GP3 1.13.
These options are only available by editing gpxtrack.ini directly:
||(GP4 only.) If set to 1, GPxTrack will first check if a file exists that is named cars_<prefix>.wad,
e.g. cars_Melborne2001.wad. If it does not exist, it will read the key CarsWadXX under the same [Wad] section,
where XX is the track number, e.g. CarsWad01=cars01.wad for the first track.
If that file does not exist, it will use the default cars.wad.
||(GP4 only.) If set to 1, GPxTrack will first check if a file exists that is named anim_<prefix>.wad,
e.g. anim_Melborne2001.wad. If it does not exist, it will read the key AnimWadXX under the same [Wad] section,
where XX is the track number, e.g. AnimWad01=anim01.wad for the first track.
If that file does not exist, it will use the default anim.wad.
||Prefix track names with their slot number.
||Ignore tracks in season set/carsets. Normally, tracks specified in season sets
or carsets take precedence over the tracks specified in the track set file. Enable this
option to force loading of the tracks in the track set.
||Extends the maximum number of race laps from 99 to 253.
||(GP3/GP3-2000 only.) Disables a warp effect before the Belgium pitlane.
The effect is always disabled if the track is replaced with a custom track.
||Dump track segment data (see below).
Dump segment data
With the DumpSegments advanced option it's possible to dump track segment data from memory into the GPx circuits directory to a file named XYY_ZZZZZZZZ.seg,
where X is either 't' for track segments or 'p' for pit segments, YY is the track number, and ZZZZZZZZ is the track checksum.
For now, these files have no other use besides investigating track editing in GP4.
Note that compared to the .dat files, the last segment of both the track and pit segments is missing.
This is because it is being overwritten in GPx. The sequence in memory is:
The segment files contain 2 through 4 and 8 through 10.
- last track segment
- first track segment
- one but last track segment
- last track segment but overwritten with first track segment
- void (empty segment)
- track segment connected to first pit segment
- first pit segment
- one but last pit segment
- last pit segment but overwritten with
track segment before the one that is connected to last pit segment