modding:developerinfo:bridges

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

modding:developerinfo:bridges [2018/02/08 11:17]
127.0.0.1 external edit
modding:developerinfo:bridges [2019/03/19 10:18]
Line 1: Line 1:
-===== 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: 
- 
-<code lua> 
-function data() 
-return { 
- 
-        -- property definitions 
- 
- -- pillar definitions 
- 
-        -- railing definitions 
-  
- materialsToReplace = { 
-                -- material definitions;​ only applies to carriers = { "​ROAD"​ } 
- }, 
-} 
-end 
-</​code>​ 
- 
-=== Property definitions === 
- 
-Example: 
- 
-<code lua> 
- 
- name = _("​Steel bridge"​),​ 
- yearFrom = 0, 
- yearTo = 1925, 
- cost = 450.0, 
- carriers = { "​ROAD"​ },   -- or { "​RAIL"​ } 
-</​code>​ 
- 
-=== 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: 
- 
-<code lua> 
-        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"​ }, 
-</​code>​ 
- 
-=== Railing definitions === 
- 
-Definitions for the bridge railing contain three parts: ​ 
-   * ''​railingBegin'':​ beginning part  
-   * ''​raillingRepeat'':​ repeating middle part  
-   * ''​pillarEnd'':​ 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: 
- 
-<code lua> 
-        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"​ }, 
-</​code>​ 
- 
-=== Material definitions === 
- 
-The list is used to overwrite materials defined in the [[modding:​developerinfo:​streets#​materials|street configuration]]. 
modding/developerinfo/bridges.txt · Last modified: 2019/03/19 10:18 (external edit)