Action disabled: source
modding:developerinfo:models:reversiblevehicles

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

The visibility of models can be controlled depending on the travel direction. Note that forward facing models only apply to the first, and backward facing models only the last vehicle in the composition.

railVehicle = {
    -- other configurations
    configs = {
       {
           -- other configurations
           frontForwardParts = { },  -- optional list of model ids facing in driving direction while traveling forwards           
           frontBackwardParts = { }, -- optional list of model ids facing in driving direction while traveling backwards
           backForwardParts = { },   -- optional list of model ids facing against driving direction while traveling forwards
           backBackwardParts = { },  -- optional list of model ids facing against driving direction while traveling backwards
           innerForwardParts = { },  -- optional list of model ids shown while traveling forwards
           innerBackwardParts = { }  -- optional list of model ids shown while traveling backwards
	}
    }
}
modding/developerinfo/models/reversiblevehicles.txt · Last modified: 2019/03/19 10:18 (external edit)