Random Train Routing

OpenTTD is a fully open-sourced reimplementation of TTD, written in C++, boasting improved gameplay and many new features.

Moderator: OpenTTD Developers

Post Reply
Thooom
Engineer
Engineer
Posts: 3
Joined: 13 Jul 2015 17:56

Random Train Routing

Post by Thooom »

Are there any way I can alter the game so that the trains go random like they did in the old days. Reason is I wanna try make a big train network where all the trains just go randomly between cities and pick up passengers and mail. With YAPF and the other one they just seem to go the same route over and over again.
User avatar
Jagged_bacon
Engineer
Engineer
Posts: 71
Joined: 20 Sep 2014 14:13
Location: United States

Re: Random Train Routing

Post by Jagged_bacon »

The only way to do this without changing the .exe is to not set a route on your trains. This will keep them going, however the best way to do this if you want an exception from a station is to leave the routing on "Local" instead of "Express." Then select the stations you want it to go to. It will do it in an order however some stations you have may not connect. So that's the "half random" way of doing it.

Man that was confusing....
I hope this helps, I am new to this forum as well. :)
Let the good times roll!
I make locomotion videos! :D https://www.youtube.com/channel/UCF9pxC ... VuIltm0vhQ
User avatar
Sylf
President
President
Posts: 957
Joined: 23 Nov 2010 21:25
Location: ::1

Re: Random Train Routing

Post by Sylf »

Jagged_bacon wrote:is to not set a route on your trains.
I have a feeling that OP has already tried this.
At least with YAPF (from my playing experience, not from code reading), trains chose the path of least resistance, even without any orders. Any stations that's not in the order is a resistance, and thus wil try to avoid them. An unplanned station that's closer is more resistance than unplanned station that's further away. With a very specific way YAPF calculates its path even for a train without any orders, trains will choose their paths in a very specific manner, leading to the
Thooom wrote:...just seem to go the same route over and over again.
pattern.
Thooom
Engineer
Engineer
Posts: 3
Joined: 13 Jul 2015 17:56

Re: Random Train Routing

Post by Thooom »

Correct. I had tried that :P I just remember playing TTD as a kid I would make a big network of train routes and send loads of trains onto it too see them crash, just can't seem to do it now because trains don't drive random :/
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: Random Train Routing

Post by planetmaker »

Thread moved to 'General OpenTTD' - this topic does not seem to be about AI or game scripts.
Post Reply

Return to “General OpenTTD”

Who is online

Users browsing this forum: No registered users and 22 guests