Trackmania United Car Conversion

GBX File Format

Detailed information about the GBX file format can be found at http://en.tm-wiki.org/wiki/GBX (mirror).

Changing the Car

In Trackmania United, the car a track uses is stored as a lookback string in the first chunk of the body of the GBX file. Usually it is empty since the vehicle is the same as the environment. If you change it to another vehicle, you will have to change the following lookback string to "Vehicles". All new lookback strings in the file that follow these will have to have their offset increased by 2 to account for these new strings.

For example, a default vehicle chunk would look like this (FF FF FF FF, or -1, signifies an empty lookback string):

0D 30 04 03 03 00 00 00 FF FF FF FF FF FF FF FF  .0..............
FF FF FF FF                                      ....

After changing it to a stadium car:

0D 30 04 03 03 00 00 00 00 00 00 40 0A 00 00 00  .0.........@....
53 74 61 64 69 75 6D 43 61 72 00 00 00 40 08 00  StadiumCar......
00 00 56 65 68 69 63 6C 65 73 FF FF FF FF        ...Vehicles....

JS 2014