Routes & Rails¶
Rail routes use CargoRoute with Transport Mode set to Rail.
Grid Rule¶
Smart rail generation expects clean grid placement.
Important
Place rail nodes on a 4m grid. X and Z positions should be multiples of 4.
Straight rails use one grid cell. Small corners and large corners use configured cell sizes.
Default settings:
Smart Rail Grid Size:4Small Corner Cells:2Large Corner Cells:4Small Corner Exit Offset:2
Connection Points¶
Add CargoRailConnectionPoint children to node prefabs when rails should enter or exit from specific positions.
Recommended setup:
- one
Startpoint - one
Endpoint - each point should face away from the node
- point positions should also stay on the grid
The route connects:
- previous node
End - next node
Start
Building Smart Rails¶
- Select the route.
- Make sure rail prefabs are assigned.
- Use
Build Smart Rail Visualsfrom the context menu or the Cargo Network window.
The route creates a Route Visuals child object and places generated rail pieces under it.
Loop Routes¶
When Loop is enabled, the last stop connects back to the first stop.
For two nodes in a straight line, you usually do not need visual loop rails. Leave Loop disabled and the train will ping-pong between endpoints.
Non-Loop Routes¶
Non-loop routes do not stop forever at the last node. Vehicles reverse direction and continue:
A -> B -> C -> B -> A
For two nodes:
A -> B -> A -> B