Page 1 of 1

"One-shot" mode for trains

Posted: Sat Jan 09, 2021 11:22 pm
by evg-zhabotinsky
TL;DR
Ever wanted to send a train somewhere and make it stop there without babysitting the GUI?
Or maybe you are tired of having to open its GUI and clicking that tiny switch to "manual" after every trip?
Why not add an option to automatically switch to "manual" at next stop?

What ?
When a train is sent from manual mode to a temporary waypoint (ctrl-click) or a station (the "play" button of a station in schedule), switch it to "one-shot" mode instead of full "auto". When a train in that mode stops at a station, it switches to manual. If it already was in "auto" before being sent somewhere, leave it in "auto".

In train GUI, it can be implemented similar to splitter's priority toggle: the switch either stays in a middle position or in "auto", and a checkbox to the right says "Manual at next stop". Allow checking that box even if already driving in auto, and also unchecking it would switch to normal "auto" mode.

When switching to "one-shot" by adding a temporary waypoint (ctrl-click), leave that waypoint's wait condition empty, so that it gets removed immediately upon arrival, at the same moment when train returns to "manual".

Why ?
Most common usecase: A personal train. Usually, you put it in "auto" only to get somewhere quickly and without any crashes. When it arrives, you probably want it to stop until further notice.

Even though it already does so when its schedule is otherwise empty, it still technically remains in "auto", which inhibits WASD controls and personal roboport operation. You can manually switch it to "manual" after arrival, but it gets annoying when you do it a lot. Additionally, you can't keep useful stations in the train's schedule because you have to keep that schedule empty. If you don't keep it empty, you have to babysit the GUI every time to switch to "manual" right before the arrival.

Re: "One-shot" mode for trains

Posted: Sun Jan 10, 2021 12:09 am
by ptx0
evg-zhabotinsky wrote: Sat Jan 09, 2021 11:22 pm...
you can do this with mods: https://mods.factorio.com/mod/QoL-TempStations

Re: "One-shot" mode for trains

Posted: Sun Jan 10, 2021 12:18 am
by ssilk
This is quite similar: viewtopic.php?f=6&t=92807 Force train with empty schedule to manual

You know there is also a of concurrent suggestions around the temporary stop: see this post viewtopic.php?p=511884#p511884
which gives you an overview. :)

@ptx0: that mod is for 0.18!

Re: "One-shot" mode for trains

Posted: Sun Jan 10, 2021 4:00 am
by Serenity
This mod is great for personal trains:

https://mods.factorio.com/mod/ShuttleTrainRefresh

There is a setting for what to do at the destination, but it has lots of other functions too

Re: "One-shot" mode for trains

Posted: Sun Jan 10, 2021 4:01 am
by ptx0
ssilk wrote: Sun Jan 10, 2021 12:18 am @ptx0: that mod is for 0.18!
and stable 1.0