So, I have made progress with my track laying script. (video below)
It works. Which, I guess, is good. Of course a lot of tweaking and improvements are still needed but the basic functionality is there.
You start your track in a station and select a valid waypoint – the script then creates a track between the 2 points and checks what is underneath:
- Forest – increased cost
- River – no waypoint possible and significantly increased cost (bridge)
- Mountain – impassable
- Village – impassable
- Other track – impassable
Cost is calculated in function of the above and of course the distance.
You can validate the track at any point and it locks itself when it reaches another track – junction – or a station.
You can restart another track from a station or any point on an existing track.
Colors of tracks (being laid, in progress, built) will be user customizable… the graphics are simple and the idea is that it would resemble a network map such as a metro or train map:

Once approved, the track is currently instantly validated but I do intend to have a “build action” with some delay – obliging the player to think ahead and plan.
You can see below a youTube video of some track laying:
Curious on where this project goes?
Please subscribe to my newsletter on the homepage or follow me on youTube or twitter.