Page 1 of 1

[kovarex] [0.14.9] Train failing to leave station

Posted: Sat Sep 24, 2016 7:31 pm
by gHoST INFERNO
Hey,

tl;dr - Train seems to get confused when train stops are too close to each other, failing with "no path", although the train can be easily convinced to then leave anyways.

In my games I tend to have a heavily defended outer perimeter and have supply trains run out there with replacement walls, lasers, robots, repair tools, etc. so that construction robots can automatically fix up any damage without me having to worry. As the map grows, I need to add more and more of these supply stations (where the trains unload into a local logistic network to maintain parts of the wall) as well as supply trains themselves (to increase throughput and latency of this system). I currently have 8 such trains in rotation, and they visit a total of 15 stations, on a loop. As you can imagine, this is quite a hassle to maintain: Whenever I add or remove a station (typically because the map grows I create a new station and then take down an old one), I have to update the schedules of 8 trains. Adding more trains as the number of stations increases is also a hassle. So, I wanted to try out something new:

What if I instead have a *single* track that loops around my whole base, and all the supply stations have the same name, and in between each supply station I have a "dummy" station that the train (barely) stops at, just to force it to go to the next one. In my test I called the real stop "#test" and immediately after I had a stop called "#test-leave", and the train schedule was just those two stops, with a normal wait condition for #test and "wait 0 seconds" for the #test-leave stop. Then I created a looped track with a total of 4 stops, as seen below. This should mean the train stops at #test, waits a while, then goes to #test-leave which is literally right next to it, waits 0 seconds, and then goes to the next #test.

Initially I created this loop without signals, because I didn't think I'd need them for this test. The train stopped at #test, then went to #test-leave, but then complained about "no path". Thinking I must have screwed up the loop (somehow??) I checked it, didn't see anything, and so I just went into the train schedule and clicked the arrow to tell it to go to #test manually. Oddly, the train obliged without any other change, so seems like the track is fine. Experimenting more I thought maybe signals would get this unstuck, so I placed the first one right after a #test-leave station. Oddly, that made the train leave, so I thought this fixes it, but the train got stuck again at the other station. Ok.. Let me add the signal there too. Ok, train left, so it must be working now, right? :-) Nope, train is stuck again. So I added a few more signals, and every time I placed one, the train got unstuck for one step.

Just for sanity I also briefly moved the #test-leave a bit further away (just after the turn), and of course that worked just fine, so it seems to be related to when the stops are super close?

I should be able to avoid this (also not sure yet I'll follow this strategy in the first place), but thought you'd like to know.

Thanks for a fun game!
train-bug.png
train-bug.png (1.49 MiB) Viewed 1756 times
EDIT: Fixed minor spelling issue to avoid confusion

Re: [kovarex] [0.14.9] Train failing to leave station

Posted: Fri Jan 05, 2018 11:28 am
by kovarex
I tried it in the current version it it works properly.