manual:subwaysim:map_construction:prepare_map
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| manual:subwaysim:map_construction:prepare_map [2026/01/14 13:17] – [5.4 addSpawnPlatform()] dcs | manual:subwaysim:map_construction:prepare_map [2026/01/14 15:42] (current) – [Configuring Player Spawn Settings] dcs | ||
|---|---|---|---|
| Line 262: | Line 262: | ||
| ---- | ---- | ||
| - | ==== Finalizing Station Setup ==== | + | ===== Player Spawns (Career Mode) ===== |
| - | Configure all stations until the station layout matches | + | For career mode, the map must define **player spawn locations**. |
| + | These determine **where | ||
| - | Repeat | + | Placing player spawns is quick and does not require any Lua setup at this stage. |
| - | * The opposite terminus | + | |
| - | * The intermediate station near the depot | + | |
| - | * The depot itself | + | |
| - | Once Station Definitions are finished, the map is ready for: | + | ==== Placing a Player Spawn ==== |
| - | * AI train spawning | + | |
| - | * Timetables | + | |
| - | * Station-based routing | + | |
| - | ---- | + | Player spawns are provided as a Blueprint inside the SDK. |
| - | ====== Map.lua Explained (TestMap Example) ====== | + | Path: |
| + | SubwaySim2_Modding / GameFramework / SubwaySim2 / **BP_PlayerSpawn** | ||
| - | This page explains the structure of a **Map.lua** file for SubwaySim 2. | + | Drag **BP_PlayerSpawn** into your level and place it at the desired location. |
| - | It follows | + | Rotate the actor so that the **arrow points in the direction the player should face** after spawning. |
| - | The Map.lua consists of two major parts: | + | {{:manual: |
| - | * **Map Registration** (ContentManager DataTable) | + | |
| - | * **Runtime Map Logic** (Lua class based on BaseMap) | + | |
| - | ---- | + | Typically, player spawns are placed: |
| + | * on platforms | ||
| + | * near stopping positions | ||
| + | * inside depots (optional) | ||
| - | ===== Complete Map.lua File ===== | + | ==== Configuring Player Spawn Settings |
| - | <code lua> | + | After placing the actor, select it and open the **Details** panel. |
| - | -- | + | |
| - | -- | + | |
| - | -- SubwaySim2 | + | |
| - | -- Module TestMap.lua | + | |
| - | -- | + | |
| - | -- Map file for SDK TestMap | + | |
| - | -- | + | |
| - | -- | + | |
| - | -- Author: SDK User | + | |
| - | -- Date: | + | |
| - | -- | + | |
| - | ---@class TestMap : TestMap, BaseMap | + | |
| - | TestMap = Class(" | + | |
| - | ---@type SSB_Map_DataTable | + | The following settings are relevant: |
| - | local TestMap_DataTable = { | + | |
| - | contentType = " | + | |
| - | contentName = " | + | |
| - | class = TestMap, | + | |
| - | levelName = " | + | |
| - | author = " | + | |
| - | title = "SDK TestMap", | + | * **Station Name** |
| - | subtitle = "This could be your text", | + | Short station code (e.g. `DP`, `TS`). |
| - | description = "This is a test map that demonstrates how to use the Modding SDK. You can also use it for testing your own vehicles.", | + | Must match the station short name used later in Map.lua. |
| - | previewFilename = "/ | + | |
| - | }; | + | |
| - | g_contentManager: | + | |
| - | --- Creates a new instance | + | * **Platforms** |
| - | ---@return TestMap | + | List of platform numbers for which this spawn is valid. |
| - | function TestMap: | + | These platform numbers must correspond to the platforms defined in the station’s **BP_StationDefinition**. |
| - | self = TestMap: | + | |
| - | self.levelName = " | + | Using this setup, you can control **which platforms can be used as takeover points in career mode**. |
| - | self.displayName = "SDK TestMap"; | + | |
| - | + | ||
| - | -- latitude and longitude of Berlin' | + | |
| - | self.latitude = 52.518611; | + | |
| - | self.longitude = 13.408333; | + | |
| - | -- UTC+1 | + | |
| - | self.timezone = 1; | + | |
| - | self:loadStations(); | + | {{:manual:subwaysim:prepare_map: |
| - | self:loadTimetables(); | + | |
| - | self:loadCareerMode(); | + | |
| - | EventManager.callModListeners(" | + | ==== Important Note ==== |
| - | return self; | + | The player spawn actors only define **physical spawn locations**. |
| - | end; | + | |
| - | --- Event to load any additionally required level instances | + | Actual career mode logic (such as: |
| - | function TestMap:loadLevelInstances() | + | * takeover stations |
| - | assert(GameplayStatics.loadLevelInstance(" | + | * available vehicles |
| - | end; | + | * probabilities |
| + | * route closures) | ||
| - | --- Loads the station definitions for this map | + | is configured later in: |
| - | function TestMap:loadStations() | + | * **Create Map.lua** |
| - | ---@type table< | + | |
| - | self.stations = {} | + | |
| - | self.stations.TS = Station: | + | Do not add career |
| - | : | + | |
| - | : | + | |
| - | + | ||
| - | self.stations.TSD = Station: | + | |
| - | + | ||
| - | self.stations.TSA = Station: | + | |
| - | : | + | |
| - | : | + | |
| - | + | ||
| - | self.stations.DP = Station: | + | |
| - | : | + | |
| - | : | + | |
| - | : | + | |
| - | : | + | |
| - | : | + | |
| - | + | ||
| - | end | + | |
| - | + | ||
| - | --- Loads the default timetables for this map | + | |
| - | function TestMap: | + | |
| - | + | ||
| - | ---@type Timetable[] | + | |
| - | self.timetables = {}; | + | |
| - | + | ||
| - | -- Direction 1 (TS -> TSA) | + | |
| - | self.TestLine_Dir1 = Timetable: | + | |
| - | : | + | |
| - | : | + | |
| - | : | + | |
| - | : | + | |
| - | : | + | |
| - | : | + | |
| - | : | + | |
| - | station = self.stations.TS, | + | |
| - | platform = 2, | + | |
| - | departure = 0, | + | |
| - | speedLimit = 70, | + | |
| - | routeSettingMaxETA = 0.5, -- Fahrstraße stellt sich erst 0.5 Minuten vor Abfahrt | + | |
| - | }) | + | |
| - | : | + | |
| - | station = self.stations.TSD, | + | |
| - | platform = 2, | + | |
| - | departure = 0, | + | |
| - | speedLimit = 70, | + | |
| - | }) | + | |
| - | : | + | |
| - | station = self.stations.TSA, | + | |
| - | platform = 1, | + | |
| - | departure = 0, | + | |
| - | speedLimit = 70, | + | |
| - | altPlatform = { " | + | |
| - | }) | + | |
| - | + | ||
| - | -- Direction 2 (TSA -> TS) | + | |
| - | self.TestLine_Dir2 = Timetable: | + | |
| - | : | + | |
| - | : | + | |
| - | : | + | |
| - | : | + | |
| - | : | + | |
| - | : | + | |
| - | : | + | |
| - | station = self.stations.TSA, | + | |
| - | platform = 1, | + | |
| - | departure = 0, | + | |
| - | speedLimit = 70, | + | |
| - | routeSettingMaxETA = 0.5, -- Fahrstraße stellt sich erst 0.5 Minuten vor Abfahrt | + | |
| - | }) | + | |
| - | : | + | |
| - | station = self.stations.TSD, | + | |
| - | platform = 1, | + | |
| - | departure = 0, | + | |
| - | speedLimit = 70, | + | |
| - | }) | + | |
| - | : | + | |
| - | station = self.stations.TS, | + | |
| - | platform = 2, | + | |
| - | departure = 0, | + | |
| - | speedLimit = 70, | + | |
| - | altPlatform = { " | + | |
| - | }) | + | |
| - | + | ||
| - | -- List of templates by line, then by direction | + | |
| - | ---@type Timetable[][] | + | |
| - | self.templatesByLine = { | + | |
| - | [1] = { | + | |
| - | [1] = self.TestLine_Dir1, | + | |
| - | [2] = self.TestLine_Dir2, | + | |
| - | }, | + | |
| - | }; | + | |
| - | + | ||
| - | ---@type table< | + | |
| - | self.templatesByDirection = { | + | |
| - | [1] = { | + | |
| - | self.TestLine_Dir1, | + | |
| - | }, | + | |
| - | [2] = { | + | |
| - | self.TestLine_Dir2, | + | |
| - | }, | + | |
| - | }; | + | |
| - | + | ||
| - | local DM = DayMask; | + | |
| - | + | ||
| - | -- Repeating interval example | + | |
| - | TableUtil.insertList(self.timetables, | + | |
| - | TableUtil.insertList(self.timetables, | + | |
| - | + | ||
| - | ---@type table< | + | |
| - | self.depots = { | + | |
| - | }; | + | |
| - | + | ||
| - | ---@type table< | + | |
| - | self.dispatchingStrategies = { | + | |
| - | + | ||
| - | -- Turnaround | + | |
| - | | + | |
| - | { | + | |
| - | sourceStation = self.stations.TS, | + | |
| - | targetStation = self.stations.TS, | + | |
| - | sourcePlatforms = { " | + | |
| - | targetPlatforms = { " | + | |
| - | replaceFirstPlatform = true, | + | |
| - | keepLine = false, | + | |
| - | minLayover = 4, | + | |
| - | }, | + | |
| - | }, | + | |
| - | + | ||
| - | -- Turnaround logic at TSA | + | |
| - | [self.stations.TSA] = { | + | |
| - | { | + | |
| - | sourceStation = self.stations.TSA, | + | |
| - | targetStation = self.stations.TSA, | + | |
| - | sourcePlatforms = { " | + | |
| - | targetPlatforms = { " | + | |
| - | replaceFirstPlatform = true, | + | |
| - | keepLine = false, | + | |
| - | minLayover = 4, | + | |
| - | }, | + | |
| - | }, | + | |
| - | }; | + | |
| - | end; | + | |
| - | + | ||
| - | --- Initializes data for career mode | + | |
| - | function TestMap: | + | |
| - | end; | + | |
| - | + | ||
| - | --- Registers all valid timetables to the given `controlCenter` instance | + | |
| - | ---@param controlCenter ControlCenter | + | |
| - | function TestMap: | + | |
| - | controlCenter: | + | |
| - | controlCenter: | + | |
| - | end; | + | |
| - | </ | + | |
| ---- | ---- | ||
| - | ===== 1) Map Registration (ContentManager DataTable) | + | ===== Finalizing Station Setup ===== |
| - | The DataTable registers | + | Configure all stations until the station layout matches |
| - | Without it the map will not appear in the map selection menu and cannot be loaded. | + | |
| - | ---- | + | Repeat this process for: |
| + | * The opposite terminus | ||
| + | * The intermediate station near the depot | ||
| + | * The depot itself | ||
| - | ==== DataTable Fields ==== | + | Once Station Definitions are finished, the map is ready for: |
| - | + | * AI train spawning | |
| - | ^ Field ^ Description ^ | + | * Timetables |
| - | | contentType | Defines the type of content. Must be `" | + | * Station-based routing |
| - | | contentName | Unique internal identifier for this map across all mods. | | + | |
| - | | class | Reference to the Lua map class that provides runtime logic. | | + | |
| - | | levelName | Unreal level (.umap) name that will be loaded. Must match exactly. | | + | |
| - | | author | Author metadata (UI / debugging). | | + | |
| - | | title | Map title shown in the selection menu. | | + | |
| - | | subtitle | Optional subtitle below the title. | | + | |
| - | | description | Longer description shown in UI. | | + | |
| - | | previewFilename | Path to the preview image used in the main menu. | | + | |
| - | + | ||
| - | + | ||
| - | ==== Registering the DataTable ==== | + | |
| - | + | ||
| - | After the table is defined, it must be registered: | + | |
| - | + | ||
| - | <code lua> | + | |
| - | g_contentManager: | + | |
| - | </ | + | |
| - | + | ||
| - | If this call is missing, the map is not registered and will never load. | + | |
| - | + | ||
| - | ---- | + | |
| - | + | ||
| - | ===== 2) Runtime Map Class (BaseMap) ===== | + | |
| - | + | ||
| - | The runtime class is responsible | + | |
| - | * defining stations and their platforms | + | |
| - | * defining timetables and AI services | + | |
| - | * configuring dispatching / turnaround rules | + | |
| - | * optional career mode setup | + | |
| - | + | ||
| - | + | ||
| - | ==== Class Definition ==== | + | |
| - | + | ||
| - | <code lua> | + | |
| - | TestMap = Class(" | + | |
| - | </ | + | |
| - | + | ||
| - | This creates a new map class inheriting from `BaseMap`. | + | |
| - | + | ||
| - | ---- | + | |
| - | + | ||
| - | ===== 3) Constructor (new) ===== | + | |
| - | + | ||
| - | The constructor creates the map instance and prepares the runtime data. | + | |
| - | + | ||
| - | + | ||
| - | ==== Core Properties ==== | + | |
| - | + | ||
| - | ^ Property ^ Description ^ | + | |
| - | | self.levelName | The Unreal level to load (must match DataTable `levelName`). | | + | |
| - | | self.displayName | Internal display name used at runtime. | | + | |
| - | | self.latitude | Used for sun position and environment lighting. | | + | |
| - | | self.longitude | Used for sun position and environment lighting. | | + | |
| - | | self.timezone | Timezone offset for day/time simulation (UTC+1 = 1). | | + | |
| - | + | ||
| - | + | ||
| - | ==== Loading Runtime Data ==== | + | |
| - | + | ||
| - | The order matters: | + | |
| - | + | ||
| - | * `loadStations()` must run first (timetables reference stations) | + | |
| - | * `loadTimetables()` uses station references | + | |
| - | * `loadCareerMode()` is optional | + | |
| - | + | ||
| - | + | ||
| - | + | ||
| - | ==== Mod Event Hook ==== | + | |
| - | + | ||
| - | <code lua> | + | |
| - | EventManager.callModListeners(" | + | |
| - | </ | + | |
| - | + | ||
| - | This allows other mods or systems to react when the map instance is created. | + | |
| - | + | ||
| - | ---- | + | |
| - | + | ||
| - | ===== 4) loadLevelInstances() (Optional) ===== | + | |
| - | + | ||
| - | Maps can optionally load additional level instances (e.g. a city environment). | + | |
| - | + | ||
| - | + | ||
| - | ==== What the Example Does ==== | + | |
| - | + | ||
| - | <code lua> | + | |
| - | GameplayStatics.loadLevelInstance(" | + | |
| - | </ | + | |
| - | + | ||
| - | `assert(...)` stops execution early if loading fails, which helps during development. | + | |
| - | + | ||
| - | ---- | + | |
| - | + | ||
| - | ===== 5) Stations (Derived from BP_StationDefinition) ===== | + | |
| - | + | ||
| - | Stations defined in `loadStations()` must match **BP_StationDefinition** actors placed in the Unreal Editor. | + | |
| - | + | ||
| - | + | ||
| - | ==== 5.1 How Lua Stations Connect to BP_StationDefinition ==== | + | |
| - | + | ||
| - | The connection is made via the station short name: | + | |
| - | + | ||
| - | * In Unreal: BP_StationDefinition → **Name Short** | + | |
| - | * In Lua: `Station: | + | |
| - | + | ||
| - | If the short name does not match exactly: | + | |
| - | * stations may not register correctly | + | |
| - | * AI routing can fail | + | |
| - | * timetable stops may not resolve | + | |
| - | + | ||
| - | + | ||
| - | ==== 5.2 Station Table ==== | + | |
| - | + | ||
| - | Stations are stored as a keyed table: | + | |
| - | + | ||
| - | <code lua> | + | |
| - | ---@type table< | + | |
| - | self.stations = {} | + | |
| - | </ | + | |
| - | + | ||
| - | The key is usually identical to the short name: | + | |
| - | * `self.stations.TS` | + | |
| - | * `self.stations.TSA` | + | |
| - | * `self.stations.DP` | + | |
| - | + | ||
| - | + | ||
| - | ==== 5.3 Station: | + | |
| - | + | ||
| - | Creating a station: | + | |
| - | + | ||
| - | <code lua> | + | |
| - | Station: | + | |
| - | </ | + | |
| - | + | ||
| - | ^ Parameter ^ Description ^ | + | |
| - | | `" | + | |
| - | | `" | + | |
| - | + | ||
| - | + | ||
| - | ==== 5.4 addSpawnPlatform() ==== | + | |
| - | + | ||
| - | Spawn platforms define where trains may spawn for: | + | |
| - | * AI traffic | + | |
| - | * player spawning (depending on map setup) | + | |
| - | + | ||
| - | Example: | + | |
| - | + | ||
| - | <code lua> | + | |
| - | : | + | |
| - | </ | + | |
| - | + | ||
| - | ^ Parameter ^ Description ^ | + | |
| - | | `" | + | |
| - | | `115` | Max allowed | + | |
| - | | `2` | Spawn direction on the track (orientation). Must match your platform Begin/End marker direction logic. | | + | |
| - | + | ||
| - | ⚠️ **Important** | + | |
| - | Platform numbers are not “free”. They must match exactly the platform configuration inside BP_StationDefinition. | + | |
| - | + | ||
| - | + | ||
| - | ==== 5.5 Example: Depot Platforms ==== | + | |
| - | + | ||
| - | The depot station `DP` uses multiple platform numbers: | + | |
| - | + | ||
| - | * 51–54 | + | |
| - | * 60 | + | |
| - | + | ||
| - | This is a common pattern to represent multiple depot tracks. | + | |
| - | + | ||
| - | ---- | + | |
| - | + | ||
| - | ===== 6) Timetables | + | |
| - | + | ||
| - | Timetables define: | + | |
| - | * which trains spawn (compositions) | + | |
| - | * what route they drive (stops) | + | |
| - | * on which platforms they stop | + | |
| - | * how often services repeat | + | |
| - | + | ||
| - | ---- | + | |
| - | + | ||
| - | ==== 6.1 Timetable: | + | |
| - | + | ||
| - | A timetable template is created with: | + | |
| - | + | ||
| - | <code lua> | + | |
| - | Timetable: | + | |
| - | </ | + | |
| - | + | ||
| - | ^ Parameter ^ Description ^ | + | |
| - | | `" | + | |
| - | | `0` | Variant / index value (map-specific usage). | | + | |
| - | + | ||
| - | Templates are usually created per direction: | + | |
| - | * Direction 1: TS → TSA | + | |
| - | * Direction 2: TSA → TS | + | |
| - | + | ||
| - | ---- | + | |
| - | + | ||
| - | ==== 6.2 Train Compositions ==== | + | |
| - | + | ||
| - | (Replace with your corrected version – you already asked for that) | + | |
| - | + | ||
| - | ---- | + | |
| - | + | ||
| - | ==== 6.3 addStop() (Route Definition) ==== | + | |
| - | + | ||
| - | Stops define the actual route of a timetable. | + | |
| - | Each stop is a table passed into `addStop({ ... })`. | + | |
| - | + | ||
| - | Example: | + | |
| - | + | ||
| - | <code lua> | + | |
| - | : | + | |
| - | station = self.stations.TS, | + | |
| - | platform = 2, | + | |
| - | departure = 0, | + | |
| - | speedLimit = 70, | + | |
| - | routeSettingMaxETA = 0.5, | + | |
| - | }) | + | |
| - | </ | + | |
| - | + | ||
| - | ^ Field ^ Type ^ Description ^ | + | |
| - | | station | Station | + | |
| - | | platform | number | Platform number the train uses at this station. Must exist in BP_StationDefinition. | | + | |
| - | | departure | number | Minutes after service start/spawn when the train departs this stop. | | + | |
| - | | speedLimit | number | Speed limit applied after departing this stop (signal logic dependent). | | + | |
| - | | routeSettingMaxETA | number (optional) | How many minutes before departure the route (Fahrstraße) should be requested/ | + | |
| - | | altPlatform | table< | + | |
| - | + | ||
| - | ---- | + | |
| - | + | ||
| - | ==== 6.4 altPlatform (Alternative Platforms) ==== | + | |
| - | + | ||
| - | Example: | + | |
| - | + | ||
| - | <code lua> | + | |
| - | altPlatform = { " | + | |
| - | </ | + | |
| - | + | ||
| - | ⚠️ Use string values (`" | + | |
| - | + | ||
| - | This allows AI to select another platform if: | + | |
| - | * the preferred platform is blocked | + | |
| - | * dispatching assigns an alternative | + | |
| - | + | ||
| - | ---- | + | |
| - | + | ||
| - | ==== 6.5 routeSettingMaxETA (Route Pre-Setting) ==== | + | |
| - | + | ||
| - | Example: | + | |
| - | + | ||
| - | <code lua> | + | |
| - | routeSettingMaxETA = 0.5 | + | |
| - | </ | + | |
| - | + | ||
| - | Meaning: | + | |
| - | * the route will be requested/ | + | |
| - | + | ||
| - | This can help avoid early route locking and improves traffic handling at busy stations. | + | |
| - | + | ||
| - | ---- | + | |
| - | + | ||
| - | ==== 6.6 clone() + repeatUntil() (Creating Services) ==== | + | |
| - | + | ||
| - | A timetable template does not spawn trains by itself. | + | |
| - | It must be cloned into real timetable entries. | + | |
| - | + | ||
| - | Example: | + | |
| - | + | ||
| - | <code lua> | + | |
| - | TableUtil.insertList( | + | |
| - | self.timetables, | + | |
| - | self.TestLine_Dir1: | + | |
| - | ); | + | |
| - | </ | + | |
| - | + | ||
| - | ^ Call ^ Description ^ | + | |
| - | | clone(daytime(HH, | + | |
| - | | repeatUntil(daytime(HH, | + | |
| - | | TableUtil.insertList(list, | + | |
| - | + | ||
| - | Result: | + | |
| - | * a full day service pattern is generated automatically | + | |
| - | + | ||
| - | ---- | + | |
| - | + | ||
| - | ==== 6.7 templatesByLine / templatesByDirection ==== | + | |
| - | + | ||
| - | These tables store template references for later use (UI, dispatching helpers, debugging). | + | |
| - | + | ||
| - | ^ Table ^ Structure ^ Purpose ^ | + | |
| - | | templatesByLine | Timetable[][] | Group templates by line, then direction index. | | + | |
| - | | templatesByDirection | table< | + | |
| - | + | ||
| - | ---- | + | |
| - | + | ||
| - | ===== 7) Depots and Dispatching ===== | + | |
| - | + | ||
| - | This section defines: | + | |
| - | * depot storage spaces (optional) | + | |
| - | * turnaround / dispatch behavior at stations | + | |
| - | + | ||
| - | ---- | + | |
| - | + | ||
| - | ==== 7.1 Depots (self.depots) ==== | + | |
| - | + | ||
| - | <code lua> | + | |
| - | ---@type table< | + | |
| - | self.depots = {} | + | |
| - | </ | + | |
| - | + | ||
| - | In this example the table is empty. | + | |
| - | It can later be filled with depot spaces and rules. | + | |
| - | + | ||
| - | ---- | + | |
| - | + | ||
| - | ==== 7.2 Dispatching Strategies (self.dispatchingStrategies) ==== | + | |
| - | + | ||
| - | Dispatching strategies tell the ControlCenter how trains should be handled when they reach a station: | + | |
| - | * turnaround | + | |
| - | * reuse | + | |
| - | * platform reassignment | + | |
| - | + | ||
| - | Structure: | + | |
| - | + | ||
| - | <code lua> | + | |
| - | ---@type table< | + | |
| - | self.dispatchingStrategies = { | + | |
| - | [self.stations.TS] | + | |
| - | [self.stations.TSA] = { ... }, | + | |
| - | } | + | |
| - | </ | + | |
| - | + | ||
| - | Each station maps to a list of strategy entries. | + | |
| - | + | ||
| - | ---- | + | |
| - | + | ||
| - | ==== 7.3 Dispatching Strategy Fields ==== | + | |
| - | + | ||
| - | Example strategy: | + | |
| - | + | ||
| - | <code lua> | + | |
| - | { | + | |
| - | sourceStation = self.stations.TS, | + | |
| - | targetStation = self.stations.TS, | + | |
| - | sourcePlatforms = { " | + | |
| - | targetPlatforms = { " | + | |
| - | replaceFirstPlatform = true, | + | |
| - | keepLine = false, | + | |
| - | minLayover = 4, | + | |
| - | } | + | |
| - | </ | + | |
| - | + | ||
| - | ^ Field ^ Type ^ Description ^ | + | |
| - | | sourceStation | Station | Station where the train arrives. | | + | |
| - | | targetStation | Station | Station where the train should be dispatched to next. For turnaround this is the same station. | | + | |
| - | | sourcePlatforms | table< | + | |
| - | | targetPlatforms | table< | + | |
| - | | replaceFirstPlatform | boolean | Allows the first platform of the next service to be replaced (platform reassignment). | | + | |
| - | | keepLine | boolean | If true, keeps the line association. If false, line may be reset/ | + | |
| - | | minLayover | number | Minimum layover time (minutes) before the next departure. | | + | |
| - | + | ||
| - | ---- | + | |
| - | + | ||
| - | ===== 8) Career Mode (Optional) ===== | + | |
| - | + | ||
| - | `loadCareerMode()` is optional and currently empty. | + | |
| - | + | ||
| - | This is where career mode related data can be initialized later. | + | |
| - | + | ||
| - | ---- | + | |
| - | ===== 9) Registering Stations and Timetables ===== | + | |
| - | + | ||
| - | The final step is registering runtime data with the ControlCenter: | + | |
| - | + | ||
| - | <code lua> | + | |
| - | controlCenter: | + | |
| - | controlCenter: | + | |
| - | </ | + | |
| - | + | ||
| - | ^ Call ^ Description ^ | + | |
| - | | setStationList | Registers all stations for routing, UI and spawning logic. | | + | |
| - | | setTimetableList | Registers AI services plus dispatching and depot logic. | | + | |
| - | + | ||
| - | If this function is missing or incomplete: | + | |
| - | * AI traffic will not work | + | |
| - | * stations may not be recognized for routing | + | |
| ---- | ---- | ||
| Line 927: | Line 353: | ||
| * create AI timetables and services | * create AI timetables and services | ||
| * configure dispatching and depot logic | * configure dispatching and depot logic | ||
| + | |||
| + | At the same time, you can already continue to **visually build out and refine the map**: | ||
| + | * place platforms and station structures | ||
| + | * add props and environment details | ||
| + | * further shape stations and depots using editor tools | ||
| + | |||
| + | For this, you can use tools such as: | ||
| + | * [[manual: | ||
| + | |||
| + | Both workflows – **Map.lua logic** and **visual map building** – can be developed in parallel. | ||
| Continue with: | Continue with: | ||
manual/subwaysim/map_construction/prepare_map.1768393039.txt.gz · Last modified: by dcs
