- Buses
- Passenger Trains
- Freight Trains
- Elevated Train
- Metro
Technical Aspects
These transportation systems all have in common that they are based on roads and cars. Even the elevated train that historically was implemented differently is now based on roads and cars (you didn't notice? great, that means that the automatic migration works.) What this means is that the process of adding new buldings, (bus)stops or vehicles looks quite similar for all systems. The only differences are road flags and tags which are used to assign the objects to the systems. Building types play a minor role in this implementation and were picked as appropriate.
Vehicles
Vehicles are implemented as Cars. Car chains are supported and can be used to model long buses and trains. So to add a vehicle to a system you first have to implement it as a car.
Add the attributes "capacity" (amount of people that fit into the vehicle) and "speed" (a speed factor, 1 is the default car speed):
Code: Select all
"capacity": 20,
"speed": 0.9After that, add the specifics of the system that you want to target:
- Buses
Code: Select all
"flag normal": false, "flag bus": true, "meta": {"tags": {"ts_normal_bus": {}}} - Passenger Trains
Code: Select all
"flag normal": false, "flag train": true, "meta": {"tags": {"short_distance_passenger_train": {}}} - Freight Trains
Code: Select all
"flag normal": false, "flag train": true, "meta": {"tags": {"freight_train": {}}} - Elevated Train
Code: Select all
"flag normal": false, "flag elevated train": true, "meta": {"tags": {"elevated_train": {}}} - Metro
Code: Select all
"flag normal": false, "flag subway": true, "meta": {"tags": {"metro_train": {}}}
Station buildings
Buildings can act as a station in a transportation system. There are two types of station buildings:
- Glue - They don't act as a station on their own but only if a spawn station is nearby; can "glue" nearby buildings together to form a single station; for example used for train stations
- Spawn - The actual building that spawns vehicles. A composited station usually has only a few spawn buildings and many glue buildings
- Buses
As of right now (1.12.27) station buildings are not supported for buses - Passenger Trains - Glue
Code: Select all
"type": "decoration", "meta": {"tags": {"passenger_train_platform": {}}} - Passenger Trains - Spawn
Code: Select all
"type": "railway station", "influence passenger train":80, "meta": {"tags": {"short_distance_passenger_train_station": {}}} - Freight Trains - Glue
Code: Select all
"type": "decoration", "meta": {"tags": {"passenger_train_platform": {}}} - Freight Trains - Spawn
Code: Select all
"type": "railway station", "influence passenger train":80, "meta": {"tags": {"freight_train_station": {}}} - Elevated Train - Glue
Code: Select all
"type": "railway station", "meta": {"tags": {"elevated_train_platform": {}}} - Elevated Train - Spawn
Code: Select all
"type": "railway station", "influence passenger train": 20, "car min level": 2, "car max level": 2, "meta": {"tags": {"elevated_train_station": {}}} - Metro - Glue
Code: Select all
"type": "railway station", "meta": {"tags": {"metro_platform": {}}} - Metro - Spawn
Code: Select all
"type": "railway station", "influence passenger train":25, "car min level": -2, "car max level": -2, "meta": {"tags": {"metro_station": {}}}
(Bus) Stops
Bus stops are small stops that can be placed directly on "road". From the point of view of the transportation system they are stations. Nearby bus stops will be merged to a single station. Bus stops can define a capacity that is used as the max amount of people that can wait there at a time. Their monthly price will be displayed as spending for the transportation system. As of right now (version 1.12.27) only the following transportation systems support defining bus stops:
- Buses
Code: Select all
"influence passenger bus": 30, "meta": {"tags": {"default_busstop": {}}} - Elevated Train
Code: Select all
"influence passenger bus": 30, "required flag normal": false, "required flag elevated train": true, "meta": {"tags": {"elevated_train_busstop": {}}}
Depots
The bus and metro transportation system rely on depot buildings that provide space for vehicles. Using the "depot capacity" attribute they define the amount of vehicles that the depot can house.
- Buses
Code: Select all
"type": "bus depot", "meta": {"tags": {"bus depot": {}}} - Metro
Code: Select all
"type": "railway station", "meta": {"tags": {"metro_depot": {}}}
Roads & Rails
You can define roads and rails as regular roads by setting the corresponding flags from the cars above.
Category & Requirements
For simplicity the default categories and (rank) requirements in the code listings above were omitted. To be consistent with the in-game content you should define requirements so they are at least as strict as the defaults:
- Buses
Code: Select all
"category": "$cat_bus00", "requirements":[{"type": "RANK", "lvl": 3}] - Passenger & Freight Trains
Code: Select all
"category": "$cat_train00", "requirements": [{"type": "RANK", "lvl": 6}] - Elevated Train
Code: Select all
"category": "$cat_elevatedtrain00", "requirements": [{"type": "RANK", "lvl": 9}] - Metro
Code: Select all
"category": "$cat_metro00", "requirements": [{"type": "RANK", "lvl": 15}]
Caveats The player may disable the new transportation system for buses to keep using the old, level based system. In this case your custom buses won't be used.
You should avoid defining a station building or bus stop for multiple transportation systems at the same time. This would mix up accouting or may lead to incompatible road flags.






