A bridge configuration files specifies a set of parameters to define the properties, dimension, features, and visuals of tracks.
They are stored in .lua
files in the folder res\config\bridge\
.
The file has the following format:
function data() return { -- property definitions -- pillar definitions -- railing definitions materialsToReplace = { -- material definitions; only applies to carriers = { "ROAD" } }, } end
Example:
name = _("Steel bridge"), yearFrom = 0, yearTo = 1925, cost = 450.0, carriers = { "ROAD" }, -- or { "RAIL" }
Definitions for the bridge pillar contain three parts:
pillarBase
: bottom part pillarRepeat
: repeating middle part pillarTop
: top part Model file are mirrored and only need to contain one half of the pillar. In addition, bridges can have continuous pillars spanning across the hole width of the bridge. The second entry in each list is used to define the model file used for the repeating part.
Example:
pillarBase = { "bridge/road/iron/old_pillar_btm_side.mdl", "bridge/road/iron/old_pillar_btm_rep.mdl" }, pillarRepeat = { "bridge/road/iron/old_pillar_btm_side.mdl", "bridge/road/iron/old_pillar_btm_rep.mdl" }, pillarTop = { "bridge/road/iron/old_pillar_btm_side.mdl", "bridge/road/iron/old_pillar_top_rep.mdl" },
Definitions for the bridge railing contain three parts:
railingBegin
: beginning part raillingRepeat
: repeating middle part railingEnd
: end part Railing file are mirrored to both sides of the bridge. In addition, bridges can have continuous a railings structure spanning across the hole width of the bridge. The second entry in each list is used to define the model file used for the repeating part.
Example:
railingBegin = { "bridge/road/iron/old_railling_side.mdl", "bridge/road/iron/old_railling_rep.mdl" }, railingRepeat = { "bridge/road/iron/old_railling_side.mdl", "bridge/road/iron/old_railling_rep.mdl" }, railingEnd = { "bridge/road/iron/old_railling_side.mdl", "bridge/road/iron/old_railling_rep.mdl" },
The list is used to overwrite materials defined in the street configuration.