Cities: Skylines

Cities: Skylines

68 ratings
TrainScheduler 0.2.3-alpha
2
2
2
   
Award
Favorite
Favorited
Unfavorite
Mod
File Size
Posted
Updated
127.439 KB
8 Mar, 2023 @ 3:04am
16 Mar, 2023 @ 3:00am
6 Change Notes ( view )

Subscribe to download
TrainScheduler 0.2.3-alpha

Description
This mod is under developing. Not enough for some features especially for setting UI.


NOTE: This page is machine-translated.

TrainScheduler allows you to set departure times for Cities: Skylines overground railroads.

## Required Mods
1. Harmony
https://steamhost.cn/steamcommunity_com/workshop/filedetails/?id=2040656402
2. UUI
https://steamhost.cn/steamcommunity_com/workshop/filedetails/?id=2255219025

## Recommended Mods
Real Time
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=1420955187
TrainScheduler itself does not have the ability to display the time; Real Time will allow you to check the time.

## Competing Mods
Do not use TrainScheduler with the following mods.
1. Improved Public Transport 2

## How to use
I will create a tutorial video, but until then, please use the following information to get started.

1. activate the mod from the Content Manager
TrainScheduler 0.x.x

2. load the map for which you want to set the timetable
NOTE: Pause the game after loading map

3. Select TrainScheduler from the options and click Create Template.
A template configuration file will be generated in the following folder.
Folder: [SteamLibrary installation folder]\steamapps\common\Cities_Skylines
File name: TimeTable_Template.xml

The structure in the XML looks like this. Each setting value is described below.
 TimeTableData
  Lines
   Line ← line ID, line name, number of stations, traffic type, mode
    Stops
     Stop ←Stop Index (starting from 0), station net ID, station name, next station net ID, next station name, mode, interval
      Departures
       Departure ←departure time

4. set the departure time
Enter the time in HHmm format as shown below. For other details, please refer to the options that can be changed.
 <Departure>0002</Departure>←00:02
If you want to set more than one Departure tag, add a Departure tag and do as follows: <Departure>0002</Departure>←00:02
 <Departure>0004</Departure>
 <Departure>2352</Departure>


5. rename TimeTables_Template.xml to TimeTables.xml
The timetable mod only recognizes TimeTables.xml as a timetable.

6. Click the "Reload Timetable" button in the game options screen.
This completes the timetable setup. Enjoy the game.

## To add / delete a route
Please perform steps 3-6 again.


## Options that can be changed
You can change the options shown below. Settings not listed are required for the mod to work, so do not change them.

1. Line: This option affects the entire line. If there are the same settings for each line and each station, the settings for the line take precedence. For example, if the option to run every 10 minutes is turned on for the entire line, the 10-minute interval will take precedence even if individual departure times are set for each station.
 1. Enabled: Enables/disables control by the timetable mod.
1. true: Enabled.
2. false: Disabled. If disabled, the entire route will behave the same as vanilla.
2. Mode: Toggles the unit of time setting.
1. EachStop: Sets the departure time for each station.
2. FirstToAll: Expand the departure time of the first station to all stations in the line. ***NOTE***Do not use this option as it will not work correctly.
3. UseDefaultTimeTable: Option to run trains at 10-minute intervals. Use this option when setting up a timetable becomes troublesome.
1. true: Enabled. Trains will depart at 00/10/20/30/40/50 minutes every hour.
2. false: Disabled. Use the departure time set individually.
2. Stop: Option that affects station by station. Even if lines A and B stop at the same track at station S, the settings will not interfere with each other.
1. Enabled: Enables/disables control by the timetable mod.
1. true: Enabled.
2. false: Disabled. If disabled, the departure time for this station will behave the same as vanilla.
2. UseDefaultTimeTable: Option to run at 10 minute intervals. Use this option when setting up a timetable becomes tedious.
1. true: Enabled. Trains will depart at 00/10/20/30/40/50 minutes every hour.
2. false: Disabled. Use the departure time set individually.
3. Mode: Select interval or individual departure time setting.
1. Indivisually: All departure times are set individually. This is more time-consuming, but allows for fine-tuning.
2. IntervalTime: Specify departure times at intervals (in minutes). Subsequent Interval and End options must be set.
4. Interval: Specifies the interval between departures as a positive integer, valid only if Mode in the Stop option is IntervalTime; an integer must be set even if Mode is Indivisually.
5. End: Set the end time when Mode is IntervalTime, using 4 digits. If not used, set 0000.

Example 1: If IntervalTime is 06:00 start, 10-minute interval, and 23:00 end, set as follows
<Stop StopNumber="0" Mode="IntervalTime" Interval="10" End="2300">
<Departures>
<Departure>0600</Departure>

Example 2: Inidivisually set individual departure times
<Stop StopNumber="0" Mode="Indivisually" Interval="-1" End="0000">
<Departures>
<Departure>0000</Departure>
<Departure>0010</Departure>
<Departure>0020</Departure>
<Departure>0030</Departure>

## Trouble Shooting
* Check the timetable
The timetable is logged immediately after "Reload Timetable" or immediately after map loading. If you feel that the timetable is not set properly, please check the log to see if the intended departure time has been set.
The location of the log is as follows
Example: [SteamLibrary installation folder]\steamapps\common\Cities_Skylines\Cities_Data\output_log.txt
For example, the output will be as follows. Example is the 1st departure time of LineID=46
> === Line[46] has 8 stop(s) ===
> Stops[0] Departures: 1408 / 1418 / 1428 / 1438 / 1448 / 1458 / 1508 / 1518 / 1528 / 1538 / 1548 / 1558 / 1608 / 1618 / 1628 / 1638 / 1648 / 1703 /

* Especially, please check Enabled option in both of line and stop. Both are true, departure time is enabled.

* If it still does not work, please send TimeTables.xml and output_log.txt together.


## Attention.
* Do not publish this mod to the others without permission.
* Please post issue reports on Twitter or in the comments of this page. As I am a private person, I cannot promise a response.
https://twitter.com/gatomo_


## Restrictions.
* Cannot set timetable from within the game (to be addressed in the future).
* Station name does not appear if you use station tracks.

## Request
I recognize that setting the timetable in a text editor is an issue, but we can't think of a good way to set it up. I am looking for feedback on what you would like to see happen with the setting method, what kind of UI you would prefer, etc.
Please post them here on Twitter or in the comments on this page.

Translated with www.DeepL.com/Translator (free version)

Sources https://github.com/gatomo/TrainScheduler
Popular Discussions View All (1)
3
16 Mar, 2023 @ 3:06am
PINNED: Update Info
gatomo
25 Comments
Rubenf091 21 Aug, 2024 @ 3:32am 
Can you add a feature that despawns the trains when the end time is reached? Would be really helpful. For both modes.
Hankakusyugisya 18 Feb, 2024 @ 12:18am 
動きました。
下のコメントにあるRealTimeModの破損は解消しているようです。
愛用します!
gatomo  [author] 23 May, 2023 @ 5:06pm 
TrainScheduler is also currently unavailable because RealTime Mod has become a corrupt mod.
Please disable or unsubscribe for a while until the situation improves.
gatomo  [author] 24 Mar, 2023 @ 6:53pm 
It will be far future. I am enhancing the functionality of intra-city transportation as first step.
Kodybod 24 Mar, 2023 @ 9:58am 
when can you add intercity trains support?
gatomo  [author] 24 Mar, 2023 @ 6:32am 
Hi @Kodybod
Are there train lines in your map?
If you have not set up train routes in your game, please do so and then run Create Template.

If there are train lines but they are not output in the template, please check if there is any error output when you run Create Template, and if there is a TrainScheduler error, please paste the log of the error part here.

This mod does not work for metro and monorail, trams, etc. Only for ground trains that are not intercity transit.
Kodybod 23 Mar, 2023 @ 4:18pm 
the XML file i made from the mod has this <?xml version="1.0" encoding="utf-8"?>
<TimeTableRecord xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Lines />
</TimeTableRecord> I'm not good with code at all but i'd like a realistic schedule system for my subways and trains
天地壹号丨Heaven-Hell-Gover 22 Mar, 2023 @ 3:24am 
NICE
gatomo  [author] 21 Mar, 2023 @ 8:26am 
まもなくゲームのアップデートが来ます。交通系に関する修正があるようなので、本MODも影響を受ける可能性があります。本MODが原因でエラーが発生している場合は、アンサブスクライブして対処してください。Timetables.xmlを削除しなければ、将来的に復旧できます。可能な限り早くMODを修正しますので、それまでお待ちください。

Game update coming soon. There seems to be a fix regarding the traffic system, so this mod may be affected as well. If you are experiencing errors due to this mod, please unsubscribe. if you do not delete Timetables.xml, you can recover it. I will fix the mod as soon as possible. Thanks.
Sp3ctre18 16 Mar, 2023 @ 11:13pm 
スゲー!:steamhappy: