Page 1 of 1

Turntables + Automated Detaching

Posted: Mon Sep 05, 2016 5:25 am
by CentricArts
I always have problems trying to keep my factory compact and have a system in order to allow trains which come in and out of my factory to turn around without having to make a loop.
My suggestion is a method of making cargo trains being able to detach from each other automatically and be able to programmable turntables in order to allow users to use one train instead of two.

Therefore in return for saving coal, you can use up a bit more space in your factory or vice versa.
Trains shouldn't HAVE to be double ended or take up huge loops in order to prevent that problem. I generally find trains only being pulled by one train to be a lot cooler and easier to work with.

And finally, detaching. Trains unloading can take a long time and basically puts your train in complete stationary until it's done the job it's programmed to complete. But why can the same
train not be able to do other things while waiting for other wagons to fill or unload?

Re: Turntables + Automated Detaching

Posted: Tue Sep 06, 2016 9:15 pm
by ssilk
Hm. That would be the "realworld implementation" of OpenTTD's "Trains just turn magically in their station".
Hm.
I think it would be complicated and not worth the afford: Gameplay will not rise very much with this feature. But personally I would like to play around with such turntables.

Re: Turntables + Automated Detaching

Posted: Fri Jan 11, 2019 3:58 pm
by AlexAegis
I'd also like this feature. detaching/attaching wagons/trains in an automated way could lead some interesting things to play with. And the turntable too.

Re: Turntables + Automated Detaching

Posted: Fri Jan 11, 2019 4:58 pm
by Tekky
Modern trains no longer use turntables, except for very few exceptions. Instead, they either have a locomotive or motor coach on both ends. The reason for this is that modern locomotives/motor coaches can drive just as well in forward and reverse.

Therefore, in my opinion, the main problem is that, in Factorio, locomotives facing the other direction do not contribute at all to the propulsion power of the train (which is very unrealistic). This has already been discussed extensively in the following threads:

viewtopic.php?f=6&t=40644 propulsion power of bidirectional trains
viewtopic.php?f=16&t=64311 Stronger Vanilla Locomotives
CentricArts wrote:
Mon Sep 05, 2016 5:25 am
And finally, detaching.
Automatic coupling and decoupling has been implemented in a mod:
Original forum thread
Updated mod for 0.16

I agree that it would be nice to have it in vanilla, but it should only be something for advanced players. However, for this to be properly implemented, individual locomotives would have to be able to shunt (drive slowly in reverse).

Re: Turntables + Automated Detaching

Posted: Sat Jan 12, 2019 8:49 am
by Sad_Brother
Tekky wrote:
Fri Jan 11, 2019 4:58 pm
Modern trains no longer use turntables, except for very few exceptions. Instead, they either have a locomotive or motor coach on both ends. The reason for this is that modern locomotives/motor coaches can drive just as well in forward and reverse.
Exactly. Plus loops are so easy in factorio.
Tekky wrote:
Fri Jan 11, 2019 4:58 pm
Therefore, in my opinion, the main problem is that, in Factorio, locomotives facing the other direction do not contribute at all to the propulsion power of the train (which is very unrealistic).
Yes. It's annoying.
Tekky wrote:
Fri Jan 11, 2019 4:58 pm
Automatic coupling and decoupling has been implemented in a mod:
...
I agree that it would be nice to have it in vanilla, but it should only be something for advanced players. However, for this to be properly implemented, individual locomotives would have to be able to shunt (drive slowly in reverse).
For this to be properly implemented (and effectively used) very many changes needed:
  • to see each wagon content
  • to control locomotive between stations
  • to set destination from station to locomotive
  • ...

Re: Turntables + Automated Detaching

Posted: Sat Jan 19, 2019 12:03 am
by jamiechi1
Tekky wrote:
Fri Jan 11, 2019 4:58 pm
Modern trains no longer use turntables, ...
It would still be cool to have turntables, and transfer tables. I don't care about modern trains.

Re: Turntables + Automated Detaching

Posted: Sat Jan 19, 2019 6:15 am
by Optera
A lot, almost all higher ranking, passenger trains in Austria have a locomotive on one end and a driving car on the other.
To get those driving cars face the right direction sometimes turntables are used. More commonly though the whole train is reversed in a reversing loop like we would do in Factorio.

Automatic coupling will break any combinator logic using train.id to discern between trains. Only mods monitoring on_train_created can keep track of certain trains.
decoupling:
train.id 1 decouples a wagon => becomes train.id 2 and the wagon train.id 3.
coupling:
a) train.id 2 and train.id 3 are coupled back in the same configuration as it was before => train.id is now 4.
b) train.id 2 and train.id 3 are coupled back in a different configuration as it was before => train.id is now 4.

If train.id instead was a hash from unit_numbers specific to one train configuration keeping track of train by their id would become possible in game as well.
decoupling:
train.id 1 decouples a wagon => becomes train.id 2 and the wagon train.id 3.
coupling:
a) train.id 2 and train.id 3 are coupled back in the same configuration as it was before => train.id is now 1.
b) train.id 2 and train.id 3 are coupled back in a different configuration as it was before => train.id is now 4.

Re: Turntables + Automated Detaching

Posted: Sat Jan 19, 2019 1:57 pm
by weaknespase
Hashes are prone to unexpected collisions, counters are not.

For example, train id currently is 32 bit field, so if we want to pack 4 unit types in trains up to 16 units long we would have 16 train configurations per hash, since compression functions aren't magical. No one, probably, could exhaust all 4 billion ids by building trains manually even if played same Factorio map 10 lives in a row.