Moderator: OpenTTD Developers
Peaks and Troughs GS
In normal OpenTTD, the time does not actually matter, and a certain frequency at a certain time is either always enough, or never enough. Scheduled dispatch allows for 24h timetabling, but there is no reason to.
In real life, we have peak hours, which create a much more complicated logistic problem. Of course, how this travel demand varies throughout the day depends a lot on the culture. Here in the Netherlands, people do not take a train earlier or later than the one that lets them be exactly on time, creating a hyper peak, but when you leave work isn't that important. Elsewhere, like the German S-Bahn, the evening and the morning peak are both a bit wider, and the same height, they have two roughly equal peaks. In Japan, being early is frowned upon, as is leaving earlier from work than your manager, and working hours are less flexible than elsewhere. This creates both a massive morning peak, and an extremely wide and low evening peak.
In this gamescript I tried to roughly recreate this relationship between time and travel demand using 3 presets. None of these 3 presets should generate more passengers than other presets.
See here the demand graphs:
This gamescript requires JGRpp version 0.39.0 or newer.
I want to thank JGR for taking my request for time-based travel demand, and turning it into a few simple gamescript functions, so I can make it a lot more than an internal feature ever would've.
Changing the amount of ticks per minute will slow down or speed up changes, and thus lengthen or shorten peaks. Changing the daylength does not affect these changes.
New GSDate functions: JGR
- Hyperpeaks: 2015 Nederlandse Spoorwegen - NS
- Equal peaks: 2010 Zürcher Verkehrsverbund - ZVV
- Japan: 2015 Ministry of Land, Infrastructure, Transport and Tourism
Made using Minimal GS.
Minimal GS author: Zuu
There is not a lot that can be changed within this gamescript to fix issues pertaining to station rating. That has to be done with a NewGRF. Should a poor station rating reduce the morning peak significantly or make night freight impossible, then a NewGRF will have to be doctored to make station rating drop more slowly. Maybe fixing it at 100% works well enough. There's a NewGRF for that here:
Let me know if this plays better or worse.
From testing it has been found that running this gamescript on existing savefiles will give very unsatisfactory results. It is important that all passengers will be transported, for example using peak services, as they will wait for multiple hours or even days. This may sometimes stretch the peaks.
The server I playtest this on has 148 ticks per minute, which is twice default, this makes the peaks a nice length and allows for a large amount of peak vehicles to transport everyone.
Further testing is still required.
- (40 KiB) Downloaded 90 times
- Practically identical to the tar. Includes make_tar.py from Zuu.
- (13.64 KiB) Downloaded 34 times
I'm currently playtesting this script on a server. We have 148 ticks per minute (default is 74). That works pretty nice. Without fastforward that does mean that an in-game day takes 2 hours, so this may be something to think about. With 148 ticks per minute, the peaks are a reasonable length, so you get a nice amount of time to enjoy increased service and a good amount of time to move the last few passengers out of the way and do maintenance at night, and you can get trains across the map in less than a day. We play on a 2k by 2k map, if your map is bigger you might want to increase the amount of ticks per minute.
We play with daylength 30, so there's about 4 days in a year. Math:
But to be honest, I'm not sure what settings are good and nice. It depends in large part on your own preferences, but because I have only experienced the server I'm currently on, I can't do much more than tell you about that. Many settings can still be tweaked mid-game, so I'd say get some settings that seem nice to play with, and choose to edit them later. The settings of the gamescript can be changed mid-game as well, however you need to save and reload for those changes to take effect.
I hope this helps.
Attached is a .zip file because I couldn't put the file itself in the attachments. I extensively commented the autohotkey file, so if you read the comments you should know how to add your own times and how to get the script to work. You need autohotkey to get it to work, which I think limits it to working on Windows.
I hope you'll find it useful.
- Autohotkey script for automating adding departure slots for scheduled dispatch
- (1.24 KiB) Downloaded 7 times