El formato de archivo train.xml

NOTE:

This page is still under construction.

■ 1. Overview

The train.xml format is the native format for newer versions of OpenBVE, and is intended to replace the older train.dat format. It allows setting of many more properties, and is extensible.

It may either be constructed as a single file containing the properties of the entire train, or as a single consist definition, along with child car files.

Positions Within Cars:

In the train.xml format, all positions are measured relative to the center of the car, which is assumed to be at 0,0,0 Whilst this is a change for some parameters from the legacy BVE formats, it means that all positions should be consistant.

■ 2. The Train section

Whether using child car files, or a single file, the first node in each train.xml file must be the <Train> node.

This supports the following properties:

<Car> CarProperties </Car>

This defines a car within the train.

CarProperties may either be a set of child nodes (if using the single file format) or a relative on-disk path to a child car file.

<DriverCar> Car </DriverCar>

Car must be a positive integer less than or equal to the number of cars in the train, setting the driver car.

<NotchDescriptions> Notch </NotchDescriptions>

This overrides the in-game UI notch descriptions displayed.

Notch may be one or more child-nodes, with one of the following subjects: Power, Brake, LocoBrake or Reverser

A child-node must be of the following format:

<Subject> Descriptions </Subject>

Descriptions should be a comma or semi-colon separated list, equal to the number of notches the train has for the subject.

The entries for this list must be placed in order from low to high.

For an example brake or locomotive brake handle with EB, hold brake and 8 notches, the following would be used:

Example Brake Handle NotchDescriptions:
ƒ <NotchDescriptions>EB,HLD,N,1,2,3,4,5,6,7,8</NotchDescriptions>

A train using the automatic air-brake has a total of three notches, e.g:

Example Brake Handle NotchDescriptions:
ƒ <NotchDescriptions>EB,REL,LAP,SRV</NotchDescriptions>

For an example power handle with 8 notches, the following would be used:

Example Power Handle NotchDescriptions:
ƒ <NotchDescriptions>N,1,2,3,4,5,6,7,8</NotchDescriptions>

The reverser must be in the order Neutral, Forwards, Reverse:

Example Reverser Handle NotchDescriptions:
ƒ <NotchDescriptions>N,F,R</NotchDescriptions>

■ 3. The Car section

☀ Note

When using child car files, the <Car> node should be the first node in the file. All other details remain the same.

The node contains the properties for each induvidual train car.

This supports the following properties:

<CameraRestriction> Restrictions </CameraRestriction>

This sets any camera restrictions within the cab (Generally used for 3D cabs).

Restrictions may be one or more child-nodes, with one of the following subjects: Backwards, Forwards, Left, Right, Down or Up

A child-node must be of the following format:

<Subject> Distance </Subject>

Distance should be a distance in meters from the origin point 0,0,0 at the center of the cab object.

<Length> LengthInMeters </Length>

LengthInMeters should be the length of the car in meters.

<Width> WidthInMeters </Width>

WidthInMeters should be the width of the car in meters.

<Height> HeightInMeters </Height>

HeightInMeters should be the length of the car in meters.

<CenterOfGravityHeight> CenterOfGravityInMeters </CenterOfGravityHeight>

CenterOfGravityInMeters should be the height above the rails in meters at which the center of mass is located.

<ExposedFrontalArea> Area </ExposedFrontalArea>

Area should be a positive floating-point number measured in square meters (m²) indicating the frontal area of a car when it is fully exposed to resisting air, for example when the car is the front car in the current nominal direction of travel.

<UnexposedFrontalArea> Area </UnexposedFrontalArea>

Area should be a positive floating-point number measured in square meters (m²) indicating the frontal area of a car when it is fully not exposed to resisting air, namely any car in the train other than the front car.

<Mass> EmptyMass </EmptyMass>

EmptyMass should be the mass of an empty (unloaded) car in kilograms.

<MotorCar> IsMotorCar </MotorCar>

IsMotorCar sets whether the car is a motor car- If true, this car is set as a motor car.

<FrontAxle> Position </FrontAxle>

Position should be the position in meters of the axle from the center of the car.

<RearAxle> Position </RearAxle>

Position should be the position in meters of the axle from the center of the car.

<Object> ObjectFile </Object>

ObjectFile should be a relative on-disk path to the exterior 3D object to use.

<Reversed> IsReversed </IsReversed>

IsReversed sets whether the 3D exterior object is reversed. If true, the object is reversed.

The Bogie sections

The front and rear bogies fitted to the car may be defined via the optional <FrontBogie> and <RearBogie> child nodes.

If these are not defined, each bogie defaults to a pair of axles located one meter either side of the position of the car’s corresponding outer axle.

<FrontBogie> BogieProperties </FrontBogie>
<RearBogie> BogieProperties </RearBogie>

BogieProperties is a set of child nodes, supporting the following properties:

<FrontAxle> Position </FrontAxle>

Position should be the position in meters of the bogie’s front axle, measured relative to the position of the car’s corresponding outer axle.

<RearAxle> Position </RearAxle>

Position should be the position in meters of the bogie’s rear axle, measured relative to the position of the car’s corresponding outer axle.

<Object> ObjectFile </Object>

ObjectFile should be a relative on-disk path to the 3D object to use for this bogie.

<Reversed> IsReversed </Reversed>

IsReversed sets whether the bogie’s 3D object is reversed. If true, the object is reversed.

<InteriorView> ObjectFile </InteriorView>

ObjectFile should be a relative on-disk path to the interior view to use. This may be a 3D object (e.g. b3d / csv / animated), a panel2.cfg file, or an XML file using the panel.xml or panel.animated XML formats.

<InteriorDirection> DirectionX, DirectionY, DirectionZ </InteriorDirection>

This command allows you to rotate the interior camera, allowing for views which do not align with the forwards track direction.

DirectionX The number of degrees that the initial interior camera is rotated in the X-axis. DirectionY The number of degrees that the initial interior camera is rotated in the Y-axis. DirectionZ The number of degrees that the initial interior camera is rotated in the Z-axis.
<VisibleFromInterior> IsVisible </VisibleFromInterior>

IsVisible controls whether the exterior object(s) for this car are visible from the interior of other cars. If true, objects will be visible.

<LoadingSway> Sways </LoadingSway>

Sways sets whether loading sway affects this specific car. If true, then whilst passengers are boarding at a station, the loading sway animation is used.

<DriverPosition> Position </DriverPosition>

Position should contain a comma-separated 3D vector, defining the position of the driver’s eyes within the car, relative to 0,0,0

<Cargo> CargoType </Cargo>

CargoType defines the type of cargo which this car carries. The following load types are available:

Passenger: This car carries passengers. Its overall weight is affected by the loading given at stations, and passenger discomfort is scored. Freight: This car carries freight. Its overall weight is affected by the loading given at stations.
None: This car carries no load (e.g. a locomotive, brake van or similar). It’s weight is not affected by the loading given at stations.

■ 3.1. The Power section

Motor cars may specifiy a <Power> node.

This defines the acceleration curves and the power handle fitted to the car, and supports the following child nodes:

3.1.1. Acceleration Curves

⚠

In the train.dat acceleration curve figures are given for the train as a whole, and an internal calculation is performed to produce the per-car acceleration figures.

However, in train.xml acceleration curve figures apply to the current car only.

The <AccelerationCurves> child node should contain a list of acceleration curve nodes. These must be in ascending order, and should correspond to the number of power notches the train has.

☀ Note

For backwards compatibility, the <AccelerationCurves> node may also be placed directly under the <Car> node, instead of the <Power> node.

Currently, the only supported acceleration curve node is the <OpenBVE> node, supporting the following properties (as per a train.dat acceleration curve):

<StageZeroAcceleration> Acceleration </StageZeroAcceleration>

Acceleration should be a positive floating-point number representing the acceleration at a speed of 0 km/h expressed in km/h/s.

<StageOneAcceleration> Acceleration </StageOneAcceleration>

Acceleration should be a positive floating-point number representing the acceleration at a speed of n km/h expressed in km/h/s.

<StageOneSpeed> Speed </StageOneSpeed>

Speed should be a positive floating-point number representing the reference speed for StageOneAcceleration

<StageTwoExponent> Exponent </StageTwoExponent>

Exponent should be a positive floating-point number representing the exponent used in the stage two speed calculation.

<StageTwoSpeed> Speed </StageTwoSpeed>

Speed should be a positive floating-point number representing the reference speed for StageTwoExponent

<Multiplier> Number </Multiplier>

Number should be a positive floating-point number representing the blended output of the motor car to the train’s acceleration. The default value is 1.0 Values of zero or less, or greater than 50, are invalid.

⚠

This figure is only meaningful for trains using BVE acceleration numbers converted via CarXMLConvertor, and should be omitted if setting acceleration outputs on a per-car basis.

Thus:

If the speed of the train is 0 km/h, a0 indicates the acceleration output.

If the speed of the train is between 0 km/h and v1, the acceleration output is determined via the following formula:

Acceleration between 0 km/h and v1, where x is the current speed of the train in km/h:
ƒ a0 + (a1 - a0) * x / v1

If the speed of the train is v1, the acceleration output is indicated by a1.

If the speed of the train is between v1 and v2, the acceleration output is determined via the following formula:

Acceleration between v1 and v2, where x is the current speed of the train in km/h:
ƒ v1 * a1 / x

If the speed of the train is greater than v2, the acceleration output is determined via the following formula (for version 2.0 exponents):

Acceleration above v2, where x is the current speed of the train in km/h:
ƒ v1 * a1 * v2e-1 / xe

3.1.2. Power Handles

Driver and non-driver cars:

The properties within this node will only be interpreted if the car is specified as the driver car.

The <Handle> node specifies properties for the power handle, and supports the following properties:

<Notches> NumberOfNotches </Notches>

NumberOfNotches should be a positive integer, setting the number of power notches.

☀ Note

For a simple handle, the <Notches> node may also be specified directly under the <Power> node, without an enclosing <Handle> node.

<SpringType> Type </SpringType>
Type: The type of spring return fitted to this handle (if any).

▸ Available options for Type:

Unsprung: No spring return mechanism is fitted.
Single: The spring return mechanism is reset when this handle is operated.
AnyHandle: The spring return mechanism is reset when any power or brake handle is operated. AnyKey: The spring return mechanism is reset when any keyboard key or joystick control is operated.
<SpringTime> Time </SpringTime>

Time should be a positive number, setting the time in seconds taken for the handle to return to its rest position when released.

☀ Note

The <SpringTime> node must be set for a spring return mechanism to be fitted - If this is not set, the handle is treated as unsprung, regardless of the value of <SpringType>.

<MaxSprungNotch> Notch </MaxSprungNotch>

Notch should be a positive integer, defining the highest notch at which the spring return mechanism may hold the handle.

■ 3.2. The Brake section

The <Brake> section specifies properties for the braking system of the car, and consists of the following child nodes, each corresponding the a component of the twin-pipe standard air-brake system:

Air compressor

An optional <Compressor> node, supporting the following properties:

<Rate> CompressionRate </Rate>

CompressionRate should be a positive number, representing the compression rate in Pa/s.

<RestartPressure> CompressionRate </RestartPressure>

Pressure should be a positive number, representing pressure in Pa in the main reservoir, at which the compressor restarts.

Note: When not set, the compressor restarts when the pressure in the main reservoir reaches minimum.

Main Reservoir

The <MainReservoir> node, supporting the following properties:

<MinimumPressure> Pressure </MinimumPressure>

Pressure should be a positive number, representing the minimum pressure in the main reservoir in Pa.

<MaximumPressure> Pressure </MaximumPressure>

Pressure should be a positive number, representing the maximum achievable pressure in the main reservoir in Pa.

<Volume> Volume </Volume>

Volume should be a positive number, representing the volume of the main reservoir in cubic meters (m³).

Auxiliary Reservoir

The <AuxiliaryReservoir> node, supporting the following properties:

<ChargeRate> Rate </ChargeRate>

Rate should be a positive number, representing the charge rate of the auxiliary reservoir from the main reservoir in Pa/s.

<Volume> Volume </Volume>

Volume should be a positive number, representing the volume of the auxiliary reservoir in cubic meters (m³).

Equalizing Reservoir

The <EqualizingReservoir> node, supporting the following properties:

<NormalPressure> Pressure </NormalPressure>

Pressure should be a positive number, representing the normal pressure of this reservoir in Pa.

☀ Note

The normal pressure of the equalizing reservoir is not directly settable - It is derived from the brake pipe normal pressure (1.005 × the NormalPressure of the <BrakePipe>).

<ChargeRate> Rate </ChargeRate>

Rate should be a positive number, representing the charge rate of the equalizing reservoir in Pa/s.

<ServiceRate> Rate </ServiceRate>

Rate should be a positive number, representing the charge rate in Pa/s when making a service brake application.

<EmergencyRate> Rate </EmergencyRate>

Rate should be a positive number, representing the charge rate in Pa/s when making an emergency brake application.

<Volume> Volume </Volume>

Volume should be a positive number, representing the volume of the equalizing reservoir in cubic meters (m³).

Brake Pipe

The <BrakePipe> node, supporting the following properties:

<NormalPressure> Pressure </NormalPressure>

Pressure should be a positive number, representing the normal nominal pressure of the brake pipe in Pa.

<ChargeRate> Rate </ChargeRate>

Rate should be a positive number, representing the normal charge rate in Pa/s.

<ServiceRate> Rate </ServiceRate>

Rate should be a positive number, representing the charge rate in Pa/s when making a service brake application.

<EmergencyRate> Rate </EmergencyRate>

Rate should be a positive number, representing the charge rate in Pa/s when making an emergency brake application.

<Volume> Volume </Volume>

Volume should be a positive number, representing the volume of the brake pipe in cubic meters (m³).

Straight Air Pipe

The <StraightAirPipe> node, supporting the following properties:

<ServiceRate> Rate </ServiceRate>

Rate should be a positive number, representing the charge rate in Pa/s when making a service brake application.

<EmergencyRate> Rate </EmergencyRate>

Rate should be a positive number, representing the charge rate in Pa/s when making an emergency brake application.

<ReleaseRate> Rate </ReleaseRate>

Rate should be a positive number, representing the charge rate in Pa/s when releasing a brake application.

Brake Cylinder

The <BrakeCylinder> node, supporting the following properties:

<ServiceMaximumPressure> Pressure </ServiceMaximumPressure>

Pressure should be a positive number, representing the maximum pressure in Pa when making a full service brake application.

<EmergencyMaximumPressure> Pressure </EmergencyMaximumPressure>

Pressure should be a positive number, representing the maximum pressure in Pa when making a full emergency brake application.

<EmergencyRate> Rate </EmergencyRate>

Rate should be a positive number, representing the release rate in Pa/s during a full emergency brake application.

<ReleaseRate> Rate </ReleaseRate>

Rate should be a positive number, representing the charge rate in Pa/s when releasing the brakes.

<Volume> Volume </Volume>

Volume should be a positive number, representing the volume of the brake cylinder in cubic meters (m³).

<LegacyPressureDistribution> Boolean </LegacyPressureDistribution>

Boolean should be a boolean true / false value, determining whether the legacy train.dat brake pipe model is used - If true, the brake pipe pressure distribution is averaged across the train, rather than being simulated on a per-car basis.

Brake Handles

Driver and non-driver cars:

The properties within this node will only be interpreted if the car is specified as the driver car.

The <Handle> node specifies properties for the brake handle, and supports the following properties:

<Notches> NumberOfNotches </Notches>

NumberOfNotches should be a positive integer, setting the number of brake notches.

☀ Note

For a simple handle, the <Notches> node may also be specified directly under the <Brake> node, without an enclosing <Handle> node.

<SpringType> Type </SpringType>
Type: The type of spring return fitted to this handle (if any).

▸ Available options for Type:

Unsprung: No spring return mechanism is fitted.
Single: The spring return mechanism is reset when this handle is operated.
AnyHandle: The spring return mechanism is reset when any power or brake handle is operated. AnyKey: The spring return mechanism is reset when any keyboard key or joystick control is operated.
<SpringTime> Time </SpringTime>

Time should be a positive number, setting the time in seconds taken for the handle to return to its rest position when released.

☀ Note

The <SpringTime> node must be set for a spring return mechanism to be fitted - If this is not set, the handle is treated as unsprung, regardless of the value of <SpringType>.

<MaxSprungNotch> Notch </MaxSprungNotch>

Notch should be a positive integer, defining the highest notch at which the spring return mechanism may hold the handle.

<MotorBrakeNotch> Notch </MotorBrakeNotch>

Notch should be a positive integer, defining the maximum notch in which motor assisted braking is available.

■ 3.3. Traction Modelling

Two traction models are supported: The electric engine and the diesel engine. In addition, a standard motor car using BVE style acceleration curves may be defined via the <MotorCar> node.

3.3.1. Electric Engine

The <ElectricEngine> node models a simplistic electric engine, using a pantograph to collect current from an overhead wire.

With this traction model in use, one car in the train must possess a pantograph, which must be raised for the train to be moved.

It supports the following properties:

<Pantograph> boolean </Pantograph> <CollectorShoe> boolean </CollectorShoe>
Boolean should be a boolean true / false value, determining whether this vehicle has a pantograph / third rail collector shoe.

Traction motors may be added via the <TractionMotor> or <RegenerativeTractionMotor> child nodes.

These support the following properties:

<MaxAmps> Amps </MaxAmps>
Amps represents the number of amps drawn by the traction motor when the train is accelerating at maximum.
<MaxRegenAmps> Amps </MaxRegenAmps>
Amps represents the number of amps drawn by the traction motor when the train is braking at maximum, when this traction motor is a regenerative traction motor.

3.3.2. Diesel Engine

The <DieselEngine> node models a diesel engine. Cars fitted with a diesel engine are treated as motor cars.

It supports the following properties:

<IdleRPM> RPM </IdleRPM>
<MinRPM> RPM </MinRPM>
<MaxRPM> RPM </MaxRPM>
RPM: The engine speed in revolutions per minute (RPM) when idling (IdleRPM), at minimum power (MinRPM), and at maximum power (MaxRPM). At idle, the engine runs at IdleRPM; the engine speed then rises linearly from MinRPM to MaxRPM across the power notches.
<RPMChangeRate> Rate </RPMChangeRate>
<RPMChangeUpRate> Rate </RPMChangeUpRate>
<RPMChangeDownRate> Rate </RPMChangeDownRate>
Rate: The rate at which the engine speed changes, in RPM per second. RPMChangeRate sets both rates, which may be overridden individually via RPMChangeUpRate and RPMChangeDownRate. If set to zero, the engine speed changes instantly.
<IdleFuelUse> Rate </IdleFuelUse>
<MaxPowerFuelUse> Rate </MaxPowerFuelUse>
Rate: The fuel consumption when idling (IdleFuelUse) and at maximum power (MaxPowerFuelUse), in units of fuel per second. Fuel consumption at intermediate power notches is interpolated between these two figures.
<FuelCapacity> Capacity </FuelCapacity>
Capacity: The capacity of the fuel tank. The tank is filled at the start of the route.

Traction motors may be added via the <TractionMotor> or <RegenerativeTractionMotor> child nodes, which support the same properties as for the electric engine.

■ 3.4. The Doors section

The <Doors> section specifies the properties of the passenger doors fitted to this car, and supports the following properties:

<OpenSpeed> Speed </OpenSpeed>

Speed should be a positive number, setting the time taken for the doors to open in seconds.

<CloseSpeed> Speed </CloseSpeed>

Speed should be a positive number, setting the time taken for the doors to close in seconds.

☀ Note

If the opening or closing speed is not set, this will be calculated using the duration of the open / close sounds.

See the sound.cfg documentation for further details.

<Width> DoorWidth </Width>

DoorWidth should be a positive number, setting the width of the door opening in meters.

<Tolerance> DoorTolerance </Tolerance>

DoorTolerance should be a positive number, setting a tolerance in meters before the door is considered to be closed.

■ 3.5. The Sanders section

The <Sanders> section specifies the properties of the sanders fitted to this car, and supports the following properties:

☀ Note

If not set, the following defaults apply: The sanding rate is unlimited, the sand level starts empty, the application time is 10 seconds, the activation time is 5 seconds, and the number of shots is unlimited.

<Type> Type </Type>
Type: The type of sanders fitted to this car (if any).

▸ Available options for Type:

NotFitted: No sanding mechanism is fitted.
PressAndHold: The sanders are applied whilst the Sanders key is held and sufficient sand is available.
Toggle: The Sanders key toggles the sanders on and off. NumberOfShots: N shots of sand are available, which are applied when the Sanders key is pressed. Automatic: The sanders are automatically activated when wheelslip is detected and sufficient sand is present.
<Rate> SandingRate </Rate>
SandingRate: The rate at which sand is applied per second.
<SandLevel> Level </SandLevel>
Level: The initial starting level of sand, if not in shot mode.
<NumberOfShots> Shots </NumberOfShots>
Shots: The number of sand shots available.
<ApplicationTime> Time </ApplicationTime>
Time: When in shots mode, sets the duration of a sand shot in seconds.
<ActivationTime> Time </ActivationTime>
Time: When in automatic mode, the amount of time before the system reacts and applies sand.
☀ Note

If the <Sanders> node is not used, the legacy <ReadhesionDevice> node may instead be used to define a simple anti-slip device, matching the ReAdhesionDevice entry in the train.dat format:

<ReadhesionDevice> DeviceType </ReadhesionDevice>

▸ Available options for DeviceType:

NotFitted: No readhesion device is fitted.
TypeA / A: Cuts off power instantly and rebuilds it up fast in steps.
TypeB / B: Updates not so often and adapts slowly. Wheel slip can persist longer and power is regained slower. The behavior is smoother.
TypeC / C: The behavior is somewhere in-between type B and type D.
TypeD / D: Updates fast and adapts fast. Wheel slip only occurs briefly and power is regained fast. The behavior is more abrupt.

If neither node is present, a type A readhesion device is fitted by default, matching the train.dat behaviour.

■ 3.6. The Windscreen section

The <Windscreen> section specifies the properties of the windscreen, and should be used if you wish to animate a windscreen on a 3D cab using the inbuilt functionality. It supports the following properties:

☀ Note

The windscreen is only created for the player train.

If <NumberOfDrops> is not set, no windscreen is created. The remaining properties default to a wipe speed of 1 second, a hold time of 1 second, and a drop life of 10 seconds.

<NumberOfDrops> Drops </NumberOfDrops>
Drops: The total number of drops on the windscreen.
<WipeSpeed> Speed </WipeSpeed>
Speed: The time in seconds for the wipers to make a single sweep of the windscreen.
<HoldTime> Time </HoldTime>
Time: The time in seconds for the wipers to hold at the hold position during a sweep.
<DropLife> Life </DropLife>
Life: The life in seconds before a drop is eligible to be recycled when all drops are visible.
<RestPosition> Position </RestPosition>
Position: The rest position for the wipers.

▸ Available options for Position:

Left: The wipers rest at the left of the screen when off.
Right: The wipers rest at the right of the screen when off.
<HoldPosition> Position </HoldPosition>
Position: The hold position for the wipers.

▸ Available options for Position:

Left: The wipers hold on the left of the screen for HoldTime during their sweep.
Right: The wipers hold on the right of the screen for HoldTime during their sweep.

■ 3.7. Particle Sources

The <ParticleSource> section attaches a particle source, such as a diesel exhaust to the car.

Currently, the size of particles is only controlled by the engine power level, but the aim is to add additional controllers at a later date.

When a particle is generated, it’s maximum final size will be determined by linearly interpolating between MaximumSize and MaximumGrown size. This number is fixed for the life of the particle.

If no Function is specified, the interpolated size of the particle will be controlled by the power level of the engine, otherwise the result of Function will be used.

It supports the following properties:

<Location> SourceLocation </Location>
SourceLocation: A comma-separated 3D vector, describing the location of the particle emitter, relative to the center of the car.
<MaximumSize> Size </MaximumSize>
Size*: The maximum initial size of emitted particles. This should normally be set to the diameter of the apeature through which particles are emitted.
<MaximumGrownSize> Size </MaximumGrownSize>
Size: The maximum size a particle will spread to, at maximum power level.
<InitialDirection> Direction </InitialDirection>
Direction: A comma-separated 3D vector, describing the initial direction of motion of the particles when emitted.
<MaximumLifespan> Life </MaximumLifespan>
Life: The maximum life in seconds of a particle.
<Texture> FileName </Texture>
FileName: A relative path to 4x4 texture atlas containing particle textures to be used by this emitter.
<EmitsAtIdle> Boolean </EmitsAtIdle>
Boolean: True or 1 if particles should be emitted at idle, False or 0 otherwise.
<Function> FunctionScript </Function>
FunctionScript: A function script returning a value on execution between 0 (Size) and 1 (MaximumGrownSize), controlling the maximum size of emitted particles.

Escaping Special Characters in XML:

The > (greater than sign) , < (less than sign) and & (ampersand) are reseved characters in XML, and must be escaped for the file to be readable.

Please see the Microsoft documentation

■ 3.8. Safety Systems

■ 3.8.1. Driver Supervision Device

The <DriverSupervisionDevice> section creates a driver supervision device, which may intervene if the driver fails to cancel it in time.

It supports the following properties:

<Type> DeviceType </Type>

▸ Available options for DeviceType:

None: No driver supervision device is fitted.
CutsPower: The device cuts the train’s power when activated. ApplyBrake: The device applies service brakes when activated. ApplyEmergencyBrake: The device applies the emergency brake when activated.
<Mode> DeviceMode </Mode>

▸ Available options for DeviceType:

Power: The device timer is reset when the power handle is moved.
Brake: The device timer is reset when the brake handle is moved.
AnyHandle: The device timer is reset when any handle is moved.
Independant: The device timer is reset when DSD key is pressed.
HeldKey: The DSD key must remain pressed.
<TriggerMode> TriggerMode </TriggerMode>

▸ Available options for TriggerMode:

Always: The device is always active.
TrainMoving: The device is only active when the train is moving.
DirectionSet: The device is only active when a direction is set on the reverser.
<AlarmTime> Time </AlarmTime>
Time: The time in seconds before the device enters alarm state. No intervention is performed until InterventionTime is passed.
☀ Note

If not set, the alarm time defaults to the value of <InterventionTime>.

<InterventionTime> Time </InterventionTime>
Time: The time in seconds from when the device enters alarm state, until it intervenes.
<RequiredStopTime> Time </RequiredStopTime>
Time: The time in seconds the train must be stopped following an intervention, until the device may be reset.
<LoopingAlert> boolean </LoopingAlert>
Boolean should be a boolean true / false value, determining whether the alert tone is played once, or continuously until the device intervenes.
<LoopingAlarm> boolean </LoopingAlarm>
Boolean should be a boolean true / false value, determining whether the alarm tone is played once, or continuously until the device is reset.

■ 3.9. Motor Sound Tables

The optional <SoundTable> node allows a motor sound table to be attached to the car’s traction model.

Currently, the only supported child node is <BVE5>, which loads a BVE5 format motor sound table:

<BVE5> TableProperties </BVE5>

TableProperties is a set of child nodes, each containing a relative on-disk path to the relevant sound table file:

<PowerFreq> FileName </PowerFreq>
<PowerVol> FileName </PowerVol>
<BrakeFreq> FileName </BrakeFreq>
<BrakeVol> FileName </BrakeVol>
FileName: The relative path to the BVE5 motor sound table file holding the frequency (Freq) or volume (Vol) table for power (Power) or brake (Brake) applications.

■ 4. The Coupler section

Car nodes (or child file references) may optionally be separated by a <Coupler> node.

This defines the coupler between the two cars, and supports the following properties:

<Minimum> Distance </Distance>

Distance sets the minimum distance between the two cars.

<Maximum> Distance </Maximum>

Distance sets the maximum distance between the two cars.

Note that Maximum must be greater than or equal to Minimum.

<Object> ObjectFile </Object>

ObjectFile should be a relative on-disk path to the exterior 3D object to use.

☀ Note

The coupler object is not deformed when the coupler stretches / compresses.

<CanUncouple> Boolean </CanUncouple>

Boolean should be a boolean true / false value, determining whether this coupler may be uncoupled by the player.

<UncouplingBehaviour> Behaviour </UncouplingBehaviour>

Behaviour sets the behaviour of the brake systems when this coupler is uncoupled.

▸ Available options for Behaviour:

Emergency: The emergency brake is applied to both consists.
EmergencyPlayer: The emergency brake is applied to the player consist; the uncoupled consist retains the previous brake setting.
EmergencyUncoupledConsist: The emergency brake is applied to the uncoupled consist; the player consist retains the previous brake setting.
ReleasedUncoupledConsist: The brakes are released on the uncoupled consist; the player consist retains the previous brake setting.
Released: The brakes are released on both consists.

■ 5. Miscellaneous Properties

<Plugin> PluginFile </Plugin>

PluginFile should contain the relative path to the security plugin DLL to load- This applies to the player train only.

When using a .Net plugin which supports multiple running instances, the following alternative format may be used:

<Plugin>
 <File> PluginFile </File>
 <LoadForAI> Boolean </LoadForAI>
</Plugin>

PluginFile should contain the relative path to a .Net based security plugin DLL to load.

Boolean should be a boolean true / false value, determining whether this plugin should also be loaded for any additional AI instances.

<Description> Text </Description>

Text should contain the textual description for the train to display in the main menu.

<HeadlightStates> NumberOfStates </HeadlightStates>

NumberOfStates should be the total number of states that the train headlight posesses.

Note: Headlight effects must be implemented by the train developer, using animation / panel properties.

The <DriverBody> node contains properties pertaining to the driver’s body. This is used to calculate the head-bounce cased by the Track.Accuracy command.

This supports the following properties:

<ShoulderHeight> Height </ShoulderHeight>

Height should be the height in meters of the driver’s shoulders above the pivot point- If the driver is seated, this should be the distance from the seat base to the shoulders, and if standing it should be the height from floor to shoulders.

<HeadHeight> Height </HeadHeight>

Height should be the height in meters from the driver’s shoulders to the center point of the head.