Trains

From BVEStation Wiki
Jump to: navigation, search

Overview

Trains consist of a series of individual configuration files accompanied by bitmaps and sounds. The following is an overview on which files are required and what they represent.


Information and tips for train creation

This page presents information developers need to be aware of and general tips for object creation.

Characteristics

train.dat This is the core configuration file for the train's characteristics, and is mandatory.

Panels

panel.animated This file allows to create a fully 3D cab. If present in the train folder, this file has precedence over the panel2.cfg and panel.cfg files.
panel2.cfg This file allows to create a limited 2D cab. If present in the train folder, this file has precedence over the panel.cfg. The panel2.cfg has fully superseded the panel.cfg as it offers greater functionality.
panel.cfg This file is outdated, and allows to create a limited 2D cab. It has been fully superseded by the panel2.cfg file, which should be used instead..

Sounds

Default sounds If no sound.cfg is present, these are the default sound files that are being looked for in the train folder.
sound.cfg This defines the names of the sound files to use. The file is required if plugin-specific sounds are to be made available.

Safety Systems

ⓘ Built-in systems: The built-in safety systems ATS-SN, ATS-P and ATC are only used if no ats.cfg file is present, and if the train.dat is configured to define which of these systems should be available.

ats.cfg This file defines which external train plugin to use. For information on how to create plugins, see here.

Miscellaneous

extensions.cfg This defines additional characteristics that are not covered by the other files.

Exterior Objects

panel.cfg / panel2.cfg

●You are free to use textures with full alpha channels without worrying about performance or transparency artifacts. Depth sorting will always perform correctly with these panel formats, so make good use of dirty or wet windscreens via alpha channels, for example.

●In the panel2.cfg, you are responsible for ensuring that overlapping elements are placed in unique layers. Otherwise, the rendering order might be erratic or could lead to z-fighting.

●Single textures should be of power-of-two size, e.g. sides should have a length of 1, 2, 4, 8, 16, 32, etc. However, with textures containing smaller images to be extracted later, e.g. DigitalIndicator in panel.cfg or DigitalNumber in panel2.cfg, the individual contained images should be of power-of-two size where possible, while the size of the container texture is irrelevant.

Plugins

ⓘ Some people have used plugin commands for their trains. The most frequently used plugins are the Oskari plugin and the UK Train System plugin

Using Oskari's Plugin (OS_ATS1.dll) Using UK Train System Plugin