manual:subwaysim:map_construction:create_maplua
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revision | |||
| manual:subwaysim:map_construction:create_maplua [2026/01/27 11:18] – dcs | manual: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 | + | ===== 6) Timetables ===== |
| - | Timetables define the AI service pattern | + | Timetables define the **AI service pattern** of a map. |
| - | In **Map.lua**, | + | They control: |
| + | * which trains are spawned | ||
| + | * which routes they drive | ||
| + | * which stations and platforms are used | ||
| + | * when and how services operate | ||
| + | |||
| + | In **Map.lua**, | ||
| * `function < | * `function < | ||
| - | This function | + | This function |
| + | It typically references or initializes: | ||
| - | * `self.timetables` | + | * 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 | + | The **complete |
| + | service repetition, depot handling, and dispatching logic — is documented separately: | ||
| * [[manual: | * [[manual: | ||
| - | ---- | + | 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 |
| - | 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 |
| - | | + | If implemented, |
| - | * optional route closures | + | |
| - | * which train compositions | + | * optional route closures for scenario logic |
| + | * which train compositions | ||
| * 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 |
| <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, UI, and spawning logic. | |
| - | | setTimetableList | Registers AI services | + | | setTimetableList | Registers AI services |
| - | If this function | + | If this step is missing or incomplete: |
| - | * AI traffic will not work | + | * AI traffic will not operate |
| - | * stations | + | * station-based routing |
| - | ---- | + | ----- |
| ===== Final Step – Build & Test the Map ===== | ===== Final Step – Build & Test the Map ===== | ||
manual/subwaysim/map_construction/create_maplua.txt · Last modified: by dcs
