12 

 

7   The Track Configuration File

Each track in Trophy has it's own configuration file called 'config.tck'. This file stores general information about the track like it's name, it's author as well as the position of the bridge created in the last section and last but not least the paths for the computer players.

Open your favorite text editor and type the following lines to it (replace the '' by your name, '' by your track name and the '' with the bridge position you've noted in the last section):

# Track info

Author = "<your name>"
Version = "1.0.0"
Name = "<your track name>"


# Objects

x = "<bridge position x>"
y = "<bridge position y>"
Object = "bridge"


startAngle = "0"


i = "0"

i = "1"

i = "2"

i = "3"

i = "4"

i = "5"

#EOF

The parameter 'startAngle' defines the start angle of the players which is the same for all players. Please note that 90 is down while 270 is up.

As you can imagine, there's still something missing in the configuration file: the paths for the computer players.

7.1  Paths For Computer Players

A path for a computer player is defined by a number of reference points which lead the player from the start point (RP 0) to the last point of a lap (RP n).

To make it easier to create paths for the computer players, there's a function in Trophy which makes it possible to record coordinates into a file by clicking them in the right order.

Open a console and change to the path where you've installed Trophy. Start Trophy with the following parameters:

trophy --debug --trackinfo

Start a new game and select your track. If it's not there, please check if the directory name of your track matches the name provided in the 'resources.scr' file (case sensitive!).

Once started you'll soon realize, that the computer player don't behave like they should. All cars are located in the top left corner of the screen and probably can't even move if they are on a forbidden area. If it's impossible to reach the road, you need to give a reasonable start point for all players in the 'config.tck' file. For example if your track starts somewhere at the position 325/234, you can adjust the 'config.tck' file to this:

# Track info

Author = "Andrew Mustun"
Version = "1.0.0"
Name = "Mars"


# Objects

x = "256"
y = "482"
Object = "bridge"



startAngle = "0"


i = "0"

x = "325"
y = "234"
RP = "0"


i = "1"

x = "325"
y = "234"
RP = "0"


i = "2"

x = "325"
y = "234"
RP = "0"

...


#EOF

It doesn't matter for the moment if all players are on the same place - essential is that you can drive around to record the final reference points.

To do so, simply start up Trophy with the options described above and then click one point after another. The first point has to be behind the start line. The total number of points must be below 32 and it must be equal for all 6 recorded paths.

You can only record one track at once. It's anyway a good idea to check the recorded tracks before doing another. Due to the behavior of the computer players, it's not always exactly predictable where the cars will drive.

If you open the file 'trackdata.txt', it contains the list of recorded reference points in the format like it is expected to be in the 'config.tck' file. Copy this list and paste it after the track path id in the 'config.tck' file. The following paragraph shows an example 'config.tck' file.

# Track info

Author = "Andrew Mustun"
Version = "1.0.0"
Name = "Zurich"


# Objects

#x = "256"
#y = "482"
#Object = "bridge"


startAngle = "0"


i = "0"

x = "675"
y = "75"
RP = "0"

x = "994"
y = "88"
RP = "1"

x = "1463"
y = "198"
RP = "2"

x = "1418"
y = "545"
RP = "3"

x = "1268"
y = "889"
RP = "4"

x = "1017"
y = "888"
RP = "5"

x = "883"
y = "459"
RP = "6"

x = "607"
y = "385"
RP = "7"

x = "506"
y = "574"
RP = "8"

x = "657"
y = "791"
RP = "9"

x = "380"
y = "897"
RP = "10"

x = "130"
y = "803"
RP = "11"

x = "145"
y = "671"
RP = "12"

x = "278"
y = "544"
RP = "13"

x = "148"
y = "387"
RP = "14"

x = "103"
y = "254"
RP = "15"

x = "171"
y = "107"
RP = "16"

x = "456"
y = "95"
RP = "17"



i = "1"

x = "675"
y = "120"
RP = "0"

x = "990"
y = "135"
RP = "1"

x = "1437"
y = "199"
RP = "2"

x = "1393"
y = "537"
RP = "3"

x = "1234"
y = "917"
RP = "4"

x = "1033"
y = "866"
RP = "5"

x = "845"
y = "473"
RP = "6"

x = "630"
y = "428"
RP = "7"

x = "492"
y = "509"
RP = "8"

x = "634"
y = "777"
RP = "9"

x = "384"
y = "879"
RP = "10"

x = "112"
y = "817"
RP = "11"

x = "142"
y = "694"
RP = "12"

x = "286"
y = "551"
RP = "13"

x = "163"
y = "371"
RP = "14"

x = "81"
y = "253"
RP = "15"

x = "176"
y = "138"
RP = "16"

x = "454"
y = "126"
RP = "17"




i = "2"

x = "675"
y = "165"
RP = "0"

x = "997"
y = "169"
RP = "1"

x = "1470"
y = "162"
RP = "2"

x = "1451"
y = "511"
RP = "3"

x = "1271"
y = "940"
RP = "4"

x = "983"
y = "852"
RP = "5"

x = "823"
y = "426"
RP = "6"

x = "670"
y = "376"
RP = "7"

x = "475"
y = "529"
RP = "8"

x = "676"
y = "733"
RP = "9"

x = "360"
y = "894"
RP = "10"

x = "106"
y = "894"
RP = "11"

x = "177"
y = "654"
RP = "12"

x = "277"
y = "551"
RP = "13"

x = "114"
y = "364"
RP = "14"

x = "122"
y = "219"
RP = "15"

x = "221"
y = "120"
RP = "16"

x = "496"
y = "147"
RP = "17"




i = "3"

x = "610"
y = "75"
RP = "0"

x = "970"
y = "108"
RP = "1"

x = "1444"
y = "167"
RP = "2"

x = "1455"
y = "580"
RP = "3"

x = "1238"
y = "887"
RP = "4"

x = "1013"
y = "846"
RP = "5"

x = "855"
y = "405"
RP = "6"

x = "635"
y = "369"
RP = "7"

x = "519"
y = "546"
RP = "8"

x = "640"
y = "845"
RP = "9"

x = "379"
y = "937"
RP = "10"

x = "84"
y = "822"
RP = "11"

x = "196"
y = "631"
RP = "12"

x = "258"
y = "515"
RP = "13"

x = "109"
y = "406"
RP = "14"

x = "130"
y = "246"
RP = "15"

x = "193"
y = "86"
RP = "16"

x = "478"
y = "77"
RP = "17"



i = "4"

x = "610"
y = "120"
RP = "0"

x = "1031"
y = "129"
RP = "1"

x = "1411"
y = "176"
RP = "2"

x = "1420"
y = "513"
RP = "3"

x = "1296"
y = "851"
RP = "4"

x = "1075"
y = "871"
RP = "5"

x = "825"
y = "463"
RP = "6"

x = "653"
y = "410"
RP = "7"

x = "497"
y = "451"
RP = "8"

x = "629"
y = "756"
RP = "9"

x = "393"
y = "923"
RP = "10"

x = "149"
y = "876"
RP = "11"

x = "121"
y = "685"
RP = "12"

x = "261"
y = "548"
RP = "13"

x = "148"
y = "347"
RP = "14"

x = "86"
y = "211"
RP = "15"

x = "216"
y = "150"
RP = "16"

x = "504"
y = "118"
RP = "17"



i = "5"

x = "610"
y = "165"
RP = "0"

x = "1031"
y = "129"
RP = "1"

x = "1461"
y = "176"
RP = "2"

x = "1420"
y = "513"
RP = "3"

x = "1296"
y = "851"
RP = "4"

x = "1075"
y = "871"
RP = "5"

x = "825"
y = "463"
RP = "6"

x = "653"
y = "410"
RP = "7"

x = "497"
y = "451"
RP = "8"

x = "629"
y = "756"
RP = "9"

x = "393"
y = "923"
RP = "10"

x = "149"
y = "876"
RP = "11"

x = "121"
y = "685"
RP = "12"

x = "261"
y = "548"
RP = "13"

x = "148"
y = "347"
RP = "14"

x = "86"
y = "211"
RP = "15"

x = "216"
y = "150"
RP = "16"

x = "504"
y = "118"
RP = "17"



i = "5"

x = "610"
y = "167"
RP = "0"

x = "1033"
y = "160"
RP = "1"

x = "1435"
y = "137"
RP = "2"

x = "1392"
y = "575"
RP = "3"

x = "1306"
y = "887"
RP = "4"

x = "1048"
y = "847"
RP = "5"

x = "816"
y = "392"
RP = "6"

x = "603"
y = "415"
RP = "7"

x = "531"
y = "525"
RP = "8"

x = "631"
y = "806"
RP = "9"

x = "357"
y = "873"
RP = "10"

x = "148"
y = "850"
RP = "11"

x = "142"
y = "704"
RP = "12"

x = "264"
y = "543"
RP = "13"

x = "157"
y = "412"
RP = "14"

x = "116"
y = "288"
RP = "15"

x = "145"
y = "103"
RP = "16"

x = "440"
y = "154"
RP = "17"


#EOF