Constants
Constants
| Member | Returns | Summary |
|---|---|---|
api.modifyConstants(overrides) | void | Deep-merge overrides into the game rules object RULES and push a snapshot to the sim host worker when one is running. Full text below the table. |
api.modifyColors(overrides) | void | Deep-merge overrides into the map visual constants object GAME_COLORS. The top-level object keeps its identity; nested objects on an override path are replaced by merged copies. |
api.modifyPathfindingRules(overrides) | void | Merge numeric overrides into the commute pathfinding rules PATHFINDING_RULES in place. |
api.modifyConstants(overrides): Deep-merge overrides into the game rules object RULES and push a snapshot to the sim host worker when one is running. The top-level RULES object keeps its identity; every nested object on an override path is replaced by a merged copy, so a nested reference taken earlier (const cc = api.utils.getConstants().CONSTRUCTION_COSTS) goes stale.
modifyConstants#
api.modifyConstants(overrides: Partial<typeof RULES>): voidDeep-merge overrides into the game rules object RULES and push a snapshot to the sim host worker when one is running. The top-level RULES object keeps its identity; every nested object on an override path is replaced by a merged copy, so a nested reference taken earlier (const cc = api.utils.getConstants().CONSTRUCTION_COSTS) goes stale.
Nested objects merge key by key. Arrays and scalars replace the existing value. Unknown keys are added without a warning. STARTING_MONEY also sets the store's current money and logs [Modding API] Auto-synced STARTING_MONEY to store (development builds only). DEFAULT_TICKET_COST also sets the store's current ticket price and, when the first fare group is flat, that group's fare, and logs [Modding API] Auto-synced DEFAULT_TICKET_COST to store (development builds only). Logs [Modding API] Modifying game constants: (development builds only) with the top-level keys.
Parameter overrides (Partial<typeof RULES>): partial RULES tree; must be an object.
Errors:
overridesmissing or not an object: logs[Modding API] Invalid overrides - must be an object, changes nothing.- exception: logs
[Modding API] Error modifying constants:.
Hooks fired: onTicketPriceChanged (only when DEFAULT_TICKET_COST is present and differs from the current price).
Side effects: top-level RULES keys reassigned; constants snapshot sent to the sim host worker when one is running; store money, transitCost and fareGroups written for the two synced keys.
Changed: WALKING_SPEED_STRAIGHT_LINE and WALKING_SPEED_ACCURATE_PATH overrides reach the commute worker with the next commute simulation (PR #1090).
api.modifyConstants({ CONSTRUCTION_COSTS: { TUNNEL: { SINGLE_MULTIPLIER: 0.5 } } });
// other CONSTRUCTION_COSTS.TUNNEL keys keep their valuesmodifyColors#
api.modifyColors(overrides: Partial<typeof GAME_COLORS>): voidDeep-merge overrides into the map visual constants object GAME_COLORS. The top-level object keeps its identity; nested objects on an override path are replaced by merged copies.
Nested objects merge key by key. Arrays and scalars replace the existing value. Unknown keys are added without a warning. Top-level keys of GAME_COLORS: ROAD_VISUALS, ROAD_STRUCTURES, AREA_VISUALS, MODE_COLORS, BUILDING_FOUNDATION_DEPTHS, TRACK_SPEED_COLORS, TRACK_TPH_COLORS, ROUTE_UTILIZATION_COLORS, ROUTE_RELIABILITY_COLORS, SECTION_DELAY_COLORS, TRACK_ELEVATIONS, TRACK_ARROWS, MIN_TRACK_BASE_PIXEL_WIDTH, JOURNEY_WALK_DOTS, TRACK_DETAIL, MIN_ROAD_PIXEL_WIDTH, MIN_LINE_WIDTH_MODIFIER, LINE_WIDTH_MODIFIER, OFFSET_MULTIPLIER, JOURNEY_LINE_WIDTH_MODIFIER, STATION_MARKER_WIDTH_MODIFIER, TRAIN_PATH_WIDTH_MODIFIER, PICKABLE_TRACK_WIDTH_MODIFIER, SIMPLE_ROUTE_ZOOM, PORTOLAN, STATION_GROUP_DISTANCE_THRESHOLD, STATION_MARKER_HOVER_RESIZE, STATION_MARKER, EDIT_ROUTE_MARKER, RAIL_CROSSING_MARKER_SIZE_PX. The rail, tie and catenary shader reads TRACK_DETAIL once when its module loads; later TRACK_DETAIL overrides do not reach it. Logs [Modding API] Modifying colors: (development builds only) with the top-level keys.
Parameter overrides (Partial<typeof GAME_COLORS>): partial GAME_COLORS tree; must be an object.
Errors:
overridesmissing or not an object: logs[Modding API] Invalid colors overrides - must be an object, changes nothing.- exception: logs
[Modding API] Error modifying colors:.
Side effects: top-level GAME_COLORS keys reassigned.
api.modifyColors({ TRACK_SPEED_COLORS: [{ speedKmh: 50, hex: '#22C55E' }, { speedKmh: 130, hex: '#A855F7' }] });
// the whole array is replaced; a one-entry array leaves one entrymodifyPathfindingRules#
api.modifyPathfindingRules(overrides: PathfindingRulesOverrides): voidMerge numeric overrides into the commute pathfinding rules PATHFINDING_RULES in place.
The commute worker receives the merged rules with the next commute simulation. Nested objects (PERCEIVED_TIME, DRIVING_TIMES) are mutated key by key. Every leaf must be a finite number. Keys named __proto__, constructor or prototype are skipped without a log. Logs [Modding API] Modifying pathfinding rules: (development builds only) with the top-level keys.
Parameter overrides (PathfindingRulesOverrides): nested partial of PATHFINDING_RULES; must be an object.
Errors:
overridesmissing or not an object: logs[Modding API] Invalid pathfinding rules overrides - must be an object, changes nothing.overridesis an array: logs[Pathfinding Rules] Ignoring invalid overrideswith the expectation, changes nothing.- key not in
PATHFINDING_RULES: logs[Pathfinding Rules] Ignoring unknown key PATHFINDING_RULES.<path>, skips it. - non-object or array value for an object key: logs
[Pathfinding Rules] Ignoring PATHFINDING_RULES.<path>with the expectation, skips it. - non-finite or non-numeric leaf: logs
[Pathfinding Rules] Ignoring PATHFINDING_RULES.<path>with the expectation, skips it. - exception: logs
[Modding API] Error modifying pathfinding rules:.
Side effects: PATHFINDING_RULES mutated in place; the merged rules sent to the commute worker with each commute batch.
// riders walk up to 60 minutes to a station and take up to 2 transfers
api.modifyPathfindingRules({ MAX_WALK_TO_FROM_STATION: 60 * 60, MAX_TRANSFERS: 2 });PathfindingRulesOverrides#
Nested partial of PATHFINDING_RULES accepted by modifyPathfindingRules. Each leaf must be a finite number.
type PathfindingRulesOverrides = DeepPartial<typeof PATHFINDING_RULES>Rules with their own behaviour#
Simulation cadence: TICKS_PER_UPDATE#
The simulation advances in fixed ticks of 0.5 in-game seconds (GAME_SECONDS_PER_TICK in shared data, a module constant outside RULES, so mods cannot change it). Ticks run in batches, one update each. The game loop's real-time interval scales with the batch size: a bigger batch runs more ticks per update, and updates come at longer intervals. The target rate of game time is the same either way.
RULES.TICKS_PER_UPDATE has an entry per speed tier (slow, normal, fast, ultrafast), each with four values:
| Key | What it controls |
|---|---|
gameState | Ticks of train, signal, and station simulation per update. Also sets the real-time interval between updates. |
trainCoords | Kept for compatibility; currently has no effect. Train positions are recalculated once, on each update's final tick. |
popMovement | Ticks between pop movement updates inside a batch. Pops are also advanced on each update's final tick and at the start of every commute interval. |
popMovementGeojson | Kept for compatibility; currently has no effect. The pop movement map layer is rebuilt only on an update's final tick, throttled by wall-clock time. |
window.SubwayBuilderAPI.modifyConstants({
TICKS_PER_UPDATE: {
ultrafast: {
gameState: 16, // Half the default batch of 32
trainCoords: 8,
popMovement: 8,
popMovementGeojson: 16
}
}
});Changes apply on the next update, without a reload. The loop picks up the new interval without the player touching the speed controls.
Every value must be a whole number from 1 to RULES.MAX_TICKS_PER_UPDATE (default 1000). A larger value is clamped to the cap and a fraction of 1 or more is rounded down, each with a console warning. Anything else (zero, a negative number, a fraction below 1, a string, NaN) falls back to that key's shipped default with a console warning. The cap is moddable: raising MAX_TICKS_PER_UPDATE permits bigger batches, and each update runs its whole batch synchronously.
Game speed: GAME_SECONDS_PER_SECOND#
RULES.GAME_SECONDS_PER_SECOND sets how many in-game seconds pass per real second at the paced speed tiers (slow, normal, fast). Unlike TICKS_PER_UPDATE, this changes how fast game time passes.
ultrafast is not paced: it runs the simulation back to back, as fast as the machine allows, so its value (500) does not set its speed. On a large save that is a few thousand game seconds per real second, and more on a small one.
window.SubwayBuilderAPI.modifyConstants({
GAME_SECONDS_PER_SECOND: {
normal: 50, // Double-speed "normal" tier
fast: 500 // 1 day = about 3 real minutes
}
});Values are read live on every game-loop fire, so changes apply at once, without the player touching the speed controls. Every value must be a positive finite number; anything else falls back to that tier's shipped default with a console warning. `actions.setSpeedMultiplier` writes to these same values: modifyConstants sets absolute numbers. setSpeedMultiplier multiplies the values captured at its first call and rounds the result, so a later call for a tier overwrites a modifyConstants change made to that tier after the first call.
Capacity warnings: WARNING_CONSTS#
RULES.WARNING_CONSTS controls train capacity warnings: a train boarding passengers with no more empty spots than the active threshold can raise a warning for that station (at most one per station each time the game builds warnings), and the warning expires after CAPACITY_WARNING_DURATION game seconds. Which threshold is active depends on the player's "Capacity Warning Threshold" feature flag: CAPACITY_WARNING_THRESHOLD (50) when enabled, CAPACITY_WARNING_THRESHOLD_OLD (100) when disabled (the default).
window.SubwayBuilderAPI.modifyConstants({
WARNING_CONSTS: {
CAPACITY_WARNING_THRESHOLD_OLD: 25, // Only warn when trains are nearly full
CAPACITY_WARNING_DURATION: 60 * 30 // Keep warnings around for 30 game-minutes
}
});Track drawing snap radius: PIXEL_SNAP_THRESHOLD#
RULES.PIXEL_SNAP_THRESHOLD is the radius in screen pixels within which the cursor snaps to existing track nodes and lines while drawing. It is read live on every pointer move while drawing. During the tutorial, track snapping uses a fixed radius of 30 px instead. The same rule also sets the radius for picking an existing waypoint dot while editing a route, where the tutorial radius does not apply.
window.SubwayBuilderAPI.modifyConstants({
PIXEL_SNAP_THRESHOLD: 20 // Twice the default 10 px radius
});Station marker bullets: MARKER_ROUTE_BULLETS#
RULES.MARKER_ROUTE_BULLETS sizes the row of route bullets shown under station and station-group names on the map. The game projects the row's total width from the bullet text (TEXT_SIZE_MULTIPLIER, CHAR_WIDTH_RATIO) plus ICON_GAP_PX between bullets, and hides the whole row when the projection exceeds MAX_ROW_WIDTH_PX: the default cutoff of 300px hides the row at stations served by very many routes.
window.SubwayBuilderAPI.modifyConstants({
MARKER_ROUTE_BULLETS: {
MAX_ROW_WIDTH_PX: 500, // Show the bullet row at busier stations
ICON_GAP_PX: 4 // More breathing room between bullets
}
});The values are read when the marker model is rebuilt: when the zoom rounded to a tenth changes, and on other changes such as the network, the selection, edit mode, the route line width setting, station layer visibility or the theme. Panning alone does not rebuild it.
Station crowd ambience: SOUND_SETTINGS#
RULES.SOUND_SETTINGS controls the crowd noise heard when the camera is zoomed in near a constructed station with routes. Volume falls off linearly with the distance between the camera center and the closest qualifying station plus a zoom-derived altitude term (so zooming out fades it too), reaching zero at NEAR_STATIONS_THRESHOLD meters and peaking at CROWD_MAX_VOLUME.
window.SubwayBuilderAPI.modifyConstants({
SOUND_SETTINGS: {
CROWD_MAX_VOLUME: 0.5, // Louder platforms
NEAR_STATIONS_THRESHOLD: 2000 // Audible from further away
}
});The values are read live, so changes apply the next time the camera moves.
Delay recovery dwell: DWELL.DELAY_RECOVERY_MIN_FRACTION#
RULES.DWELL.DELAY_RECOVERY_MIN_FRACTION lets a late train cut its scheduled dwell short to claw back time. The value is a fraction of the train type's stop time plus the station type's extra dwell: the shipped default of 1 means no recovery at all. A lower value lets a late train dwell for as little as that fraction of the scheduled stop. The cut never goes below the passenger-exchange (dynamic dwell) time for that stop, and never recovers more than the train is actually behind schedule, so a train cannot depart ahead of its original timetable. Values are clamped to 0 through 1.
window.SubwayBuilderAPI.modifyConstants({
DWELL: {
DELAY_RECOVERY_MIN_FRACTION: 0.5 // A late train can dwell for half its scheduled stop
}
});The value is read each time a stop's dwell is computed, so a change applies to the next stop a train makes.
Bond financing: BOND_TYPES#
RULES.BOND_TYPES holds everything behind the three bond offerings (SMALL, MEDIUM, LARGE). Keys per bond: displayName (shown in the financial dashboard), principal, interestRate (daily, charged hourly at 1/24 on the remaining principal), principalPaymentRate (fraction of the original principal repaid per game hour) and requiredDailyRevenue (operational revenue over the previous game day required to qualify).
window.SubwayBuilderAPI.modifyConstants({
BOND_TYPES: {
SMALL: {
displayName: '$200M Bond', // Rename to match the new principal
principal: 200_000_000,
interestRate: 0.02, // Cheaper starter loans
requiredDailyRevenue: 5_000_000 // Easier to qualify for
}
}
});Changes apply to bonds issued after the override; an already-issued bond keeps the principal, interest rate and hourly payment it was issued with, while its displayed name is read live from BOND_TYPES. The bond ids (small, medium, large) key issued bonds in save data and are fixed. Keys added to BOND_TYPES are never read.
Read the current bond types (names included) with window.SubwayBuilderAPI.gameState.getBondTypes().
The station marks (STATION_MARKER)#
Two station marks share these values: the dot drawn for most stops, and the interchange pill drawn for a stop whose lines fill a bundle of the schematic diagram. The pill stands exactly where that dot would have been and hides it.
window.SubwayBuilderAPI.modifyColors({
STATION_MARKER: {
DOT_DIAMETER: 9, // Bigger station dots
PILL_DIAMETER: 9, // Fatter interchange pills (MAX_DIAMETER caps them at 9)
BORDER_WIDTH: 2, // A heavier ring, on the dots and the pills alike
BORDER_DARK: '#1b1b3a' // The ring on white dots and on every pill
}
});DOT_DIAMETER (8) is the ordinary station dot's diameter in screen pixels at zoom 14. At other zooms it scales with PORTOLAN.RIBBON_WIDTH_STOPS, so dots thicken and thin with the route lines; the zoom scaling is capped at MAX_DIAMETER (9) and the route width scale then multiplies the result. SELECTED_DOT_DIAMETER (10) is the enlarged dot on the open station, the selected route's stops and journey stops. PILL_DIAMETER (8) is the interchange pill's height and twice its corner radius; a pill is a dot stretched along its bundle. Wider zooms scale the pill down by PORTOLAN.MARKER_ICON_SCALE_STOPS, and MAX_DIAMETER caps it too. Also here: GROUP_DOT_SPLIT_SPREAD_PX, GROUP_DOT_SPLIT_MIN_ZOOM, GROUP_DOT_SPLIT_ZOOM_STEP and PILL_OFF_CORRIDOR_M, which decide when a station complex splits into separate dots and when a pill falls back to a dot, plus FADE_MS and LABEL_ZOOM; the Map Visuals Reference below lists each.
BORDER_WIDTH is in screen pixels. Both marks are sized in screen pixels at zoom 14 and scale from there. The dot's ring is drawn at BORDER_WIDTH at every zoom. The pill's ring is baked into an image that the marker scale ramp then shrinks, so the game draws it into that image divided by the scale (rounded to 0.1) it is about to be shown at.
BORDER_DARK rings every white dot, every diagram pill, and every dot in the dark theme. BORDER_LIGHT rings every other dot in the light theme: route-colored, black and gray dots.
Every STATION_MARKER value is read live, with no reload. FADE_MS and the dots' BORDER_WIDTH apply the next time the marker layers render. The dot diameters, the dot ring colors and LABEL_ZOOM show when the station marker model next rebuilds, which happens when any of its inputs changes (among them the zoom rounded to a tenth, the network, the selection, the theme and the Route line width setting).
The route diagram (PORTOLAN)#
With Show interlined routes turned on (Settings), a built diagram and no route edit in progress, zooming out swaps the track-accurate route lines for a schematic diagram: routes that share a corridor are merged into one bundle of parallel ribbons, with an interchange marker where a station's lines fill the bundle. Zooming back in past PORTOLAN.ROUTE_ZOOM hands the map back to lines that follow the actual rails.
The diagram's geometry is computed by the game when the network changes, and mods cannot edit it. GAME_COLORS.PORTOLAN controls how that geometry is presented across zoom levels: where the handoff sits, how wide a ribbon draws, how big a marker gets, and how far a bundle spreads. Everything except BAND_GAP_SCALE is read as the map redraws, so it applies without a reload. BANDS min values are also read when the diagram is built, to slice it, so a change there takes full effect at the next build.
The interchange marker's own size and ring are not here: they belong to the station marks it replaces, under STATION_MARKER above. MARKER_ICON_SCALE_STOPS scales the pill; STATION_MARKER.PILL_DIAMETER is what it scales. The plain dots follow RIBBON_WIDTH_STOPS instead.
window.SubwayBuilderAPI.modifyColors({
PORTOLAN: {
ROUTE_ZOOM: 14, // Hand back to track-accurate lines earlier
MARKER_ZOOM: 12, // Hold the interchange markers back until closer in
RIBBON_WIDTH_STOPS: [
// Arrays are replaced wholesale: pass every stop, in ascending zoom order
{ zoom: 10, width: 1.5 },
{ zoom: 14, width: 4 }
]
}
});Values between two stops are interpolated linearly; outside the listed stops the nearest stop's value holds flat, so a two-stop table is a ramp with a floor and a ceiling. A single stop is a constant.
BAND_GAP_SCALE is informational: the game never reads it. Curved route lettering on the ribbons follows OFFSET_SCALE_STOPS; route bullets and straight labels follow a fixed ramp from zoom 11 to 14, so changing OFFSET_SCALE_STOPS moves the ribbons without moving the bullets and straight labels.
Game Rules Reference#
Every rule in RULES, its default value, and what it does. Generated from the game's rule definitions, so it matches the shipped defaults.
| Key | Default | Description |
|---|---|---|
MIN_SINGLE_TRACK_LENGTH | 10 | Minimum length in meters of a track in a single-lane track group, outside advanced mode. |
MIN_TRACK_LENGTH | 10 | Minimum length in meters of a parallel/quad track when auto-crossovers are enabled, outside advanced mode. |
MIN_ADVANCED_TRACK_LENGTH | 10 | Minimum length in meters of any track in advanced mode, and of a parallel/quad track when auto-crossovers are off. |
MAX_TRACK_LENGTH | 10000 | Maximum length in meters of a single track. |
COORD_PRECISION | 6 | Decimal places coordinates are rounded to before being stored. A fractional value is rounded down, and a value outside 0 to 15 falls back to 6. Existing geometry is not re-rounded when this changes. |
PIXEL_SNAP_THRESHOLD | 10 | Radius in screen pixels within which the cursor snaps to existing track nodes and lines while drawing, and to route waypoint dots while editing a route. While a tutorial runs, track snapping uses a fixed 30 px radius instead; route waypoint snapping still reads this rule. |
STATION_LENGTH_BUFFER | 4 | Extra meters of platform beyond car length times car count that a newly built station needs to hold that many cars; existing stations skip it. The station length cost term (LENGTH_COST_FACTOR) counts cars with it for every station. Built-in train types other than light rail copy it into their station length limits once at app load, and a legacy heavy-metro save re-reads it when it loads. |
STATION_MAX_GRADE_PERCENTAGE | 1 | Maximum grade in percent (rise over run) a station platform's two ends may differ by. Below the 0.1 m absolute floor this is not checked at all, so short or hand-drawn stations that are level within rounding always pass. |
TRACK_WIDTH | 1.435 | Width in meters of a single track. Without a platform between them, side-by-side track centerlines sit this plus the train type parallelTrackSpacing apart, and drawn track, route, train and signal lines scale with it. With the Detailed tracks setting on, track lines and their rails use a copy read once at app load, as does the deep-bore segment overlay. |
SCISSORS_CROSSOVER_LENGTH | 40 | Length in meters of a scissors crossover between parallel tracks. Where the track spacing is too wide to clear the train minimum turn radius in this length, the crossover is lengthened. Also caps the length of yard crossovers. |
OFFSET_TRANSITION_LENGTH | 50 | Base length in meters of a lateral track-spacing transition (station flare); a flare that shifts rails far sideways runs longer by OFFSET_TRANSITION_RUN_PER_METER, and every flare is capped at half its segment. |
OFFSET_TRANSITION_RUN_PER_METER | 10 | Meters of flare run per meter of lateral track-spacing change. The flare runs the larger of this times the shift and OFFSET_TRANSITION_LENGTH, capped at half its segment. |
CANT_MAX_APPLIED_MM | 150 | Fallback maximum applied cant (superelevation) in millimeters on running track built since the cant model shipped, used when a train type does not define stats.maxCantMm. |
CANT_RAMP_MM_PER_S | 45 | With the CANT_MECHANICS beta feature on, the maximum rate of cant change in millimeters per second of travel time. Lower = longer cant transitions and slower curve entries next to flat track. |
CANT_MAX_STOPPED_MM | 150 | With the CANT_MECHANICS beta feature on, the maximum applied cant in millimeters on track built since the cant model shipped, within CANT_STOP_ZONE_LENGTH_M of a track end where 3 or more tracks meet or a station joins. |
CANT_STOP_ZONE_LENGTH_M | 200 | With the CANT_MECHANICS beta feature on, the distance in meters from a track end at a junction or station within which cant is capped at CANT_MAX_STOPPED_MM. |
CANT_STATION_MAX_MM | 0 | Maximum applied cant in millimeters on station track built since the cant model shipped; express-station track uses the running-track maximum. |
CANT_STREET_RUNNING_MAX_MM | 0 | Maximum applied cant in millimeters on street-running track built since the cant model shipped. |
MIN_STATION_TURN_RADIUS | 150 | Fallback minimum MEAN station platform radius in meters, used when a train type does not set a positive stats.minStationTurnRadius. Station validation gates total platform bend against length/this. |
OFFSET_TRANSITION_RADIUS_MULTIPLIER | 10 | Multiplier on the measured curve radius inside a spacing-transition zone when setting speed limits (higher = more forgiving). |
PLATFORM_TRAIN_GAP | 0.1 | Horizontal gap in meters between the side of a train body and the platform edge. |
PLATFORM_STROKE_WIDTH | 1 | Width in meters of the outline drawn around a platform. |
STATION_HEIGHT | 4 | Minimum vertical separation in meters for a track crossing another track or a station platform at a different elevation. It also sizes a 3D station box that is switched off in the game. |
TUNNEL_HEIGHT | 5 | Extrusion height in meters of track base slabs in the 3D track view, which is switched off in the game, so it has no visible effect. |
V_MERGE_SIGNAL_WINDOW_LENGTH | 200 | Length in meters of the signal window of a v-merge signal; an approach track shorter than this is covered whole. |
DIAMOND_SIGNAL_WINDOW_LENGTH | 10 | Length in meters of the signal window of a diamond signal, for each track where the center is where the diamond meets. |
GRADE_CROSSING_SIGNAL_RADIUS | 200 | Half-width in meters of each grade-crossing signal's track coverage. |
MAX_JERK | 0.3 | Maximum increase in acceleration of a train in m/s³ while it speeds up. Braking is not jerk-limited. |
ADDITIONAL_WARNING_WINDOW_LENGTH | 2 | Meters added to the braking distance of a train to set the length of the warning window ahead of its head. The same amount is subtracted from the head-to-end gap the game uses to place where a train stops at the end of each leg. |
ADDITIONAL_EXTRA_WARNING_WINDOW_LENGTH | 100 | Length in meters of a second warning window that starts where the first one ends. A train stops when either window reaches a held signal or a track occupied by another train. |
DEFAULT_TICKET_COST | 3 | Fare in dollars a new game starts with, also used for a save that stores no fare or a fare of 0 when it loads. Setting it through modifyConstants also sets the current fare, and setTicketPrice writes its price here. |
COMMUTE_INTERVAL_LENGTH | 900 | Commuters are released in intervals of this many seconds. |
SCHEDULE_TRANSITION_WINDOW_MAX_LENGTH | 5400 | Cap in seconds on the window over which a route adds or withdraws trains around a demand change. The window is otherwise the route cycle time, so the cap only binds on routes with a longer cycle. |
YARD_RELEASE_HEADWAY_FRACTION | 0.5 | On a route with estimated timings, the fraction of the target headway (cycle time divided by the target train count) of schedule time that must separate a yard pull-out entry point from the nearest train ahead and behind before a pre-staged (ahead-of-demand-change) train is released into service. Lower values release sooner; higher values hold longer. |
SCHEDULING_SIMULATION_INTERVAL_MINUTES | 10 | Granularity in minutes of the train-scheduling analysis/debug simulator. |
MAX_ROUTE_SIMULATION_DURATION | 86400 | Route time estimation stops simulating after this many seconds. Read once at app load. |
MAX_WAIT_TIME | 840 | Only whether this is above 0 matters: at 0 or below, terminals make no headway-regulation hold except on a non-timetable route without a usable estimated cycle time; any positive value leaves the hold length unchanged. TERMINAL_HOLD_MAX_SECONDS caps the hold. |
TERMINAL_HOLD_MAX_SECONDS | 600 | Hard cap in seconds on any single headway-regulation hold past the dwell at a terminal (a reversal stop or the first stop of the route cycle). |
STARTING_MONEY | 3000000000 | Money in dollars the player starts a new game with, for a city with no difficulty rating. Rated cities use STARTING_MONEY_BY_DIFFICULTY. The same figure funds each multiplayer company after the first. The tutorial replaces it with its own budget and sandbox mode with Number.MAX_SAFE_INTEGER. Setting it through modifyConstants also sets the current balance to it. |
STARTING_TRAIN_CARS | 30 | Heavy-metro train cars the player starts a new game with. Read once at app load. |
FARE_MULTIPLIER | 365 | For every dollar paid in fares, the player earns this many dollars. |
ACCEPTABLE_SPEED_MARGIN | 0.01 | Margin of error for the train's speed when calculating movements. |
MIN_ELEVATION | -300 | Lowest construction elevation in meters the construction panel elevation control and the decrease-elevation keyboard shortcut allow. |
MAX_ELEVATION | 100 | Highest construction elevation in meters the construction panel elevation control and the increase-elevation keyboard shortcut allow. |
TIME_TO_KEEP_COMMUTE_DATA | 86400 | How long in seconds to keep completed commutes data. |
STUCK_TRAIN_TIMEOUT | 900 | A train that stands still outside a station stop for this many game seconds is removed as stuck. |
IS_DELAYED_THRESHOLD | 300 | Delay threshold in seconds that marks a train arrival or a rider as delayed in stats and panels; the train details panel also shows a train more than this far ahead of schedule as early, and the journey planner uses it as the smallest typical extra ride time it shows on a ride segment. The simulation does not read it. |
MAX_TERMINUS_ALTERNATE_DETOUR | 400 | Max extra distance in meters (arrival + departure combined) an alternate terminus platform may add over the canonical platform before it is excluded as a turnback target. |
MAX_TERMINUS_ALTERNATES | 6 | Maximum alternate turnback platforms kept per flexible terminus, checked nearest first. Yard deadhead paths also try only the nearest this-many-plus-one platforms of each terminus station. |
MAX_STATION_TRACKS | 16 | Maximum number of station tracks a single station can be built with. |
MAX_STATION_CONNECTION_ANGLE_DEG | 45 | Maximum angle in degrees between a multi-track corridor (yard track excepted) and the station platform axis where the corridor joins a station end. Beyond it the track is rejected. |
COMMUTE_DATA_FILTER_INTERVAL | 3600 | Filter completed commutes every this many seconds. |
INFRASTRUCTURE_COST_CHARGE_INTERVAL | 300 | How often in game seconds to charge infrastructure maintenance costs. |
EXTRA_TRACK_STATION_MAINTENANCE_COST_MUTLIPLIER | 0.25 | Shown in the train types panel as the per-extra-track station maintenance surcharge. Maintenance costs do not read it. |
OPERATIONAL_COST_CHARGE_INTERVAL | 900 | How often in game seconds to charge operational costs. |
TRAIN_SCHEDULE_TRANSITION_WINDOW | 1800 | Fallback route cycle time in seconds for a route with no timing data. Sizes schedule transitions and, in timetable mode, the train count each headway needs. |
BUILDING_FOUNDATION_GAP | 3 | Meters added to each BUILDING_FOUNDATION_DEPTHS band minDepth when coloring the building foundation map layer. Collision checks do not read it. |
BUILDING_CORNER_ROUNDING_MIN_ZOOM | 15 | Zoom at or above which the rounded-building-corners setting takes effect. Below it corners render sharp. |
WALKING_SPEED | 1.34 | Not read by the game. Walk times read WALKING_SPEED_STRAIGHT_LINE or WALKING_SPEED_ACCURATE_PATH. |
WALKING_SPEED_STRAIGHT_LINE | 1.5 | Walking speed in m/s for straight-line (crow-flies) walk estimates. Walk times at a station are also divided by its station type walkSpeedMultiplier, or by its walkSpeedOverride over this speed when set. |
WALKING_SPEED_ACCURATE_PATH | 1.5 | Walking speed in m/s for walks measured along the pedestrian network. Walk times at a station are also divided by its station type walkSpeedMultiplier, or by its walkSpeedOverride over WALKING_SPEED_STRAIGHT_LINE when set. |
GRADE_CROSSING_APPROACH_SECONDS | 20 | Not read by the game. |
GRADE_CROSSING_CLEAR_SECONDS | 15 | Not read by the game. |
MAX_ROUTE_NAME_LENGTH | 16 | Maximum number of characters that can be typed into a route bullet name. |
MAX_ROUTE_FULL_NAME_LENGTH | 48 | Maximum number of characters that can be typed into a route's optional full name. |
ROUTE_PANEL_TRAINS_SHOWN | 5 | Number of trains listed in the route details panel before the rest collapse behind a "Show more" button. |
MAX_TICKS_PER_UPDATE | 1000 | Ceiling on each TICKS_PER_UPDATE value of 1 or more, rounded down to a whole number. A value below 1 or not a finite number falls back to the shipped default. |
MIN_FRAME_INTERVAL_MS | 33 | Target spacing in milliseconds between the frames the sim worker ships to the renderer while it is not compute-bound (33 is about 30 per second). Also the target wall-clock spacing between pop movement map layer rebuilds. |
BEHIND_FRAME_INTERVAL_MS | 66 | Target spacing in milliseconds between the frames the sim worker ships while compute-bound: a counter that rises on each loop fire ending with updates still owed, and falls on other fires, is above 3. |
PLATFORM_WIDTH_PRESETS#
Platform widths in meters for each width preset the station designer offers.
PLATFORM_WIDTH_PRESETS.very_narrow#
Very narrow preset: platform widths in meters.
| Key | Default | Description |
|---|---|---|
PLATFORM_WIDTH_PRESETS.very_narrow.island | 6 | Width in meters of an island platform between a parallel track pair, and of the interior island of a 2-track free-form station. |
PLATFORM_WIDTH_PRESETS.very_narrow.expressIsland | 6 | Width in meters of islands in quad layouts (express center island, quad-express dual islands) and of interior islands in free-form stations of 3 or more tracks. |
PLATFORM_WIDTH_PRESETS.very_narrow.side | 4 | Width in meters of outboard side platforms in every layout, preset or free-form. |
PLATFORM_WIDTH_PRESETS.narrow#
Narrow preset: platform widths in meters.
| Key | Default | Description |
|---|---|---|
PLATFORM_WIDTH_PRESETS.narrow.island | 8 | Width in meters of an island platform between a parallel track pair, and of the interior island of a 2-track free-form station. |
PLATFORM_WIDTH_PRESETS.narrow.expressIsland | 8 | Width in meters of islands in quad layouts (express center island, quad-express dual islands) and of interior islands in free-form stations of 3 or more tracks. |
PLATFORM_WIDTH_PRESETS.narrow.side | 6 | Width in meters of outboard side platforms in every layout, preset or free-form. |
PLATFORM_WIDTH_PRESETS.default#
Default preset: platform widths in meters. Also used for an unknown preset name, for a station that stores neither widths nor a legacy width multiplier, and as the baseline the dwell model compares platform widths against.
| Key | Default | Description |
|---|---|---|
PLATFORM_WIDTH_PRESETS.default.island | 10 | Width in meters of an island platform between a parallel track pair, and of the interior island of a 2-track free-form station. |
PLATFORM_WIDTH_PRESETS.default.expressIsland | 10 | Width in meters of islands in quad layouts (express center island, quad-express dual islands) and of interior islands in free-form stations of 3 or more tracks. |
PLATFORM_WIDTH_PRESETS.default.side | 8 | Width in meters of outboard side platforms in every layout, preset or free-form. |
PLATFORM_WIDTH_PRESETS.wide#
Wide preset: platform widths in meters.
| Key | Default | Description |
|---|---|---|
PLATFORM_WIDTH_PRESETS.wide.island | 14 | Width in meters of an island platform between a parallel track pair, and of the interior island of a 2-track free-form station. |
PLATFORM_WIDTH_PRESETS.wide.expressIsland | 14 | Width in meters of islands in quad layouts (express center island, quad-express dual islands) and of interior islands in free-form stations of 3 or more tracks. |
PLATFORM_WIDTH_PRESETS.wide.side | 12 | Width in meters of outboard side platforms in every layout, preset or free-form. |
DWELL#
Dynamic dwell time model: how long trains hold at platforms under passenger load. The computed dwell is floored at the train type stopTimeSeconds plus the station type extra dwell, so it can only make stops longer.
| Key | Default | Description |
|---|---|---|
DWELL.DYNAMIC_DWELL_ENABLED | 1 | Whether passenger volumes extend dwell times. 0 or below turns the model off and the passenger dwell at every stop is the flat scheduled dwell (train type stop time plus station type extra dwell). |
DWELL.FUNCTION_TIME | 10 | Constant term in seconds of the computed passenger dwell, independent of passenger volume. |
DWELL.ALIGHT_SECONDS_PER_PAX | 1.9 | Seconds coefficient on the alighting count at the busiest door raised to FLOW_EXPONENT. |
DWELL.BOARD_SECONDS_PER_PAX | 1.4 | Seconds coefficient on the boarding count at the busiest door raised to FLOW_EXPONENT. |
DWELL.FLOW_EXPONENT | 0.7 | Exponent on the per-door alighting and boarding counts in their flow terms. Below 1 each extra passenger adds less time as flows grow; 1 makes those terms linear. |
DWELL.MIXED_FLOW_COEF | 0.005 | Seconds coefficient on alighting times boarding per door at the busiest door. This friction term is dropped when the platform track has platforms on both sides. |
DWELL.CROWDING_COEF | 0.007 | Seconds coefficient on (alighting + boarding per door) times standing through-passengers per door, all at the busiest door. |
DWELL.CROWDING_SATURATION | 40 | Cap on standing through-passengers per door (at the busiest door) used in the crowding term. |
DWELL.PEAK_DOOR_FACTOR | 1.3 | How unevenly passengers cluster along the platform: the busiest door loads this many times the average door, and the busiest door sets the dwell. 1 is a perfectly even spread. Clamped to 1..2.5. |
DWELL.MAX_DWELL_SECONDS | 300 | Hard cap in seconds on the computed passenger dwell, never below FUNCTION_TIME. |
DWELL.BOTH_SIDES_DOOR_MULTIPLIER | 1.8 | Multiplier on the effective door count when the platform track has platforms on both sides. Such tracks also drop the mixed-flow friction term at any value. Values below 1 count as 1. |
DWELL.PLATFORM_WIDTH_EXPONENT | 0.4 | How strongly platform width scales passenger flow time: flow terms are multiplied by (summed default-preset widths / summed station widths) raised to this power, so narrower platforms slow the exchange and wider ones speed it up. 0 turns the effect off. |
DWELL.DEFAULT_DOOR_SPACING_M | 6 | Fallback for train types without a positive doorsPerCarPerSide, including the built-in diesel commuter rail: one door per side per this many meters of car length, rounded, clamped to 1..8. A value of 0 or below uses 6. |
DWELL.DEFAULT_SEAT_FRACTION | 0.35 | Fallback for train types without a finite seatsPerCar of 0 or more: seats per car are capacityPerCar times this fraction (clamped to 0..1), rounded, and through passengers beyond the seats stand. |
DWELL.DELAY_RECOVERY_MIN_FRACTION | 1 | How short a late train can cut its scheduled dwell to recover delay, as a fraction of the train type stop time plus station extra dwell (1 = no recovery, the shipped default; lower lets a late train dwell for as little as that fraction of the scheduled stop). Never cuts below the passenger-exchange (dynamic dwell) time, and never recovers more than the train is actually late by, so it cannot depart ahead of its original schedule. Clamped to 0..1. |
CONSTRUCTION_COSTS#
Multipliers and line items for construction and maintenance costs.
| Key | Default | Description |
|---|---|---|
CONSTRUCTION_COSTS.TBM_MIN_SEGMENT_COST | 40000000 | TBM mobilization line item in dollars for every contiguous deep-bore blueprint segment. The same amount, up to the raw bore cost, is taken out of track cost, so each segment costs the larger of its raw bore cost and this. |
CONSTRUCTION_COSTS.TUNNEL#
Track cost multipliers by lane count.
| Key | Default | Description |
|---|---|---|
CONSTRUCTION_COSTS.TUNNEL.SINGLE_MULTIPLIER | 0.75 | Cost multiplier for single-lane track. |
CONSTRUCTION_COSTS.TUNNEL.QUAD_MULTIPLIER | 1.5 | Cost multiplier for quad-lane track. |
CONSTRUCTION_COSTS.STATION#
Station cost multipliers.
| Key | Default | Description |
|---|---|---|
CONSTRUCTION_COSTS.STATION.SINGLE_MULTIPLIER | 0.75 | Cost multiplier for single-track preset stations, in construction and maintenance. |
CONSTRUCTION_COSTS.STATION.QUAD_MULTIPLIER | 1.5 | Cost multiplier for quad-track preset stations, in construction and maintenance. |
CONSTRUCTION_COSTS.STATION.PER_TRACK_BASE | 0.5 | Free-form stations: constant term of the per-track cost multiplier. |
CONSTRUCTION_COSTS.STATION.PER_TRACK_MULTIPLIER | 0.25 | Free-form stations: additional cost multiplier per station track. |
CONSTRUCTION_COSTS.STATION.PER_PLATFORM_MULTIPLIER | 0.25 | Free-form stations: the platform factor is 1 plus this times (platforms minus 2), clamped to 0.75..2. Construction only. |
CONSTRUCTION_COSTS.STATION.POCKET_TRACK_COST_MULTIPLIER | 0.25 | Free-form stations with zero platforms (pocket tracks): construction cost multiplier applied in place of the platform factor. |
CONSTRUCTION_COSTS.STATION.LENGTH_COST_FACTOR | 0.25 | Fraction of station construction and maintenance cost that scales with station car capacity relative to the train type maximum (0 = disabled, 1 = fully linear). |
CONSTRUCTION_COSTS.ELEVATION_MULTIPLIERS#
Cost multipliers by construction elevation type.
| Key | Default | Description |
|---|---|---|
CONSTRUCTION_COSTS.ELEVATION_MULTIPLIERS.DEEP_BORE | 4.5 | Deep-bore tunnel cost multiplier. |
CONSTRUCTION_COSTS.ELEVATION_MULTIPLIERS.STANDARD_TUNNEL | 2 | Standard tunnel cost multiplier. |
CONSTRUCTION_COSTS.ELEVATION_MULTIPLIERS.CUT_AND_COVER | 1 | Cut-and-cover cost multiplier (baseline). |
CONSTRUCTION_COSTS.ELEVATION_MULTIPLIERS.TRENCHED | 0.5 | Open-top trench cost multiplier. |
CONSTRUCTION_COSTS.ELEVATION_MULTIPLIERS.AT_GRADE | 0.35 | At-grade (surface) cost multiplier. |
CONSTRUCTION_COSTS.ELEVATION_MULTIPLIERS.RAMP | 0.5 | Ramp / embankment cost multiplier (above the RAMP threshold, below ELEVATED). |
CONSTRUCTION_COSTS.ELEVATION_MULTIPLIERS.ELEVATED | 0.8 | Elevated viaduct cost multiplier. |
CONSTRUCTION_COSTS.WATER_MULTIPLIERS#
Multipliers for construction over water, applied on top of the base elevation multiplier. A value of 0 counts as 1.
| Key | Default | Description |
|---|---|---|
CONSTRUCTION_COSTS.WATER_MULTIPLIERS.DEEP_BORE | 1.44444 | Deep-bore over water. |
CONSTRUCTION_COSTS.WATER_MULTIPLIERS.STANDARD_TUNNEL | 1.5 | Standard tunnel over water. |
CONSTRUCTION_COSTS.WATER_MULTIPLIERS.CUT_AND_COVER | 3 | Cut-and-cover over water. |
CONSTRUCTION_COSTS.WATER_MULTIPLIERS.TRENCHED | 100 | Trenched over water. The cost table shows N/A; the cost model still applies this multiplier. |
CONSTRUCTION_COSTS.WATER_MULTIPLIERS.AT_GRADE | 100 | At-grade over water. The cost table shows N/A; the cost model still applies this multiplier. |
CONSTRUCTION_COSTS.WATER_MULTIPLIERS.RAMP | 2 | Ramp over water (low trestle). |
CONSTRUCTION_COSTS.WATER_MULTIPLIERS.ELEVATED | 2.5 | Elevated viaduct over water. |
CONSTRUCTION_COSTS.ELEVATION_THRESHOLDS#
Elevation boundaries in meters between construction types, which set cost multipliers. TRENCHED, CUT_AND_COVER and ELEVATED also set road, building and water collision limits and where portals and ramps go. The building foundation map layer also floors each building depth at the CUT_AND_COVER depth before coloring it.
| Key | Default | Description |
|---|---|---|
CONSTRUCTION_COSTS.ELEVATION_THRESHOLDS.DEEP_BORE | -100 | Elevation the construction cost table samples for its deep-bore row. The elevation classifier ignores it: deep bore is any elevation at or below STANDARD_TUNNEL. |
CONSTRUCTION_COSTS.ELEVATION_THRESHOLDS.STANDARD_TUNNEL | -24 | At or below this elevation is deep bore; above it, up to CUT_AND_COVER, is standard tunnel. |
CONSTRUCTION_COSTS.ELEVATION_THRESHOLDS.CUT_AND_COVER | -10 | At or below this elevation (above STANDARD_TUNNEL) is standard tunnel; above it, up to TRENCHED, is cut-and-cover. |
CONSTRUCTION_COSTS.ELEVATION_THRESHOLDS.TRENCHED | -4 | At or below this elevation (above CUT_AND_COVER) is cut-and-cover; above it, up to AT_GRADE, is trenched. |
CONSTRUCTION_COSTS.ELEVATION_THRESHOLDS.AT_GRADE | -1 | At or below this elevation (above TRENCHED) is trenched; above it, up to RAMP, is at grade. |
CONSTRUCTION_COSTS.ELEVATION_THRESHOLDS.RAMP | 0 | At or below this elevation (above AT_GRADE) is at grade; above it, below ELEVATED, is ramp. |
CONSTRUCTION_COSTS.ELEVATION_THRESHOLDS.ELEVATED | 5 | At or above this elevation is elevated; below it (above RAMP) is ramp. |
CONSTRUCTION_COSTS.GRADE_CROSSING#
Grade crossing cost multipliers.
CONSTRUCTION_COSTS.GRADE_CROSSING.ROAD_CLASS_MULTIPLIER#
Cost multiplier by road class.
| Key | Default | Description |
|---|---|---|
CONSTRUCTION_COSTS.GRADE_CROSSING.ROAD_CLASS_MULTIPLIER.minor | 1 | Minor road crossing. |
CONSTRUCTION_COSTS.GRADE_CROSSING.ROAD_CLASS_MULTIPLIER.medium | 1.25 | Medium road crossing. |
CONSTRUCTION_COSTS.GRADE_CROSSING.ROAD_CLASS_MULTIPLIER.major | 1.5 | Major road crossing. |
CONSTRUCTION_COSTS.GRADE_CROSSING.ROAD_CLASS_MULTIPLIER.highway | 2 | Highway crossing. |
CONSTRUCTION_COSTS.GRADE_CROSSING.LANE_COUNT_MULTIPLIER#
Cost multiplier by number of track lanes crossing the road. Lane counts not listed use 0.5 plus 0.25 per lane.
| Key | Default | Description |
|---|---|---|
CONSTRUCTION_COSTS.GRADE_CROSSING.LANE_COUNT_MULTIPLIER.1 | 0.75 | Single lane. |
CONSTRUCTION_COSTS.GRADE_CROSSING.LANE_COUNT_MULTIPLIER.2 | 1 | Two lanes. |
CONSTRUCTION_COSTS.GRADE_CROSSING.LANE_COUNT_MULTIPLIER.4 | 1.5 | Four lanes. |
CONSTRUCTION_COSTS.BUILDING_OVERPASS#
Costs and limits for elevated tracks spanning over buildings.
| Key | Default | Description |
|---|---|---|
CONSTRUCTION_COSTS.BUILDING_OVERPASS.VERTICAL_CLEARANCE | 3 | Vertical clearance in meters required between building roof and track deck. |
CONSTRUCTION_COSTS.BUILDING_OVERPASS.COST_PREMIUM | 3 | Multiplier on the elevated per-meter rate over a building span, on top of the span / STANDARD_SPAN factor. Only the cost above the normal elevated rate is charged as the overpass line item. |
CONSTRUCTION_COSTS.BUILDING_OVERPASS.STANDARD_SPAN | 35 | Reference span in meters; superstructure cost scales with span / STANDARD_SPAN. |
CONSTRUCTION_COSTS.BUILDING_OVERPASS.PIER_COST_PER_METER_HEIGHT | 200000 | Straddle-pier cost per meter of building height, per building crossed. |
CONSTRUCTION_COSTS.BUILDING_OVERPASS.MIN_BUILDING_HEIGHT | 3 | Floor in meters on every building height in the building collision index; a building without height data uses the larger of foundation depth times 10 and this. Read once when the city building index loads. |
YARDS#
Train yard rules.
| Key | Default | Description |
|---|---|---|
YARDS.BERTH_OVERHEAD_M | 10 | Clearance in meters added to each train length when packing trains onto berth tracks. |
YARDS.YARD_MAX_LENGTH_MULTIPLIER | 3 | Maximum yard berth length, as this many max-length trains of the train type each plus BERTH_OVERHEAD_M, plus one more BERTH_OVERHEAD_M. Longer drawn yard tracks are trimmed; a generated fan yard applies it to its shortest berth and a through yard to every berth. |
YARDS.MIN_YARD_TRACK_LENGTH_M | 50 | Minimum length in meters of a drawn yard track. Generated yards and station platform train storage also check it. |
YARDS.MAX_BERTHS_PER_YARD | 50 | Maximum number of berths in a generated yard, also the upper limit of the yard builder berth-count control. |
YARDS.DEFAULT_YARD_SPEED_LIMIT | 4.47 | Speed cap in m/s on yard track for train types without a positive finite yardSpeedLimit of their own (4.47 m/s is 10 mph). |
YARDS.CROSSOVER_SLOPE | 6 | How many meters of lead a yard crossover takes per meter of track spacing it shifts across. Lower = shorter, sharper crossovers and a tighter yard throat. |
YARDS.MIN_CROSSOVER_LENGTH_M | 8 | Floor in meters on a yard crossover length. Yard crossovers are never longer than SCISSORS_CROSSOVER_LENGTH. |
YARDS.CROSSOVER_MARGIN_M | 8 | Plain lead run in meters kept clear ahead of and behind the crossover ladder on a yard lead, before the berths branch out. |
YARDS.CROSSOVER_GAP_M | 6 | Longitudinal gap in meters between the end of the longer outer crossover of a quad yard ladder and the start of its middle one, which is staggered closer to the branching. |
YARDS.LADDER_ANGLE_DEG | 45 | Angle in degrees a yard neck climbs off the lead, clamped to 5-45. Lower = a longer, shallower neck that eats more of the drag; higher = a stubbier one that stacks the berth heads up close to the lead. Only applies until the player moves the yard builder’s neck angle dial, which then wins. |
YARDS.LEAD_STUB_M | 12 | Plain lead corridor in meters at each end of a through yard when it has no crossovers. Crossover ladders replace this with their own run. |
YARDS.NO_CROSSOVER_LEAD_M | 5 | Plain multi-track lead in meters ahead of a fan yard throat when auto crossovers are off, before the berths branch out. With crossovers on the crossover ladder supplies this run instead. Through yards use LEAD_STUB_M. |
YARDS.MIN_LADDER_LINK_M | 12 | Minimum distance in meters along the lead from a lead lane end to the head of each yard berth offset sideways from that lane, in fan yards and centered through-yard throats; a berth whose S-curve would end sooner is joined by a single curve to a head at exactly this distance. |
YARDS.LADDER_CURVE_RADIUS_FACTOR | 1.15 | Radius used to plan the ladder curves of a generated yard throat, as a multiple of the train type minTurnRadius, floored at 1 meter. |
YARDS.YARD_TRACK_COST_MULTIPLIER | 1 | Multiplier on the construction and maintenance cost of yard track, which is otherwise priced like running track of the same length, elevation and lane count. |
STARTING_MONEY_BY_DIFFICULTY#
Money in dollars the player starts a new game with, by the city difficulty shown on the city-select screen. A city with no rating, or a tier set to 0, falls back to STARTING_MONEY. The same figure funds each multiplayer company after the first. The tutorial replaces it with its own budget and sandbox mode with Number.MAX_SAFE_INTEGER.
| Key | Default | Description |
|---|---|---|
STARTING_MONEY_BY_DIFFICULTY.very-easy | 1000000000 | Starting money in a very easy city. |
STARTING_MONEY_BY_DIFFICULTY.easy | 2000000000 | Starting money in an easy city. |
STARTING_MONEY_BY_DIFFICULTY.medium | 3000000000 | Starting money in a medium city. |
STARTING_MONEY_BY_DIFFICULTY.hard | 4000000000 | Starting money in a hard city. |
STARTING_MONEY_BY_DIFFICULTY.very-hard | 5000000000 | Starting money in a very hard city. |
STREET_RUNNING#
Rules for street-running (tram) tracks.
| Key | Default | Description |
|---|---|---|
STREET_RUNNING.ROAD_SNAP_DISTANCE | 15 | Distance in meters within which the track-drawing cursor snaps to a non-highway road, when street running is on and the train type may cross roads at grade. |
STREET_RUNNING.ROAD_SNAP_BREAKAWAY_DISTANCE | 35 | Distance in meters from the road beyond which a snapped cursor breaks away. Also the search radius for the roads along a new street-running track and for roads beside at-grade track in road-collision checks. |
STREET_RUNNING.COST_MULTIPLIER | 3.5 | Construction cost multiplier for street-running track. |
STREET_RUNNING.EXCLUSIVE_ROW_COST_MULTIPLIER | 1.5 | Not read by the game. |
STREET_RUNNING.ELEVATION_TOLERANCE | 0.01 | Road-collision checks let track within this many meters of elevation 0 cross or run along non-highway roads, for train types allowed on roads. |
ROAD_SPEED_LIMITS#
Speed limits in m/s by road class for roads with no maxspeed of their own. A street-running track stores the average limit of the roads sampled along it when built, or the limit of the road the drawing cursor snapped to when sampling finds none, and trains on it are capped at that speed.
| Key | Default | Description |
|---|---|---|
ROAD_SPEED_LIMITS.highway | 29.1 | Highway speed limit; never applied, since street-running track cannot follow highways. |
ROAD_SPEED_LIMITS.major | 20.1 | Major road speed limit. |
ROAD_SPEED_LIMITS.medium | 15.6 | Medium road speed limit. |
ROAD_SPEED_LIMITS.minor | 11.2 | Minor road speed limit. |
MARKER_ROUTE_BULLETS#
Sizing for the route bullet row shown under station and station-group markers on the map.
| Key | Default | Description |
|---|---|---|
MARKER_ROUTE_BULLETS.TEXT_SIZE_MULTIPLIER | 0.8 | Bullet text size as a fraction of the bullet icon size. |
MARKER_ROUTE_BULLETS.CHAR_WIDTH_RATIO | 0.62 | Approximate width of one bullet character as a fraction of the font size, used to project bullet widths. |
MARKER_ROUTE_BULLETS.ICON_GAP_PX | 2 | Horizontal gap in pixels between bullets in the row. |
MARKER_ROUTE_BULLETS.MAX_ROW_WIDTH_PX | 300 | The entire bullet row is hidden when its projected width exceeds this many pixels. |
SOUND_SETTINGS#
Station crowd ambience settings.
| Key | Default | Description |
|---|---|---|
SOUND_SETTINGS.NEAR_STATIONS_THRESHOLD | 1000 | Radius in meters around the camera center within which constructed stations with routes produce crowd ambience. Volume falls linearly to zero as the nearest station distance plus a zoom-based camera height term reaches this value. |
SOUND_SETTINGS.CROWD_MAX_VOLUME | 0.25 | Peak volume (0-1) of the station crowd ambience; the volume is this times the distance falloff to the nearest constructed station with routes. |
WARNING_CONSTS#
Thresholds and lifetimes for train capacity warnings.
| Key | Default | Description |
|---|---|---|
WARNING_CONSTS.CAPACITY_WARNING_THRESHOLD | 50 | A train with at most this many empty spots triggers a capacity warning, when the reduced-threshold feature flag is enabled. Lower = warns only when nearly full. |
WARNING_CONSTS.CAPACITY_WARNING_THRESHOLD_OLD | 100 | The capacity warning threshold used when the reduced-threshold feature flag is disabled (the default). |
WARNING_CONSTS.CAPACITY_WARNING_DURATION | 900 | How long in game seconds a train warning (capacity or stuck passengers) is kept before it expires. |
BOND_TYPES#
The bond offerings players can issue for financing. Interest accrues on the remaining principal. Already-issued bonds keep the terms they were issued with.
BOND_TYPES.SMALL#
Small bond ($100M at 6%).
| Key | Default | Description |
|---|---|---|
BOND_TYPES.SMALL.displayName | $100M Bond | Display name shown in the financial dashboard. |
BOND_TYPES.SMALL.principal | 100000000 | Amount borrowed in dollars. |
BOND_TYPES.SMALL.interestRate | 0.06 | Daily interest rate on the remaining principal (0.06 = 6% per day), charged hourly at 1/24 of the daily rate. |
BOND_TYPES.SMALL.principalPaymentRate | 0.001 | Fraction of the original principal repaid every game hour. |
BOND_TYPES.SMALL.requiredDailyRevenue | 10000000 | Previous day's revenue in dollars required to issue this bond. |
BOND_TYPES.MEDIUM#
Medium bond ($500M at 4%).
| Key | Default | Description |
|---|---|---|
BOND_TYPES.MEDIUM.displayName | $500M Bond | Display name shown in the financial dashboard. |
BOND_TYPES.MEDIUM.principal | 500000000 | Amount borrowed in dollars. |
BOND_TYPES.MEDIUM.interestRate | 0.04 | Daily interest rate on the remaining principal (0.04 = 4% per day), charged hourly at 1/24 of the daily rate. |
BOND_TYPES.MEDIUM.principalPaymentRate | 0.0008 | Fraction of the original principal repaid every game hour. |
BOND_TYPES.MEDIUM.requiredDailyRevenue | 100000000 | Previous day's revenue in dollars required to issue this bond. |
BOND_TYPES.LARGE#
Large bond ($1B at 2%).
| Key | Default | Description |
|---|---|---|
BOND_TYPES.LARGE.displayName | $1B Bond | Display name shown in the financial dashboard. |
BOND_TYPES.LARGE.principal | 1000000000 | Amount borrowed in dollars. |
BOND_TYPES.LARGE.interestRate | 0.02 | Daily interest rate on the remaining principal (0.02 = 2% per day), charged hourly at 1/24 of the daily rate. |
BOND_TYPES.LARGE.principalPaymentRate | 0.0006 | Fraction of the original principal repaid every game hour. |
BOND_TYPES.LARGE.requiredDailyRevenue | 200000000 | Previous day's revenue in dollars required to issue this bond. |
BONDS#
Bounds for the custom bond principal slider.
| Key | Default | Description |
|---|---|---|
BONDS.MIN_PRINCIPAL | 100000000 | Lowest principal the custom bond slider can issue, in dollars. |
BONDS.MAX_PRINCIPAL | 2000000000 | Highest principal the custom bond slider can issue, in dollars. |
BONDS.PRINCIPAL_STEP | 50000000 | Slider step size for the custom bond principal, in dollars. |
GAME_SECONDS_PER_SECOND#
Target in-game seconds per real second at each speed tier. Values must be positive finite numbers; bad values fall back to the shipped defaults.
| Key | Default | Description |
|---|---|---|
GAME_SECONDS_PER_SECOND.slow | 1 | In-game seconds per real second at slow speed (real time). |
GAME_SECONDS_PER_SECOND.normal | 25 | In-game seconds per real second at normal speed. |
GAME_SECONDS_PER_SECOND.fast | 250 | In-game seconds per real second at fast speed. |
GAME_SECONDS_PER_SECOND.ultrafast | 500 | Nominal in-game seconds per real second at ultrafast speed. Ultrafast runs uncapped, as fast as the machine allows, so this value does not set its speed. |
TICKS_PER_UPDATE#
Tick batching per speed tier. Values are rounded down to whole numbers and capped at MAX_TICKS_PER_UPDATE; a value below 1 or not a finite number falls back to the shipped default. The real-time interval between updates scales with gameState, so the target rate of game time is unchanged by it.
TICKS_PER_UPDATE.slow#
Tick batching at the slow speed tier.
| Key | Default | Description |
|---|---|---|
TICKS_PER_UPDATE.slow.gameState | 1 | Ticks of train, signal, and station simulation run per update at slow speed. The real-time interval between updates scales with this. |
TICKS_PER_UPDATE.slow.trainCoords | 1 | Unused: train coordinates are recalculated once per update, on its final tick. |
TICKS_PER_UPDATE.slow.popMovement | 2 | Pops travelling through the network update every this many ticks at slow speed, and also on the last tick of each update and at the start of each commute interval. |
TICKS_PER_UPDATE.slow.popMovementGeojson | 2 | Unused: the pop movement map layer rebuilds on the final tick of an update, throttled by wall-clock time. |
TICKS_PER_UPDATE.normal#
Tick batching at the normal speed tier.
| Key | Default | Description |
|---|---|---|
TICKS_PER_UPDATE.normal.gameState | 1 | Ticks of train, signal, and station simulation run per update at normal speed. The real-time interval between updates scales with this. |
TICKS_PER_UPDATE.normal.trainCoords | 1 | Unused: train coordinates are recalculated once per update, on its final tick. |
TICKS_PER_UPDATE.normal.popMovement | 2 | Pops travelling through the network update every this many ticks at normal speed, and also on the last tick of each update and at the start of each commute interval. |
TICKS_PER_UPDATE.normal.popMovementGeojson | 2 | Unused: the pop movement map layer rebuilds on the final tick of an update, throttled by wall-clock time. |
TICKS_PER_UPDATE.fast#
Tick batching at the fast speed tier.
| Key | Default | Description |
|---|---|---|
TICKS_PER_UPDATE.fast.gameState | 16 | Ticks of train, signal, and station simulation run per update at fast speed. The real-time interval between updates scales with this. |
TICKS_PER_UPDATE.fast.trainCoords | 8 | Unused: train coordinates are recalculated once per update, on its final tick. |
TICKS_PER_UPDATE.fast.popMovement | 8 | Pops travelling through the network update every this many ticks at fast speed, and also on the last tick of each update and at the start of each commute interval. |
TICKS_PER_UPDATE.fast.popMovementGeojson | 16 | Unused: the pop movement map layer rebuilds on the final tick of an update, throttled by wall-clock time. |
TICKS_PER_UPDATE.ultrafast#
Tick batching at the ultrafast speed tier.
| Key | Default | Description |
|---|---|---|
TICKS_PER_UPDATE.ultrafast.gameState | 32 | Ticks of train, signal, and station simulation run per update at ultrafast speed. The real-time interval between updates scales with this. |
TICKS_PER_UPDATE.ultrafast.trainCoords | 16 | Unused: train coordinates are recalculated once per update, on its final tick. |
TICKS_PER_UPDATE.ultrafast.popMovement | 16 | Pops travelling through the network update every this many ticks at ultrafast speed, and also on the last tick of each update and at the start of each commute interval. |
TICKS_PER_UPDATE.ultrafast.popMovementGeojson | 32 | Unused: the pop movement map layer rebuilds on the final tick of an update, throttled by wall-clock time. |
Pathfinding Rules Reference#
Every rule in PATHFINDING_RULES, its default value, and what it does. Also generated from the game's rule definitions.
| Key | Default | Description |
|---|---|---|
MAX_TRANSFERS | 4 | Maximum number of transfers per commute transit journey. Routes can be split into multiple internal RAPTOR routes, so a transfer can also mean two legs on the same route. |
MAX_WALK_TO_FROM_STATION | 2700 | Maximum walking time in seconds from origin or destination to the first or last station. Sets the walk catchment of a station, times its station type catchmentMultiplier unless the type sets catchmentOverride. |
MAX_DRIVE_TO_FROM_STATION | 420 | Maximum driving time in seconds from origin to the first station for drive-to-station (park & ride) access, used only when the Drive-to-Station Access feature flag is on (off by default). Each station type scales it by the ratio of its walk catchment to MAX_WALK_TO_FROM_STATION, or by its catchmentMultiplier when MAX_WALK_TO_FROM_STATION is 0 or below. |
MAX_TRANSFER_WALKING_TIME | 600 | Maximum walking time in seconds between stations when transferring, times the station type transferRadiusMultiplier unless the type sets transferRadiusOverride. |
FUTURE_CYCLE_TIME_OFFSET | 7200 | Look-ahead in seconds for the expected stop times a train stores when generated, which pathfinding reads: floor(this / route cycle time) future cycles, at least MIN_FUTURE_CYCLES. |
MIN_FUTURE_CYCLES | 2 | Minimum number of future route cycles of expected stop times a train computes when generated, used when FUTURE_CYCLE_TIME_OFFSET covers fewer. |
DRIVING_COST_PER_KM | 0.65 | Money cost in dollars per kilometer driven in mode choice; PARKING_COST is added separately. |
MIN_SENSIBLE_DRIVING_DISTANCE | 1000 | Drives shorter than this many meters have their mode-choice cost multiplied by 1 plus the shortfall as a fraction of this distance. |
PARKING_TIME | 180 | Seconds of parking at each end of a car trip, added to perceived driving time at the PARKING_SEARCH_MULTIPLIER weight. |
PARKING_COST | 5 | Parking cost in dollars added to the money cost of every car trip in mode choice, times AIRPORT_PARKING_COST_MULTIPLIER for airport pops. |
ARRIVAL_GAP | 50 | Seconds before the timetable departure at which each ride leg of a planned journey starts. |
RANGE_QUERY_WINDOW | 1800 | rRAPTOR range window in seconds. Besides the requested time, the pathfinder tries a later start for every train departure from an access station, other than at the last stop of a route, within this long after the pop could first reach that station, timed to reach it as the train leaves, keeping at most MAX_RANGE_DEPARTURES start times in all. |
MAX_RANGE_DEPARTURES | 24 | Cap on how many departure times a single range query evaluates. |
INCOME_MEAN | 60000 | Mean in dollars per year of the bell curve that assigns incomes to the people in each pop for mode choice. |
INCOME_STD_DEV | 25000 | Standard deviation in dollars per year of the bell curve that assigns incomes to the people in each pop for mode choice. |
MINIMUM_INCOME | 15000 | Floor for generated pop incomes, in dollars per year. |
MAXIMUM_INCOME | 200000 | Ceiling for generated pop incomes, in dollars per year. |
HOURS_WORKED_PER_YEAR | 1860 | Hours worked per year, used to convert annual income into an hourly value of time for mode choice. |
AIRPORT_INCOME_MULTIPLIER | 1.5 | Multiplier on INCOME_MEAN for airport pops. |
AIRPORT_PARKING_COST_MULTIPLIER | 5 | Airport pops pay this many times the normal PARKING_COST. |
COLLEGE_INCOME_MULTIPLIER | 0.6 | Multiplier on INCOME_MEAN for college pops. |
MIN_TRANSIT_CHOICE | 10 | If fewer than this many people in one pop (a home-to-work commuter group) choose transit, those riders all drive instead. |
PERCEIVED_TIME#
Weights on each part of a trip relative to a minute riding a train (1.0). Pathfinding ranks transit journeys by this perceived time and mode choice compares it with perceived driving time.
| Key | Default | Description |
|---|---|---|
PERCEIVED_TIME.WALK_MULTIPLIER | 1.39 | Weight on a minute of walking in a transit journey, relative to a minute riding. |
PERCEIVED_TIME.AIRPORT_WALK_MULTIPLIER | 1.87 | Walk weight for airport pops: their transit paths are re-scored with it in place of WALK_MULTIPLIER after pathfinding, and their walk-only trips are weighted by it. Clock walking time is unchanged. |
PERCEIVED_TIME.WAIT_MULTIPLIER | 1.37 | Weight on a minute of waiting between legs of a transit journey, such as on a platform, relative to a minute riding. |
PERCEIVED_TIME.LATE_MULTIPLIER | 3.01 | Weight on each second a ride takes beyond its booked ride time, giving the perceived extra delay shown in the reliability, route details and perceived time panels and returned by the modding API; journey ranking and mode choice do not read it. |
PERCEIVED_TIME.DEPARTURE_SHIFT_MULTIPLIER | 0.4 | Cost per second of departing later than requested (displacement time), e.g. a pop waiting at home for a better train. |
PERCEIVED_TIME.CONGESTED_DRIVING_MULTIPLIER | 1.33 | Weight on the congested share of driving time (see CONGESTION_FULL_AT_MULTIPLIER). |
PERCEIVED_TIME.CONGESTION_FULL_AT_MULTIPLIER | 2 | Traffic multiplier at which the whole car trip counts as congested; the congested share rises linearly from 0 at a multiplier of 1. |
PERCEIVED_TIME.PARKING_SEARCH_MULTIPLIER | 1.6 | Weight on parking time (PARKING_TIME at each end) in perceived driving time. |
DRIVING_TIMES#
Traffic multipliers on driving times by time-of-day demand level, taken from the higher of the home and work demand of the departure hour. A value of 1.5 means drives take 1.5 times their base time.
| Key | Default | Description |
|---|---|---|
DRIVING_TIMES.VERY_LOW_DEMAND | 0.8 | Overnight traffic multiplier. |
DRIVING_TIMES.LOW_DEMAND | 0.9 | Early morning / late evening traffic multiplier. |
DRIVING_TIMES.LOW_MEDIUM_DEMAND | 1 | Midday baseline traffic multiplier. |
DRIVING_TIMES.MEDIUM_DEMAND | 1.25 | Shoulder-peak traffic multiplier. |
DRIVING_TIMES.HIGH_DEMAND | 1.5 | Rush hour traffic multiplier. |
Map Visuals Reference#
Every value in GAME_COLORS, its default, and what it does. Also generated from the game's own definitions. Most deck.gl map layers and the station markers receive the map zoom rounded to a tenth, so a zoom threshold they read takes effect on the rounded zoom; the interchange pills read the exact zoom.
| Key | Default | Description |
|---|---|---|
MIN_TRACK_BASE_PIXEL_WIDTH | 1.5 | Minimum on-screen width in pixels of route lines and of the track speeds, route speeds, elevations, types, TPH, cant and owners layers, and the width of simplified route lines (doubled for highlighted routes). The track base slab, trains, signals, journey highlight and track hover highlight derive their minimum widths from it. |
MIN_ROAD_PIXEL_WIDTH | 0.5 | Minimum on-screen width in pixels of road and road bridge lines. |
MIN_LINE_WIDTH_MODIFIER | 1 | Not read by the game. |
LINE_WIDTH_MODIFIER | 2 | Not read by the game. |
OFFSET_MULTIPLIER | 1.5 | Not read by the game. |
JOURNEY_LINE_WIDTH_MODIFIER | 2 | Not read by the game. |
STATION_MARKER_WIDTH_MODIFIER | 5 | Not read by the game. |
TRAIN_PATH_WIDTH_MODIFIER | 1.25 | Not read by the game. |
PICKABLE_TRACK_WIDTH_MODIFIER | 3 | Multiplier on TRACK_WIDTH for the line width of the track speeds, elevations, types, TPH and cant layers outside construction mode, and of the track owners layer. The route speeds layer draws at twice that width and the track hover highlight at 1.6 times. |
SIMPLE_ROUTE_ZOOM | 13 | The zoom at and below which the map draws simplified route lines in place of track-accurate ones, when the Portolan diagram is not drawn and no route edit is open. With the diagram drawn, PORTOLAN.ROUTE_ZOOM sets the switch. |
STATION_GROUP_DISTANCE_THRESHOLD | 150 | Distance in meters, between visual centers where the map has them, that the station grouping pass compares station pairs against: only a pair at or under it is merged by distance, and the pass skips a merge when the player separated the two stations it is comparing. Stations with noBoarding join no group. |
STATION_MARKER_HOVER_RESIZE | 1.15 | The factor by which station markers are resized when hovered. |
RAIL_CROSSING_MARKER_SIZE_PX | 20 | Width and height in screen pixels of the traffic-light marker drawn where two railways cross at grade. Read each time the markers render. |
ROAD_STRUCTURES#
Rendering of road structures: how bridge and tunnel road segments are drawn differently from surface roads. All values are read as the map redraws.
| Key | Default | Description |
|---|---|---|
ROAD_STRUCTURES.TUNNEL_ALPHA | 128 | Alpha (0 to 255) of tunnel road segments. |
ROAD_STRUCTURES.BRIDGE_OPACITY | 0.5 | Opacity (0 to 1) of the bridge casing and bridge fill lines drawn over road bridges, multiplied by the road class zoom fade. |
ROAD_STRUCTURES.BRIDGE_CASING_WIDTH_EXTRA | 4 | Meters added to the road width for the width of the bridge casing line. |
MODE_COLORS#
Colors for travel modes, used in charts and the demand map key.
| Key | Default | Description |
|---|---|---|
MODE_COLORS.transit | "#0000FF" | Transit trips. |
MODE_COLORS.driving | "#FF0000" | Driving trips. |
MODE_COLORS.walking | "#00FF00" | Walking trips. |
MODE_COLORS.unknown | "#6e6e6e" | Fallback for trips with an unknown mode. |
TRACK_ARROWS#
The directional arrows drawn along tracks and routes when the track arrows layer is on and the zoom, rounded to a tenth, is at or above ENABLED_ZOOM. Track arrows draw on track lines and route arrows on route lines. All values are read as the map redraws.
| Key | Default | Description |
|---|---|---|
TRACK_ARROWS.ENABLED_ZOOM | 15.5 | The zoom, compared after rounding the map zoom to a tenth, at and above which the arrows draw. |
TRACK_ARROWS.SEGMENT_INTERVAL | 5 | Draw an arrow every this many subdivided segments. Larger means more spacing between arrows. |
TRACK_ARROWS.LENGTH | 2 | Arrow length in half arrow-line widths, measured from the start of each arrowed segment: 2 draws an arrow as long as its line is wide. |
TRACK_ARROWS.TRACK_WIDTH | 4 | Width in meters of the arrows drawn on tracks. |
TRACK_ARROWS.TRACK_WIDTH_MIN_PIXELS | 4 | Minimum on-screen width in pixels of the arrows drawn on tracks. |
TRACK_ARROWS.ROUTE_WIDTH | 6 | Width in meters of the arrows drawn on routes. |
TRACK_ARROWS.ROUTE_WIDTH_MIN_PIXELS | 6 | Minimum on-screen width in pixels of the arrows drawn on routes. |
JOURNEY_WALK_DOTS#
The dotted walk and drive legs of a highlighted journey on the map (a hovered or expanded journey card, a hovered nearby station, or the first journey planner result). Walk legs follow the pedestrian road network where the city walk graph has a path; other legs draw straight. RADIUS_PX and the colors are read as the map redraws.
| Key | Default | Description |
|---|---|---|
JOURNEY_WALK_DOTS.SPACING_M | 45 | Target meters between dots along a leg: each leg splits into a whole number of equal gaps, at most 400. Read when the dot positions recompute (the highlighted journey or the network changes). |
JOURNEY_WALK_DOTS.RADIUS_PX | 2.5 | Dot radius in pixels. |
JOURNEY_WALK_DOTS.COLOR_DARK | "#c8cdd6" | Dot fill color on the dark map style. |
JOURNEY_WALK_DOTS.COLOR_LIGHT | "#5a5f69" | Dot fill color on the light map style. |
TRACK_DETAIL#
Zoomed-in procedural track appearance with the Detailed tracks graphics setting on: twin rails, crossties and catenary drawn in the track shader. The shader and the Detailed tracks line width read these once at app load; the base-slab fade reads FADE_START_ZOOM, FADE_FULL_ZOOM and BASE_FADE_COLOR as the map redraws.
| Key | Default | Description |
|---|---|---|
TRACK_DETAIL.FADE_START_ZOOM | 17 | Map zoom level at which rail and tie detail starts fading in. |
TRACK_DETAIL.FADE_FULL_ZOOM | 18 | Map zoom level at which rail and tie detail reaches full strength (and the base slab is fully faded to BASE_FADE_COLOR). |
TRACK_DETAIL.RAIL_WIDTH_M | 0.3 | Width in meters of each drawn railhead. |
TRACK_DETAIL.RAIL_COLOR | "#7c8087" | Hex base color of the railheads at full detail. The shader lights each rail as a cylinder, from 35 percent of this color at the edges up to this color plus a bright highlight along the center. |
TRACK_DETAIL.TIE_SPACING_M | 0.81 | Center-to-center spacing in meters between crossties. |
TRACK_DETAIL.TIE_WIDTH_M | 0.25 | Width in meters of each crosstie along the track. |
TRACK_DETAIL.TIE_OVERHANG_M | 0.43 | How far in meters each crosstie extends past each rail centerline. The rail centerlines sit TRACK_WIDTH apart (1.435 m as shipped). |
TRACK_DETAIL.BED_SHOULDER_M | 0.2 | Margin in meters beyond the tie ends on each side. With Detailed tracks on, track lines draw wide enough to hold this margin on both sides at every zoom, and the margin turns transparent as the rail and tie detail fades in. |
TRACK_DETAIL.TIE_COLOR | "#4d3a27" | Hex color of the crossties at full detail, darkened by up to 35 percent beside each rail. |
TRACK_DETAIL.BASE_FADE_COLOR | "#d6d6d8" | Hex color the track base slab blends to over the FADE_START_ZOOM to FADE_FULL_ZOOM window with Detailed tracks on; it shows through the open track between the ties. |
TRACK_DETAIL.CATENARY_SPACING_M | 35 | Spacing in meters between catenary mast cross-spans, on tracks whose train type sets appearance.catenary. |
TRACK_DETAIL.CATENARY_WIRE_WIDTH_M | 0.15 | Width in meters of the overhead contact wire drawn along the track centerline. |
TRACK_DETAIL.CATENARY_COLOR | "#2f3237" | Hex color of the catenary contact wire and mast cross-spans. |
PORTOLAN#
The Portolan schematic diagram for visually interlined routes: the merged, offset route ribbons the map draws in place of track-accurate lines when visual interlining is on, no route edit is open and the zoom is at or below ROUTE_ZOOM. These control how the diagram is presented; the geometry itself comes from the diagram build.
| Key | Default | Description |
|---|---|---|
PORTOLAN.ROUTE_ZOOM | 15 | Above this zoom the map draws track-accurate route lines in place of the diagram, and the diagram interchange markers stop drawing. Read as the map redraws. |
PORTOLAN.MARKER_ZOOM | 11 | The zoom at and above which the diagram interchange markers draw, up to ROUTE_ZOOM. Their size follows MARKER_ICON_SCALE_STOPS. Read as the map redraws. |
PORTOLAN.CATERPILLARS#
The caterpillars: route bullets chained along the diagram ribbons, and route-name lettering along a ribbon for routes drawn as text. They show only with visual interlining and the Show route bullets along lines setting both on.
| Key | Default | Description |
|---|---|---|
PORTOLAN.CATERPILLARS.ENABLED | true | Whether the caterpillars draw at all. Off hides the bullets and the route-name lettering; the ribbons and interchange pills stay. Read as the map redraws. |
PORTOLAN.CATERPILLARS.MIN_ZOOM | 12 | The zoom at and above which the caterpillars draw. Read as the map redraws. |
PORTOLAN.CATERPILLARS.MAX_BULLET_CHARS | 1 | Longest caterpillar label, in characters, that draws as a bullet on the chain. Longer labels draw as route-name lettering along the ribbon unless the route form sets a style for that route, and the route form shows this choice as its automatic style. Read as the map redraws. |
PORTOLAN.CATERPILLARS.BULLET_HEIGHT | 10 | Bullet height in CSS pixels, the same at every zoom, before the Route line width setting multiplies it. Hexagon, octagon, diamond and triangle bullets grow from it to hold their glyphs, and a bullet other than a triangle whose label does not fit 1:1 (anything but one character or two digits) draws at nine tenths of this height. Drawn bullets are cached per height, so a change applies as bullets rasterise. |
PORTOLAN.CATERPILLARS.BULLET_FONT | "600 7.5px system-ui, sans-serif" | Canvas font shorthand for the glyphs inside the bullets, also used to measure word-pill widths. Its pixel size does not follow BULLET_HEIGHT. Drawn bullets are cached per font, so a change applies as bullets rasterise. |
PORTOLAN.CATERPILLARS.TEXT_FAMILY | "system-ui, sans-serif" | Font family of the route-name lettering riding the ribbons. Also the face the glyph advances are measured with, so the lettering is always spaced by the font it draws in. |
PORTOLAN.CATERPILLARS.TEXT_WEIGHT | "italic 700" | CSS font style and weight of the route-name lettering, also used to measure its glyph advances. |
PORTOLAN.CATERPILLARS.HOVER_ALPHA | 100 | Alpha (0 to 255) of every bullet and letter of the caterpillar route under the pointer. Clicking the caterpillar of a route opens the route details panel for it, or closes that panel when the route is already open; agency labels do not react. Read as the map redraws. |
PORTOLAN.CATERPILLARS.TEXT_SIZE_STOPS#
Route-name lettering size in pixels by zoom, interpolated linearly and held flat outside the listed stops, then multiplied by the Route line width setting. Read as the map redraws.
[
{
"zoom": 12,
"size": 10
},
{
"zoom": 16,
"size": 13
}
]PORTOLAN.BANDS#
Zoom bands, widest-zoom first. Each band draws the diagram build features whose zoom range covers its min, and one band draws at a time: a camera at zoom z draws the first band whose min is at or below z, and max is not read. A change to min moves the band switch on the next redraw and re-slices the bands at the next diagram build. Caterpillar bullets carry the band key of the build and draw only in the band with that key, so keep the keys as shipped.
[
{
"key": 15,
"min": 15,
"max": 24
},
{
"key": 14,
"min": 14,
"max": 15
},
{
"key": 13,
"min": 13,
"max": 14
},
{
"key": 0,
"min": 0,
"max": 13
}
]PORTOLAN.BAND_GAP_SCALE#
Not read by the game.
{
"0": 0.75,
"13": 0.85,
"14": 0.95,
"15": 1
}PORTOLAN.OFFSET_SCALE_STOPS#
How far a ribbon sits from its bundle centre, as a fraction of the offset baked into the build, interpolated linearly by zoom and held flat outside the listed stops. The Route line width setting multiplies it, and it doubles while Merge routes by bullet is on. The caterpillar bullets, and route names too long to bend along their ribbon, sit on a z11 to z14 ramp fixed by the build, so moving these stops drifts them off the line they label. Read as the map redraws.
[
{
"zoom": 11,
"scale": 1
},
{
"zoom": 14,
"scale": 0.8
}
]PORTOLAN.RIBBON_WIDTH_STOPS#
On-screen ribbon width in pixels by zoom, interpolated linearly and held flat outside the listed stops, then multiplied by the Route line width setting. Station dots also follow this curve: their diameter scales by the ribbon width relative to its zoom-14 value. Read as the map redraws.
[
{
"zoom": 7,
"width": 1
},
{
"zoom": 10,
"width": 1.5
},
{
"zoom": 13,
"width": 2
},
{
"zoom": 15,
"width": 3
},
{
"zoom": 16,
"width": 3.6
}
]PORTOLAN.MARKER_ICON_SCALE_STOPS#
Size of the diagram interchange pills by zoom, as a fraction of full size, interpolated linearly and held flat outside the listed stops, capped at STATION_MARKER.MAX_DIAMETER over PILL_DIAMETER, then multiplied by the Route line width setting. Station dots scale by RIBBON_WIDTH_STOPS. Read as the map redraws.
[
{
"zoom": 11,
"scale": 0.38
},
{
"zoom": 12,
"scale": 0.5
},
{
"zoom": 14,
"scale": 1
}
]STATION_MARKER#
The station mark: the dots the map draws on stations, and the diagram interchange pills that replace those dots on an interchange. Dots scale with zoom by PORTOLAN.RIBBON_WIDTH_STOPS relative to zoom 14 and pills by PORTOLAN.MARKER_ICON_SCALE_STOPS; the Route line width setting multiplies both, and they share BORDER_WIDTH and BORDER_DARK.
| Key | Default | Description |
|---|---|---|
STATION_MARKER.DOT_DIAMETER | 8 | Diameter in screen pixels of the ordinary station dot at zoom 14. At other zooms it scales by PORTOLAN.RIBBON_WIDTH_STOPS relative to the ribbon width at zoom 14, held under MAX_DIAMETER, then multiplied by the Route line width setting. Read as the map redraws. |
STATION_MARKER.SELECTED_DOT_DIAMETER | 10 | Diameter in screen pixels, at zoom 14, of the enlarged dot on emphasised stops: the open station, the stops of the selected route, and journey stops. Follows the ribbon-width curve at other zooms, the same way as DOT_DIAMETER. Read as the map redraws. |
STATION_MARKER.PILL_DIAMETER | 8 | Height in screen pixels of the diagram interchange pill at full size, which is also twice its corner radius: the pill is a dot of this diameter stretched along its bundle. Scaled by PORTOLAN.MARKER_ICON_SCALE_STOPS, which reaches full size at zoom 14 as shipped. Read as the map redraws. |
STATION_MARKER.MAX_DIAMETER | 9 | Ceiling in screen pixels on a station mark before the Route line width setting multiplies it. The dot zoom curve is clamped where the ordinary dot would pass this, so the selected dot stops growing at the same zoom (its ceiling is this times SELECTED_DOT_DIAMETER over DOT_DIAMETER). The pill height is capped at this too, though the shipped pill ramp already tops out at PILL_DIAMETER. Read as the map redraws. |
STATION_MARKER.BORDER_WIDTH | 1 | Ring thickness in screen pixels of station dots at every zoom. The diagram pill draws its ring into an image that the zoom ramp then shrinks, so that ring is drawn at this width divided by the ramp scale rounded to a tenth (at least 0.1). Read as the map redraws. |
STATION_MARKER.BORDER_DARK | "black" | Ring color on white station dots and on diagram pills in both themes, and on every station dot in the dark theme. Any CSS color. Read as the map redraws. |
STATION_MARKER.BORDER_LIGHT | "white" | Ring color on station dots that are not white, in the light theme. Any CSS color. Read as the map redraws. |
STATION_MARKER.GROUP_DOT_SPLIT_SPREAD_PX | 12 | Two stations of one complex share a dot while they sit within this many screen pixels of each other, measured at the zoom stepped by GROUP_DOT_SPLIT_ZOOM_STEP. Stations join transitively, so a chain of close stations is one dot. Read as the map redraws. |
STATION_MARKER.GROUP_DOT_SPLIT_MIN_ZOOM | 12 | Below this zoom a complex always draws one merged dot; at or above it, GROUP_DOT_SPLIT_SPREAD_PX decides dot by dot. The map draws station groups only below zoom 16, so 16 or higher turns splitting off. Read as the map redraws. |
STATION_MARKER.PILL_OFF_CORRIDOR_M | 15 | Sideways distance in meters a station mark may sit from the corridor line its diagram interchange pill was measured on; past it the pill does not draw and the stop keeps its ordinary dot. Distance along the corridor does not count. Read as the map redraws. |
STATION_MARKER.FADE_MS | 250 | How long station dots, labels and diagram interchange pills take to fade in and out when they appear or disappear (zoom thresholds, label collision, pills standing in for dots), in milliseconds. 0 makes them pop instantly. Read as the map redraws. |
STATION_MARKER.LABEL_ZOOM | 14 | The zoom above which every station may draw its name, with collision deciding which names fit and importance setting priority. At or below it, only complexes (above zoom 12) and stops on the selected route or a journey (from zoom 11) may label, and they must clear an importance cutoff that journey stops skip; the open station may label at any zoom. Read as the map redraws. |
STATION_MARKER.GROUP_DOT_SPLIT_ZOOM_STEP | 2 | Zoom step for dot clustering: at or above GROUP_DOT_SPLIT_MIN_ZOOM, the camera zoom rounds down to that minimum plus a whole number of steps before the on-screen gaps are measured, so clusters change only at step edges. 0 or less measures at the camera zoom. Read as the map redraws. |
EDIT_ROUTE_MARKER#
The route editor's add/remove-stop controls: one clickable dot per station track, drawn as GPU layers while a route edit is live. During the tutorial the route editor keeps DOM markers, which do not read these values. Multi-track stations spread their dots into a row running across the corridor. The whole control shrinks and tightens as the camera pulls out, between MIN_SIZE_ZOOM and FULL_SIZE_ZOOM.
| Key | Default | Description |
|---|---|---|
EDIT_ROUTE_MARKER.DOT_RADIUS_PX | 10 | Radius in screen pixels of one add/remove-stop dot at full size (FULL_SIZE_ZOOM and in). Zoomed out it shrinks toward MIN_SCALE of this. Read when the edit-mode controls rebuild. |
EDIT_ROUTE_MARKER.ROW_SPACING_PX | 13 | Centre-to-centre spacing in screen pixels between neighbouring dots of a multi-track station row, at full size (FULL_SIZE_ZOOM and in). Spacing below the dot diameter overlaps the dots. Zoomed out it shrinks toward SPACING_MIN_SCALE of this. Read when the edit-mode controls rebuild. |
EDIT_ROUTE_MARKER.SPACING_MIN_SCALE | 0.5 | The fraction of ROW_SPACING_PX the row spacing shrinks to at MIN_SIZE_ZOOM, set apart from the dot MIN_SCALE. Read when the edit-mode controls rebuild. |
EDIT_ROUTE_MARKER.GLYPH_SIZE_TEXT_PX | 24 | Height in screen pixels of the text marks riding a dot (the visit-order number and the yard P) at full size, capped at the dot diameter. Scales with the same zoom factor as the dots. Read when the edit-mode controls rebuild. |
EDIT_ROUTE_MARKER.GLYPH_SIZE_ICON_PX | 17 | Height in screen pixels of the ICON marks riding a dot (the plus, the blueprint wrench, the pending spinner) at full size, with the plus and wrench capped at the dot diameter. Sized separately from GLYPH_SIZE_TEXT_PX. Scales with the same zoom factor as the dots. Read when the edit-mode controls rebuild. |
EDIT_ROUTE_MARKER.FULL_SIZE_ZOOM | 14 | The zoom at and past which the edit controls draw at full size. Between MIN_SIZE_ZOOM and here they scale linearly. Read when the edit-mode controls rebuild. |
EDIT_ROUTE_MARKER.MIN_SIZE_ZOOM | 10 | The zoom at and below which the edit controls sit at their smallest (MIN_SCALE of full size). Read when the edit-mode controls rebuild. |
EDIT_ROUTE_MARKER.MIN_SCALE | 0.7 | The fraction of full size the dots and glyphs shrink to at MIN_SIZE_ZOOM (row spacing scales by its own SPACING_MIN_SCALE). Read when the edit-mode controls rebuild. |
EDIT_ROUTE_MARKER.HOVER_RESIZE | 1.2 | The factor by which a hovered add/remove-stop dot grows. Read as the map redraws. |
EDIT_ROUTE_MARKER.SPINNER_SPEED_DEG_PER_S | 300 | How fast the pending spinner turns, in degrees per second, while an add/remove click is queued or in flight. Read as the map redraws. |
EDIT_ROUTE_MARKER.ADD_COLOR | "#22c55e" | Fill of a dot the route can gain as a stop (drawn with a plus). Any CSS color. Read when the edit-mode controls rebuild. |
EDIT_ROUTE_MARKER.ADDED_COLOR | "#ef4444" | Fill of a dot on the route or queued to join it, showing its visit order once the route has it; clicking removes it. Any CSS color. Read when the edit-mode controls rebuild. |
EDIT_ROUTE_MARKER.BLUEPRINT_COLOR | "#ca8a04" | Fill of a dot whose station track is still a blueprint and cannot join a route yet (the wrench). Any CSS color. Read when the edit-mode controls rebuild. |
EDIT_ROUTE_MARKER.INCOMPATIBLE_COLOR | "#9ca3af" | Fill of a dot whose station track the route's train type is not compatible with (drawn half-transparent with a faded plus). Any CSS color. Read when the edit-mode controls rebuild. |
EDIT_ROUTE_MARKER.YARD_COLOR | "#a18072" | Fill of a dot on a station platform serving as a yard berth (drawn half-transparent with a P; clicking explains why the stop is unavailable). Its default matches the light-theme yard track color. Any CSS color. Read when the edit-mode controls rebuild. |
ROAD_VISUALS#
Per-road-class rendering config: line width in meters and the zoom window [start, end] over which the road fades in while zooming in. With the construction panel open the road and bridge lines skip the fade (the minor road and pedestrian path road lines, not their bridges, still start at zoom 11); the road copies drawn on 3D terrain keep the fade.
{
"highway": {
"width": 12,
"zoomWindow": [
6.5,
7
]
},
"major": {
"width": 8,
"zoomWindow": [
6.5,
7
]
},
"medium": {
"width": 6,
"zoomWindow": [
12,
12.5
]
},
"minor": {
"width": 4,
"zoomWindow": [
12,
12.5
]
},
"pedestrian": {
"width": 2,
"zoomWindow": [
16,
16.5
]
}
}AREA_VISUALS#
Zoom fade windows and final opacities for the building, park and commercial map layers. zoomWindow is the [start, end] zoom range over which the layer fades in while zooming in (null means a constant opacity at every zoom), and the buildings window shifts by the city building zoom offset. parksLarge covers parks whose map-data area value is at least 100,000. commercial covers both commercial and college areas, which share one tile layer and so one fade and opacity; their colors come from the map theme.
{
"buildings": {
"zoomWindow": [
12,
12.5
],
"opacity": 0.65
},
"parksLarge": {
"zoomWindow": null,
"opacity": 0.8
},
"parksSmall": {
"zoomWindow": [
12,
12.5
],
"opacity": 0.8
},
"commercial": {
"zoomWindow": [
12.25,
12.75
],
"opacity": 0.7
}
}BUILDING_FOUNDATION_DEPTHS#
Depth stops in meters and per-theme colors for the building foundation map layer and its key. The layer blends colors linearly between stops placed at each minDepth plus BUILDING_FOUNDATION_GAP; maxDepth only labels the key, where Infinity shows as an open-ended band, and label is not read.
[
{
"minDepth": 10,
"maxDepth": 14,
"colors": {
"light": "#009c27",
"dark": "#006b1b"
},
"label": "10-14m"
},
{
"minDepth": 14,
"maxDepth": 18,
"colors": {
"light": "#ff9124",
"dark": "#cc7319"
},
"label": "14-18m"
},
{
"minDepth": 18,
"maxDepth": 22,
"colors": {
"light": "#ff3d24",
"dark": "#cc3119"
},
"label": "18-22m"
},
{
"minDepth": 22,
"maxDepth": 26,
"colors": {
"light": "#8B0000",
"dark": "#5c0000"
},
"label": "22-26m"
},
{
"minDepth": 26,
"maxDepth": 30,
"colors": {
"light": "#d324ff",
"dark": "#a91acc"
},
"label": "26-30m"
},
{
"minDepth": 30,
"maxDepth": Infinity,
"colors": {
"light": "#CBC3E3",
"dark": "#9d96b5"
},
"label": "30m+"
}
]TRACK_SPEED_COLORS#
Speed stops in km/h and colors for the track speeds and route speeds layers and the track speeds key. Colors blend linearly between stops, with the speed clamped between the first stop and the top speed of the train type.
[
{
"speedKmh": 10,
"hex": "#3B82F6"
},
{
"speedKmh": 25,
"hex": "#06B6D4"
},
{
"speedKmh": 50,
"hex": "#22C55E"
},
{
"speedKmh": 75,
"hex": "#F97316"
},
{
"speedKmh": 90,
"hex": "#F43F5E"
},
{
"speedKmh": 130,
"hex": "#A855F7"
}
]TRACK_TPH_COLORS#
Trains-per-hour stops and colors for the track TPH layer and its key. A track is colored by its busiest hour, summing trains per hour across the routes that use it, blended linearly between stops and clamped to the last stop.
[
{
"tph": 0,
"hex": "#94a3b8"
},
{
"tph": 10,
"hex": "#3B82F6"
},
{
"tph": 20,
"hex": "#22C55E"
},
{
"tph": 30,
"hex": "#F97316"
},
{
"tph": 40,
"hex": "#F43F5E"
},
{
"tph": 50,
"hex": "#A855F7"
}
]ROUTE_UTILIZATION_COLORS#
Route utilization color mapping for the route stats utilization view: percent of offered train capacity in use to colors, interpolated between stops.
[
{
"percent": 0,
"hex": "#22C55E"
},
{
"percent": 25,
"hex": "#EAB308"
},
{
"percent": 50,
"hex": "#F97316"
},
{
"percent": 75,
"hex": "#cb0025"
},
{
"percent": 100,
"hex": "#ba00cb"
}
]ROUTE_RELIABILITY_COLORS#
Colors for the on-time percent of a route (the share of its arrivals on time) in the route reliability view of the reliability panel and route details, interpolated between stops and clamped past the end stops.
[
{
"percent": 0,
"hex": "#cb0025"
},
{
"percent": 50,
"hex": "#F97316"
},
{
"percent": 75,
"hex": "#EAB308"
},
{
"percent": 90,
"hex": "#84CC16"
},
{
"percent": 100,
"hex": "#22C55E"
}
]SECTION_DELAY_COLORS#
Colors for seconds of delay in the reliability map mode, its key and hover tooltip, the reliability panel, route details, the perceived time panel and journey cards, interpolated between stops and clamped outside the end stops.
[
{
"seconds": 0,
"hex": "#22C55E"
},
{
"seconds": 10,
"hex": "#84CC16"
},
{
"seconds": 20,
"hex": "#EAB308"
},
{
"seconds": 40,
"hex": "#F97316"
},
{
"seconds": 60,
"hex": "#cb0025"
}
]TRACK_ELEVATIONS#
Elevation stops in meters and per-theme colors for the track elevations layer and its key. The layer blends the light colors linearly between stops and clamps outside them; the dark colors only show in the key in the dark theme. label is not read.
[
{
"depth": 20,
"colors": {
"light": "#0100cb",
"dark": "#0100cb"
},
"label": "20m"
},
{
"depth": 10,
"colors": {
"light": "#00b7cb",
"dark": "#00b7cb"
},
"label": "10m"
},
{
"depth": 0,
"colors": {
"light": "#14cb00",
"dark": "#14cb00"
},
"label": "0m"
},
{
"depth": -10,
"colors": {
"light": "#cbad00",
"dark": "#cbad00"
},
"label": "-10m"
},
{
"depth": -20,
"colors": {
"light": "#cb0025",
"dark": "#cc3119"
},
"label": "-20m"
},
{
"depth": -30,
"colors": {
"light": "#ba00cb",
"dark": "#ba00cb"
},
"label": "-30m"
}
]