Difference between revisions of "GPL Track Creating – Track.ini Files"

From Grand Prix Legends Wiki
Jump to: navigation, search
 
Line 1: Line 1:
 
''by Ed Solheim''
 
''by Ed Solheim''
 +
  
 
As you've probably figured out, the track.ini files are quite important.  They control everything from the AI's to how your exported race-results look like. In this guide I'll guide (doh!) you through the sections one by one :-). Just click on the links below and you'll be there in no time!   
 
As you've probably figured out, the track.ini files are quite important.  They control everything from the AI's to how your exported race-results look like. In this guide I'll guide (doh!) you through the sections one by one :-). Just click on the links below and you'll be there in no time!   
 +
 
   
 
   
 
===Chapter I - the Basics:===
 
===Chapter I - the Basics:===

Latest revision as of 06:18, 4 May 2009

by Ed Solheim


As you've probably figured out, the track.ini files are quite important. They control everything from the AI's to how your exported race-results look like. In this guide I'll guide (doh!) you through the sections one by one :-). Just click on the links below and you'll be there in no time!


Chapter I - the Basics:

The first part of the track.ini file contains basic stuff that is used to calculate race-lengths as well as naming the track.

[ track ]

track_name = Nürburgring

track_name_short = Nürburgring

track_num_turns = 174

track_length = 14.189m

track_altitude = 0.0


Above, note track length given in miles, while altitude given in meters.


track_name = Track-name that is displayed in the HTML-file when you export results or laptimes.

track_name_short = Used at the bottom of page1.pbf in the program-cover as well as on all references to the *track* in the newspaper. (I say *track* because the entry in the '67season.ini' or 'gp.ini' file will determine the name of the *event* (i.e Clark wins *British G.P* at Silverstone).

track_num_turns = Number of corners on the track. This info is displayed on page1 or the program cover as well as on the event-info screen when you are at the track.

track_length = track-length in *miles*. NOTE!: Failing to add the 'm' after the length will result in a faulty distance being displayed in GPL. This setting is also used for calculating the race distance (i.e. 7 laps @ 2miles = race distance of 14 miles).

track_altitude = Unit's are in meters. If this setting has any effect on car-performance at all, I have not determined it yet. All Papy tracks have this setting at 0 (even Mexico which is located high above the sea in real-life).


Chapter II - Oh No You Don’t!

The second part of the ini contains checkpoints along the track that are used to prevent cheating.

[ configuration_0 ]

- Format: dlong, start dlat, end dlat, time penalty (sec), 0 (required)

- 3 checkpoint minimum

checkpoint_0 = 2037.0 -14.0 7.5 5.0 0  ; prevents cutting Nordkehre II

checkpoint_1 = 2763.3 -14.7 7.0 5.0 0  ; prevents cutting Hatzenbach II

checkpoint_2 = 3138.0 -14.3 6.5 5.0 0  ; prevents cutting Hocheichen

checkpoint_3 = 7069.5 -9.0 11.0 10.0 0  ; prevents cutting Adenauer Forst


These checkpoints work in such a way that for a driver to do a 'legal' lap, he must drive through all these checkpoints. Checkpoints are configured like this:

First set of digits [dlong]: determines where (in length) on the track the checkpoint is located.

Second set of digits [start dlat]: determines the right-most 'border' of the checkpoint.

Third set of digits [end dlat]: determines the left-most 'border' of the checkpoint.

Fourth set of digits [time-penalty]: determines the number of seconds you have to stand-still in the pits after having been given a stop-and-go for failing to make a check-point during a race.

Fifth set digits [0]: required (i.e. this must be present at the end of all check-points).


Chapter III - Controlling the AI's

[ statistics ] reference_value = 500.0  ; "base" AI laptime in seconds

The comment says it all I guess.. input-data is seconds and is a reference to base laptime (in seconds) for the AI.


[ ai_track ] Now... this is where things get nasty... getting these bits correct is a must if you want the AI's to behave correctly. I'll explain one setting at a time.


end_start_behavior_section = 5.000000 ;

This is what controls the AI's behaviour at the start of the race... the AI's will shuffle for position and race side-by-side up to the *start* of this track section, and then - room permitting - they'll fall back to their normal behaviour.


merge_from_pit_line_dlong = 400.000000  ;

Distance from *start of track* where AI-cars leaving pits will merge to the race line.


pit_at_end_of_track = 0 ;

Set this to 0 if *all* pit-stalls are beyond the start/finish line (i.e. at the "start" of a lap. Set it to 1.0 if some stalls are at the "end" of a lap and some at the "start" of a lap.


pit_lane_end_dlong = 233.000000 ;

Longitudinal value of where pit-lane divider (i.e pit-wall) ends. In other words, where the pit *exit* starts.


pit_lane_entrance_width = 34.0 ;


Width of pit-entry in meters. NOTE!: This is the longitudinal width of the pit-entry and not the lateral width of the pit-entry access road. In other words - the bit of gap that you drive into, when you drive "off" the track.


pit_lane_has_wall = 1.000000 ;

Set this to 1.0 if there is a wall (pit-wall!) between the pit-stalls and the track itself.


pit_lane_on_right = 1.000000 ;

Set this to 1.0 if the pit is on the right-side of the track - and 0.0 if the pit is on the left-side of the track.


pit_lane_start_dlong = 21740.400000 ;

Base dlong for calculating transition to pit line, in other words, this is where the AI's will slow down and go into "pitting-mode"


pit_lane_width_left = 2.000000 ;

Width of pit lane in meters to LEFT of PIT.LP


pit_lane_width_right = 4.100000 ;

Width of pit lane in meters to RIGHT of PIT.LP


start_of_pit_stalls = 30.000000 ;

Longitudinal coordinates where pit *stalls* begin.


brabham_fuel_load_per_lap = 8.88  ; Brabham AI fuel loading in liters per lap

brm_fuel_load_per_lap = 10.90  ; BRM AI fuel loading in liters per lap

coventry_fuel_load_per_lap = 9.80  ; Coventry AI fuel loading in liters per lap

eagle_fuel_load_per_lap = 9.94  ; Eagle AI fuel loading in liters per lap

ferrari_fuel_load_per_lap = 10.06  ; Ferrari AI fuel loading in liters per lap

lotus_fuel_load_per_lap = 9.47  ; Lotus AI fuel loading in liters per lap

murasama_fuel_load_per_lap = 11.09  ; Murasama AI fuel loading in liters per lap


Getting the fuel settings correct is a bit of a guessing-game. Setting them too short will cause the AI's to run out of fuel during a race... Setting it too high will probably cause them to be slower than what they should be.


track_dlong_sep_coeff = 0.9 ; This is a scalar value, it makes the cars drive X % closer to each other than normal. Any setting above 1.0 will make then drive further away from each other than normal.


track_global_hype_scaling = 0.8 ;

A really cheap way of speeding up or slowing down the AI. Again, it's a scalar value. Set this to 1.0 and they will drive at normal pace. If they are a little fast, make it 0.95 or so, and if they are a little slow, make it 1.05 or so.


track_start_speed_limit = 1.231  ;

Only seen this one at Zandvoort. What is does is put an upper limit on the speed the AI's will reach during their start-behaviour. Unit's are meters per tick [a setting of 1.000 = 80 mph] - and this "limit" will be enforced until the AI's reach the "end_start_behavior_section" as defined earlier in this file. I assume this is used at tracks where there is a huge difference between the speed defined in the race.lp file and the speed you can achieve from a standing start - such as at Zandy.


Other settings seen at some original tracks:


;glass_wall_offset = -0.75 ;

This one is seen in the Monaco track.ini, *but* it's "disabled" [;].. I have no idea what it does. I've tried to use it at certain tracks - with higher settings...however, all it seemed to do was make the AI's act weird... So... if you get this one to work successfully... please let me know.


track_driver_mod_scaling = 0.2  ;

Also only seen at Monaco... I assume this has something to do with the driver modifications listed in the gpl_ai.ini file, but I'm not 100% sure. Please let me know if you find out anything new about this.

I also think it's possible to override all the GPL_AI.INI settings in GPL - by putting the correct commands into the track.ini. I've done some experiments before, but unfortunately forgot what I did etc. All I'm saying is that if you need to... you can experiment with stuff like that.


Chapter IV - More AI's:

[ GP ]

dlong_speed_adj_coeff = 1.040000  ;

This value modifies dlong velocities (i.e. RELS) in LP-files. Setting it to 1.0 will use the settings as listed in the LP-files. Any setting above 1.0 will make GPL "overclock" the LP-settings, and make the AI's go faster. A setting below 1.0 will make it go slower.

I strongly suggest you only increase this setting in *tiny* steps, as it will affect *all* the LP-settings. This is why you'll see extremely violent crashes etc. if you set this setting to high.


dlong_speed_maximum = 2.390000  ;

This setting defines the top-speed the AI's should reach at the track. U nits are meters per tick. [80mph = 1.0000] and it will affect all LP-files after all modifiers.


Chapter V - The Pits:

[ pit_lane_0 ]

lane_on_right = 1  ; 0 if lane on left, 1 if on right

lane_has_wall = 0  ; 0 if no pit wall, 1 if pit wall exists

First two settings have been explained before, so I'm gonna leave them be. A little comment on the name of the section though... it reads "pit_lane_0" - which leads me to believe that you can have multiple pit-lanes like on ovals... [in preparation for NASCAR 4 - I assume] I've never tested this though.


lane_bounds_dlong = 22740.4 253.1  ;

This defines the start/end longitudinal position/coordinates of the pit lane (i.e. PIT ENTRY / EXIT!!). Failing to correctly set these settings, will cause a scenario where only parts of the [AI-]field will qualify during practice. The Marshall-posts nearest to the pit-entry/exit will also be showing yellow and green-flags. PLEASE NOTE: Start of pit-entry is defined first!


lane_bounds_dlat = -11.7 -2.8  ;

Same as for the setting above, only this setting defines the *lateral* position/coordinates of the pits. PLEASE NOTE: The right-most "edge" is defined *first*.


pit_board = 11.0 1200.0 -100.0 100.0  ;

Lateral and longitudinal position of pit-board "guy". Last two settings probably define when to activate the board, but aren’t used in GPL.


Next item is a list defining the pit-stalls for all cars.

Format: ‘’stall # = longitudinal position, lateral position.’’ Please note that these settings define the absolute centre (x/y=0) of the car.3do.


stall_0 = 230.00 -9.30

stall_1 = 219.47 -9.30

stall_2 = 208.95 -9.30

stall_3 = 198.42 -9.30

stall_4 = 187.89 -9.30

stall_5 = 177.37 -9.30

stall_6 = 166.84 -9.30

stall_7 = 156.32 -9.30

stall_8 = 145.79 -9.30

stall_9 = 135.26 -9.30

stall_10 = 124.74 -9.30

stall_11 = 114.21 -9.30

stall_12 = 103.68 -9.30

stall_13 = 93.16 -9.30

stall_14 = 82.63 -9.30

stall_15 = 72.11 -9.30

stall_16 = 61.58 -9.30

stall_17 = 51.05 -9.30

stall_18 = 40.53 -9.30

stall_19 = 30.00 -9.30


Chapter VI - The Grid:

Last item in the track.ini is the list that defines the starting grid. I think the number in the header [ starting_grid_? ] is just used for information purposes. The 5 lines following the header are just for information purposes as well and aren't used by GPL at all. They are however, extremely handy to include as it will be of great help if you need to edit/change this stuff later.

Format for grid is the same as for the pitstalls.

PLEASE NOTE: for lateral position, a positive setting means on the left-side of the track centre-line, and a negative setting is for the right-hand-side of the centre-line.

[ starting_grid_0 ]

- 4x3 staggered grid

- polesitter on left

- track length is <22770.05>

- grid front center at <22757.50, 2.30>

- width between boxes 3.00

stall_0 = 22756.30 6.80

stall_1 = 22756.30 3.80

stall_2 = 22756.30 0.80

stall_3 = 22756.30 -2.20

stall_4 = 22747.46 5.30

stall_5 = 22747.46 2.30

stall_6 = 22747.46 -0.70

stall_7 = 22738.62 6.80

stall_8 = 22738.62 3.80

stall_9 = 22738.62 0.80

stall_10 = 22738.62 -2.20

stall_11 = 22729.78 5.30

stall_12 = 22729.78 2.30

stall_13 = 22729.78 -0.70

stall_14 = 22720.94 6.80

stall_15 = 22720.94 3.80

stall_16 = 22720.94 0.80

stall_17 = 22720.94 -2.20

stall_18 = 22712.10 5.30

stall_19 = 22712.10 2.30


Addenum / Notes:

It's worth noting that all settings/commands in the ini files with a "trailing" ; - These are used to distinguish the commands from the comments in the files. I have no idea what happens if you fail to include these comments, so it's advisable that you remember to include them at all times.


Updated 6-Jan-2001

Transferred to the wiki: 21.04.2009