Skip to content
You're reading the docs for Railroader 0.6 (the MoW Update), currently available on the Experimental branch.

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, CarEnd
ExportKindDescription
worldsingletonGame world: cars, track, switches, signals, time, camera
uisingletonExtend the game’s UI: panels, windows, commands, style properties
CarclassRolling stock. BaseLocomotive extends it with locomotive controls
LocationclassA position on the track network
OpsclassFreight operations: industry testing, interchanges, waybills
WaybillclassA car’s current freight assignment
ComponentclassDefinition component proxy (RendererGroupComponent, DecalComponent extend it)
MaterialclassImperative material API reached via component.material
IndustryclassAn industry and its sub-components (IndustryComponent)
PassengerStopclassPassenger stop operations
CarEndenumF, R, A, B — used by Car coupling/location methods
CarEventenumEvents for car.observe()
WindowPositionenumUsed by Windows placement
MaterialConfigurationenumUsed by material.configure()