modding:developerinfo:models:reversiblevehicles

This is an old revision of the document!


Reversible vehicles

Overview

Rail vehicles can be configured to not flip when turning around in a station, but instead to reverse direction. The lights and the driver position can be configured accordingly.

transportvehicle

In order for a train to be able to reverse direction, the first and last transportvehicle in a composition has to be configured with the reversible parameter.

transportVehicle = {
    -- other configurations
    seats = {
        { group = 1, transf = [...], crew = true, standing = false},                   -- optional driver in forward position	
	{ group = 1, transf = [...], crew = true, standing = false, forward = false},  -- optional driver in backward position	
    },
    reversible = true
}

railvehicle

An engine must be configured for the first and the last railVehicle in the composition. All but one engine can be configured as emtpy.

railVehicle = {
    -- other configurations
    engines = {
        { }      -- can be left empty for control cars
    },
    configs = {
       {
           -- other configurations
           forwardLights = { },      -- optional list of model ids facing in driving direction while traveling forward
           forwardEndLights = { },   -- optional list of model ids facing against driving direction while traveling forward
           backwardLights = { },     -- optional list of model ids facing in driving direction while traveling backwards
           backwardEndLights = { }   -- optional list of model ids facing against driving direction while traveling backwards
	}
    }
}
modding/developerinfo/models/reversiblevehicles.1543573166.txt.gz · Last modified: 2019/03/19 10:19 (external edit)