May 30, 2011

Step-by-step: Understanding a .dat file

.dat files are the core files of GP4 tracks. Together with .col files, they dictate what you feel, while .gp4 and .bin files are responsible for what you see. Every track starts (or at least should start) with a .dat file, from which all other files can be created. This tutorial shows the structure of the .dat files inside GP4Builder, while each topic will be expanded later in further tutorials. The original .dat files are located in the Circuits folder.



Step 1 - Track Structure. Information stored in .dat files are divided as follows: Track sectors, Pitlane sectors, CC-Line, Track Cameras, GP4Info and Magic Data. These last two were created by the GP4 community and are optional, and Magic Data is the only one of them not (yet) editable in GP4Builder.



Step 2 - Sector level. Double-clicking "Track sectors" or "Pitlane sectors" opens the sector list for each case. Sectors define the track layout and must be spaced by exactly 4.8768 meters (16 feet). Here, basic data for the sectors can be edited, but the values themselves are stored in the next step.



Step 3 - Command level. The sector list itself is just a list - all relevant data for the sectors is stored in the commands inside it - sector position, orientation, track width, banks width, banking, kerbs, track markings (called Jip mappings). Sectors usually have between 6 and 12 commands, with the most common value being 8.



Step 4 - CC-Line sectors. Double-clicking "CC-Line" at Base level opens the cc-line sector list. It's composed of sectors of straights and turns which make the ideal line for cars to follow (CC stands for Computer Controlled). For making a cc-line, refer to this tutorial.



Step 5 - Track cameras. TV cameras, to be more specific. Here are specified the positions, coverage and settings like zoom of the various cameras around the track.



Step 6 - GP4Info. GP4Info contains additional info which is very useful for modded tracks, which include name, country, number of laps and position of split sectors. It can be accessed by opening the "Show GP4 Infos extended data" window at Track Initial Sector.



Step 7 - Magic data is a list of values which controls invisible settings like: default setup (wings, gears and brakes - for both player and CCs); pit strategies; behavior entering and exiting pitlane; CC performance finetuning; tyre types available; track grip; air density; and many more values, some of which still remain unknown. Magic data can be edited and applied to .dat files using CMagic.

That concludes this overview - these steps will be detailed more in the next tutorials.

2 comments :

Lo2k said...

Nice first step

Jcaranti said...

Very nice tutorial.