railroader
The railroader module is the main game scripting API — everything mods use to read and control game state. Unlike the Globals, it is not auto-imported; scripts pull in only what they need:
from railroader import world, ui, CarEndWhat it exports
Section titled “What it exports”| Export | Kind | Description |
|---|---|---|
world | singleton | Game world: cars, track, switches, signals, time, camera |
ui | singleton | Extend the game’s UI: panels, windows, commands, style properties |
Car | class | Rolling stock. BaseLocomotive extends it with locomotive controls |
Location | class | A position on the track network |
Ops | class | Freight operations: industry testing, interchanges, waybills |
Waybill | class | A car’s current freight assignment |
Component | class | Definition component proxy (RendererGroupComponent, DecalComponent extend it) |
Material | class | Imperative material API reached via component.material |
Industry | class | An industry and its sub-components (IndustryComponent) |
PassengerStop | class | Passenger stop operations |
CarEnd | enum | F, R, A, B — used by Car coupling/location methods |
CarEvent | enum | Events for car.observe() |
WindowPosition | enum | Used by Windows placement |
MaterialConfiguration | enum | Used by material.configure() |
© 2026 Giraffe Lab LLC. All rights reserved.