User Tools

Site Tools


modding:developerinfo:bridges

Bridges

Overview

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

Property definitions

Example:

	name = _("Steel bridge"),
	yearFrom = 0,
	yearTo = 1925,
	cost = 450.0,
	carriers = { "ROAD" },   -- or { "RAIL" }

Pillar definitions

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" },

Railing definitions

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" },

Material definitions

The list is used to overwrite materials defined in the street configuration.

modding/developerinfo/bridges.txt · Last modified: 2019/03/19 10:18 (external edit)