Voxel Tycoon

Voxel Tycoon

This item is incompatible with Voxel Tycoon. Please see the instructions page for reasons why this item might not work within Voxel Tycoon.
40 ratings
Path signals & improved train pathfinder 1.0
3
2
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
2.673 MB
3 Aug, 2021 @ 5:57pm
1 Sep, 2021 @ 11:18am
16 Change Notes ( view )

Subscribe to download
Path signals & improved train pathfinder 1.0

Description
This mod replaces block signaling system by the path based signaling and provides an improved pathfinding for trains.

Path signals
Features
  • Instead of allowing only one train in the signal block, each train reserves own path from one to the next signal.
  • Signals are red by default, only when there is a path reserved for a train, signal will turn to green
  • Configurable highlighting of reserved paths

Planned features
  • Differentiate semaphore and light signals by a slightly different behaviour:
    • A semaphore will clear the reserved path after a rear of the train passes the last switch in the block plus there will be a small delay before a new path can be reserved
    • A light signal will clear each path segment individually and there will be no delay

  • Allow creating a multi-aspect signals based on the path reserved from the signal (straight or with a reduced speed)
  • Real distant signal which will have a signal aspect based also on the next signal (for example green-yellow-red following signals)
  • Adding an ability to safely disable path signalling to ensure that the mod can be safely removed from the game.
  • Warning when a train automatically turns back on switches (=usually when is longer than a station track), so there is a risk of collisions
  • Optionally, path signalling only available after research.

!! Warning !!
Be careful when you manually turn back the train - after that, path from the new front of the train to the first signal can be in collision with the reserved path of another train.
The same applies when the train is longer that station, so its rear stops on the switches and train will turn back after the stop.
(This is only for signalling blocks with switches, when there is only straight rail between signals, it is safe to turn back the train).
Also building/removing rails and signals in the block with more than one already reserved path can lead to a collision.

Adding a mod to the existing save is safe, but removing should be done with care, because it can lead to the collision when there is more than one train in the signalling block.

Improved train pathfinder
Pathfinder is based on Dijkstra algorithm for finding the best path. Now without any optimisation it has approximately same performance as the original pathfinder
(original pathfinder is better on simpler rail network and shorter distances in the train schedule), but lot of improvement can be done.
In this version, there is a slight lag when changes in the railway network are made (if changes are made in a paused game, the lag will appear after unpausing the game).

Features
  • Try avoid go through stations, when there is a station bypass
  • Prefer tracks with less curves
  • Configurable highlighting train path
  • Better timing of path updates - only update a path if there is a possibility of changes.

Planned features
  • Calculating the best path based on track speed restrictions, slopes, train length and acceleration
  • Selection of the best platform based on potential collision paths on arrival and departure
  • Optimizations to improve performance
  • Add an ability to use a ModUtils lib for settings
  • Highlight a suspicious non-electrified segments
  • Notification of a much longer electrified train path than a non-electrified
  • Notification of a much longer train path than the path with turning back at the station (possibly forgotten turn back order)
  • Train priority settings - a train with a higher priority will reserve a path further ahead than a train with a lower priority.

There should not be major issues, but, of course, some bugs can appear. Backups of the game saves are recommended.
Please report issues via an Issue tracker[github.com].

Settings
Highlighting paths can be turned on by Game Settings -> Mods and clicking on the "cogwheel" right from the mod name.

Compatibility
Mod is not compatible with Path highlighter mod, but it provides own path highlighting.

Latest changes
Version 1.0.2
  • Fixed deadlock when determining the possibility of a diversion
  • Fixed not setting the red signal when shrinking a train path (possible cause of a train crash)
  • Fixed incorrectly reserving and releasing rail segments after the end of a path when there is a circle in the block.
Version 1.0.1
  • Added a chinese translation (thanks to TheHZDev Github user).
  • Train path highlighted for train with opened window is brighter than for the other trains when all train paths option is enabled
  • Fixed signals occasionally remained green after train passed them and then a next train was blocked
  • Fixed not updating a train path in certain cases
  • Fixed null reference after removing station
Version 1.0
  • Allow signals in the middle of one signalling block (in vanilla game this signals aren't passable by the train)
  • Added ability to display all train paths.
  • Rewrote code for displaying reserved paths. Now it has a very little performance impact.
  • Fixed timing of a path updating after loading a game.
  • Fixed detecting of simple blocks when there was only crossings and no switches.
  • Fixed not reserving tracks beyond a path that ends at the station and after platform there are no signals.
Version 0.98 beta
  • Process all tracks for pathfinder (fixes some bugs).
26 Comments
Doministo 28 May, 2023 @ 3:47pm 
RIP this mod
Bigbigcheese 4 Dec, 2022 @ 2:28pm 
Any ability to update this mod, or otherwise share the source code so that others can update?
B0tka 13 Jun, 2022 @ 11:34am 
The game is unplayable without this mode. Update will be nice
Tomas 4 Feb, 2022 @ 4:00am 
Please update for 0.87!
DaVinki 1 Feb, 2022 @ 8:51pm 
F to the greatest mod on this workshop
olek 22 Jan, 2022 @ 6:51am 
Wann kommt ein Update?
gz6112sv2 5 Jan, 2022 @ 11:50pm 
Can not be loaded while I start a new game in ver 0.86
xKeinBock 27 Dec, 2021 @ 4:52am 
i Love this mod, but after the update it doesnt work anymore please update it
Ideas Man 22 Dec, 2021 @ 4:15pm 
Damn. Mod still hasn't been fixed and now that v0.87 is live, the game is effectively broken if you rely on this mod.
ayle 10 Dec, 2021 @ 9:02am 
@Kadele I'm having the same issue, but also with other mods