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
Next revision
Previous revision
manual:subwaysim:map_construction:create_maplua [2026/01/14 14:15] – [8) Career Mode (Optional)] dcsmanual:subwaysim:map_construction:create_maplua [2026/01/14 14:37] (current) – [Final Step – Build & Test the Map] dcs
Line 1108: Line 1108:
 ==== 8.3 cmGroups (Train Pool + Probability) ==== ==== 8.3 cmGroups (Train Pool + Probability) ====
  
-`self.cmGroups` defines which train compositions can appear in career mode and how likely they are.+`self.cmGroups` defines which train compositions can appear in career mode
 + 
 +Each group represents a **probability set** for vehicle selection.
  
 You can define **multiple groups**. You can define **multiple groups**.
Line 1114: Line 1116:
  
 ^ Field ^ Meaning ^ ^ Field ^ Meaning ^
-| frequency | Weight / probability factor (higher = more likely) |+| frequency | Probability factor in the range **0.0 – 1.0** |
 | compositions | List of composition `contentName` strings | | compositions | List of composition `contentName` strings |
  
 Important: Important:
-  * `frequency` is **relative** between groups+  * `frequency = 1.0means **100 % chance** for this group to be considered
-  * Example: a group with frequency is chosen about **three times as often** as a group with frequency 1.+  * `frequency = 0.0` disables the group entirely. 
 +  * Values between 0.0 and 1.0 reduce the chance accordingly. 
 +  * The value is **not relative** to other groups.
  
-Example for TestMap:+==== Example (TestMap) ====
  
 <code lua> <code lua>
Line 1134: Line 1138:
  -- Career mode vehicle selection pool  -- Career mode vehicle selection pool
  self.cmGroups = {  self.cmGroups = {
- -- Group A: common vehicles+ -- Main vehicle pool (always available)
  {  {
- frequency = 3,+ frequency = 1.0,
  compositions = {  compositions = {
  "Berlin_HK_2x",  "Berlin_HK_2x",
Line 1143: Line 1147:
  },  },
  
- -- Group B: rare vehicles+ -- Optional / rare vehicles
  {  {
- frequency = 1,+ frequency = 0.4,
  compositions = {  compositions = {
  "Berlin_HK_1x",  "Berlin_HK_1x",
Line 1157: Line 1161:
  
 Result: Result:
-  * Group A is picked more often → you’ll more frequently get HK_2x A3L92_4x in career mode. +  * HK_2x and A3L92_4x are **always available** in career mode. 
-  * Group B still appearsbut less often.+  * HK_1x and A3L92_3x appear **only occasionally**depending on the random selection.
  
 ==== 8.4 Pathfinding Templates ==== ==== 8.4 Pathfinding Templates ====
Line 1195: Line 1199:
  
 If you forget this, career mode may not be able to plan valid routes on your map. If you forget this, career mode may not be able to plan valid routes on your map.
 +
 +----
  
 ===== 9) Registering Stations and Timetables ===== ===== 9) Registering Stations and Timetables =====
Line 1212: Line 1218:
   * AI traffic will not work   * AI traffic will not work
   * stations may not be recognized for routing   * stations may not be recognized for routing
 +
 +----
 +
 +===== Final Step – Build & Test the Map =====
 +
 +If all steps on this page were completed successfully, your map is now **fully configured**:
 +
 +  * the level exists and loads correctly
 +  * tracks, signals, and stations are set up
 +  * Map.lua is registered and contains stations, timetables, dispatching, and optional career data
 +
 +At this point, the map can be built and tested for the first time inside **SubwaySim 2**.
 +
 +Continue with:
 +  * [[manual:subwaysim:map_construction:build_mod|Build Mod (.pak)]]
 +
 +This step explains how to:
 +  * build your plugin
 +  * start SubwaySim 2 with your mod enabled
 +  * verify that the map loads correctly in-game
 +
 +----
 +
 +===== Additional Resources =====
 +
 +For further reference and updates, the following resources are recommended:
 +
 +
 +
 +=== SDK Changelog === 
 +
 +Stay up to date with changes, fixes, and new features in the Modding SDK:  
 +    * [[manual:sdk_changelog|SDK Changelog]]
 +
 +=== SDK Download & Test Content ===
 +
 +The SDK download area contains:
 +   * the current Modding SDK
 +   * the official **TestMap** used in this documentation
 +   * additional reference content for modders  
 +
 +   * [[manual:sdk_download|SDK Download]]
 +
 +The downloadable **TestMap** is provided as a **separate reference project**, distinct from the Sample Mod Map.  
 +While the Sample Map demonstrates general concepts, the TestMap mirrors the map structure built step by step throughout this documentation.
  
 {{page>manual:footer}} {{page>manual:footer}}
  
manual/subwaysim/map_construction/create_maplua.1768396521.txt.gz · Last modified: by dcs

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki