User Tools

Site Tools


manual:subwaysim:map_construction:create_maplua

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
manual:subwaysim:map_construction:create_maplua [2026/01/27 11:18] dcsmanual:subwaysim:map_construction:create_maplua [2026/01/27 11:27] (current) dcs
Line 335: Line 335:
 Platform numbers are not “free”. They must match exactly the platform configuration inside BP_StationDefinition. Platform numbers are not “free”. They must match exactly the platform configuration inside BP_StationDefinition.
  
-----+-----
  
-===== 6) Timetables (Overview) =====+===== 6) Timetables =====
  
-Timetables define the AI service pattern on a map (which trains spawn, where they stop, and when they run).+Timetables define the **AI service pattern** of a map.
  
-In **Map.lua**, timetables are typically created inside:+They control: 
 +  * which trains are spawned 
 +  * which routes they drive 
 +  * which stations and platforms are used 
 +  * when and how services operate 
 + 
 +In **Map.lua**, timetables are created inside:
  
   * `function <MapClass>:loadTimetables()`   * `function <MapClass>:loadTimetables()`
  
-This function usually initializes:+This function acts as the **integration point** for all timetable-related data. 
 +It typically references or initializes:
  
-  * `self.timetables` (the final list of actual services+  * the final list of active services (`self.timetables`) 
-  * timetable templates (often per line and direction) +  * timetable templates (e.g. per line and direction)
-  * optional tables like `self.templatesByLine` / `self.templatesByDirection`+
   * depot definitions (`self.depots`)   * depot definitions (`self.depots`)
   * dispatching strategies (`self.dispatchingStrategies`)   * dispatching strategies (`self.dispatchingStrategies`)
  
-The **full workflow and all timetable features** are explained here:+The **complete timetable workflow** — including templates, stops, composition weights, 
 +service repetition, depot handling, and dispatching logic — is documented separately:
  
   * [[manual:subwaysim:map_construction:create_timetable|Create Timetables]]   * [[manual:subwaysim:map_construction:create_timetable|Create Timetables]]
  
-----+This page intentionally does **not** describe timetable creation in detail, 
 +to keep the Map.lua documentation focused on structure and integration. 
 + 
 +-----
  
 ===== 7) Career Mode (Optional) ===== ===== 7) Career Mode (Optional) =====
  
-Career Mode is optional.   +Career Mode configuration is optional.
-If you don’t want career mode features on your map, you can leave `loadCareerMode()` empty.+
  
-If you *do* want career mode, this function defines:+If your map does not support career mode, `loadCareerMode()` may remain empty.
  
-  * where the player is allowed to take over a train +If implemented, this function defines: 
-  * optional route closures (for scenario logic) +  * where the player can take over a train 
-  * which train compositions the player is likely to get+  * optional route closures for scenario logic 
 +  * which train compositions are available
   * which timetable templates are used for pathfinding   * which timetable templates are used for pathfinding
  
-(Example implementations are map-specific.)+All career mode logic is **map-specific** and independent from timetable creation.
  
-----+-----
  
 ===== 8) Registering Stations and Timetables ===== ===== 8) Registering Stations and Timetables =====
  
-The final step is registering runtime data with the ControlCenter:+After stations and timetables are defined, they must be registered with the ControlCenter:
  
 <code lua> <code lua>
Line 385: Line 395:
  
 ^ Call ^ Description ^ ^ Call ^ Description ^
-| setStationList | Registers all stations for routing, UI and spawning logic. | +| setStationList | Registers all stations for routing, UIand spawning logic. | 
-| setTimetableList | Registers AI services plus dispatching and depot logic. |+| setTimetableList | Registers AI services together with dispatching and depot logic. |
  
-If this function is missing or incomplete: +If this step is missing or incomplete: 
-  * AI traffic will not work +  * AI traffic will not operate 
-  * stations may not be recognized for routing+  * station-based routing may fail
  
-----+-----
  
 ===== Final Step – Build & Test the Map ===== ===== Final Step – Build & Test the Map =====
manual/subwaysim/map_construction/create_maplua.txt · Last modified: by dcs

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki