train.dat

From GTAModding
Jump to: navigation, search
Map showing the zones of entry denoted by white-bordered boxes

The train*.dat sets up a cinematic camera view when you ride the train in GTA III. Cinematic mode starts and widescreen switches on once the train starts moving along the track and ends when it reaches a station. train.dat is used for the Portland El and train2.dat is used for the subway. Interestingly, these files are not required by the game and so can be deleted. This would remove all cinematic view and makes the camera stay with the same controls as when you first enter the train.

Vice City also contains the same two files but they are leftover from GTA III. The files are never read by the game.

Format

The general format is unlike any data files. All entries must end with a comma; a newline is optional. The very end of the file must end with a semicolon. The entire file can be treated like a single line. Each entry sets up a camera node in the following format:

GTA III Type Description
A,B,C float[3] Location of fixed position of camera
D,E,F float[3] Location of camera to point to; if all three values are 999, then the camera points to the train that the player is in
G,H,I float[3] Lower left zone of entry for the camera
J,K,L float[3] Upper right zone of entry for the camera
M float far clip plane ?
N float near clip plane

The game allows up to 800 camera nodes to be defined.