Station Types

Customize station behavior and catchment areas

The stations API lets you create station types with different catchment areas, transfer radii, and other behaviors.

Register a Station Type#

javascript
window.SubwayBuilderAPI.stations.registerStationType({
    id: 'bus-hub',
    name: 'Bus Connection Hub',
    description: 'Station with bus connections extending catchment area',
    catchmentMultiplier: 2.0, // 2x walking radius for origin/destination
    transferRadiusMultiplier: 3.0, // 3x transfer walking radius
    walkSpeedMultiplier: 1.5, // People walk faster
    dwellTime: 30, // 30 seconds stop time
    icon: 'Bus', // Curated Lucide icon name
    color: '#22c55e' // Hex color for map marker
});

Station Type Properties#

PropertyTypeDefaultDescription
idstringrequiredUnique identifier
namestringrequiredDisplay name
descriptionstringoptionalTooltip description
catchmentMultipliernumber1.0Multiplier for walking radius (base: 30 min)
transferRadiusMultipliernumber1.0Multiplier for transfer radius (base: 10 min)
walkSpeedMultipliernumber1.0Multiplier for walking speed (base: 1 m/s)
dwellTimenumber20Train stop time in seconds
catchmentOverridenumberoptionalAbsolute catchment in seconds
transferRadiusOverridenumberoptionalAbsolute transfer radius in seconds
walkSpeedOverridenumberoptionalAbsolute walk speed in m/s
iconstringoptionalCurated Lucide icon name for map marker (see UI Components guide)
colorstringoptionalHex color for map marker

Modify Existing Station Type#

javascript
window.SubwayBuilderAPI.stations.modifyStationType('standard', {
    catchmentMultiplier: 1.5,
    dwellTime: 25
});

Get Station Types#

javascript
// Get all station types
const allTypes = window.SubwayBuilderAPI.stations.getStationTypes();
console.log(Object.keys(allTypes));

// Get specific station type
const busHub = window.SubwayBuilderAPI.stations.getStationType('bus-hub');
console.log(busHub.catchmentMultiplier); // 2.0

Example Station Types#

Park and Ride#

Large catchment area for stations where people drive to.

javascript
window.SubwayBuilderAPI.stations.registerStationType({
    id: 'park-and-ride',
    name: 'Park & Ride',
    description: 'Station with parking lot - serves wider suburban area',
    catchmentMultiplier: 5.0, // 5x catchment (people drive here)
    transferRadiusMultiplier: 1.0,
    walkSpeedMultiplier: 1.0,
    dwellTime: 25,
    color: '#3b82f6'
});

Express Station#

Minimal dwell time for express service.

javascript
window.SubwayBuilderAPI.stations.registerStationType({
    id: 'express',
    name: 'Express Station',
    description: 'Limited stop station with faster boarding',
    catchmentMultiplier: 0.8, // Smaller catchment
    transferRadiusMultiplier: 1.0,
    walkSpeedMultiplier: 1.0,
    dwellTime: 10, // Quick 10 second stop
    color: '#ef4444'
});

Airport Terminal#

Slow walking but large catchment.

javascript
window.SubwayBuilderAPI.stations.registerStationType({
    id: 'airport',
    name: 'Airport Terminal',
    description: 'Airport station with extended walking times',
    catchmentMultiplier: 3.0,
    transferRadiusMultiplier: 2.0,
    walkSpeedMultiplier: 0.5, // Slow walking with luggage
    dwellTime: 45, // Long dwell for luggage loading
    color: '#0ea5e9'
});

Transit Center#

Major transfer hub.

javascript
window.SubwayBuilderAPI.stations.registerStationType({
    id: 'transit-center',
    name: 'Transit Center',
    description: 'Major hub with multiple transit connections',
    catchmentMultiplier: 2.5,
    transferRadiusMultiplier: 4.0, // Huge transfer radius
    walkSpeedMultiplier: 1.2, // Motivated commuters
    dwellTime: 35,
    icon: 'building-2',
    color: '#8b5cf6'
});

Assigning Station Types#

Station types are assigned per-station in the station details panel. When multiple station types are registered, a dropdown selector appears allowing players to change each station's type.

Note: Changing a station's type immediately affects pathfinding calculations. The RAPTOR algorithm uses the new catchment/transfer radius values for routing.

How Catchment Works#

The catchment area determines how far passengers will walk to use a station:

  • Base catchment: 1800 seconds (30 minutes) walking radius
  • Base transfer radius: 600 seconds (10 minutes) for station-to-station transfers
  • Base walk speed: 1 m/s

With catchmentMultiplier: 2.0, passengers will walk up to 60 minutes to reach this station.

With transferRadiusMultiplier: 3.0, passengers will walk up to 30 minutes to transfer at this station.