[MOD 0.14] Train Coupler

Topics and discussion about specific mods
NiftyManiac
Long Handed Inserter
Long Handed Inserter
Posts: 90
Joined: Sat Jan 21, 2017 12:01 am
Contact:

[MOD 0.14] Train Coupler

Post by NiftyManiac » Thu Mar 02, 2017 7:34 pm

Info
Visual
Description
Here's a video demonstration. Attached is a demo save with an example of setting up a railyard for material storage and delivery with this mod.

The coupler rail needs to be researched, and can then be crafted from a single rail. It's pretty simple. If a train stops at a station in its schedule, and it comes to rest with a coupler rail aligned with a gap between wagons, those wagons will be coupled or decoupled.

After a coupling/decoupling takes place, the train immediately goes to the next stop in its schedule; the wait condition is ignored.

If anyone wants to help me improve the graphics, that'd be awesome :).

Mod Compatibility
  • Stringy Train Stops- No issues, but commands cannot be sent to a train that just coupled/decoupled, making things a bit difficult
Known Issues
  • When coupling two trains, the train with fewer locomotives must have empty space on the other side for coupling to happen properly.
  • Trains will lose their internal energy during coupling/decoupling, so each such event will cost fuel. Can't fix until 0.15.
  • Diagonal coupler rails don't work properly yet.
  • Not tested with other train mods; it's likely to have compatibility issues at the moment.
  • Only one coupling/decoupling action per train per station. I.e. you can't split a train into 3 pieces, or couple and decouple at once, at a single station.
  • If you're in following the train in god-mode, you'll be ejected. Can't fix until 0.15.
Attachments
coupler_railyard.zip
(3.76 MiB) Downloaded 100 times
Last edited by NiftyManiac on Sat Mar 04, 2017 10:52 pm, edited 2 times in total.

walljaik
Inserter
Inserter
Posts: 41
Joined: Fri May 06, 2016 9:24 pm
Contact:

Re: [MOD 0.14] Train Coupler

Post by walljaik » Sat Mar 04, 2017 4:41 pm

i love this feature! twists all train concepts you already learned and give's a new all dimension of stations. GJ, i will give a shot oon!

DornIndustries
Manual Inserter
Manual Inserter
Posts: 2
Joined: Wed Jan 14, 2015 3:43 am
Contact:

Re: [MOD 0.14] Train Coupler

Post by DornIndustries » Sun Mar 05, 2017 10:05 pm

You sir have started exactly what I wanted in Factorio, a more realistic way for a railway to operate.

I've got a long post coming in the mod ideas forum, but I also am trying to find a way to create a schedule like system much like the railroads use irl for knowing what cars to uncouple, leave at a requested spot or control point, and recouple cars then move on along!

If it isn't apparently obvious, Im a Railroader IRL. Which is why something like this really is awesome for me.

I wanna make railroading in Factorio more realistic. Which is why Im learning LUA and using this like your mod to teach me how this all works and operates.


Thanks man! Awesome mod!
"It isn't about controlling one part of the picture... It is about making the entire picture yours, then making it as efficient in its' art as humanly possible."
-Anonymous

cid0rz
Long Handed Inserter
Long Handed Inserter
Posts: 73
Joined: Sun Jul 31, 2016 5:52 pm
Contact:

Re: [MOD 0.14] Train Coupler

Post by cid0rz » Wed Mar 08, 2017 6:33 pm

Wow, this is great, I'm gonna try it immediately, thank you!

User avatar
steinio
Smart Inserter
Smart Inserter
Posts: 2197
Joined: Sat Mar 12, 2016 4:19 pm
Contact:

Re: [MOD 0.14] Train Coupler

Post by steinio » Sun Mar 12, 2017 10:38 am

I don't get it.

Is the coupler a rail signal or why doesnt the parked wagons don't block the station?

Greetings steinio
Image
Transport Belt Repair Man
My little mods: Link | My favourite mods: Bob's Mods | Angel's Mods | Yuoki Railway Core | EvoGUI | Logistic Train Network
Factorio Cheat Sheet by Denis Zholob

View unread Posts

Tekky
Smart Inserter
Smart Inserter
Posts: 1004
Joined: Sun Jul 31, 2016 10:53 am
Contact:

Re: [MOD 0.14] Train Coupler

Post by Tekky » Sun Mar 12, 2017 1:40 pm

I really like your YouTube video demonstration of your mod.

In your video demonstration, each train has two locomotives, one pointing in each direction. This is necessary for trains to be able to drive in both directions in automatic mode. Personally, I find this ugly and unrealistic. Also, this makes the train sluggish, because the second locomotive increases the total weight of the train without providing any additional propulsion power to the train.

In reality, most modern locomotives are symmetrical, i.e. they can drive forwards and backwards at the same speed. In Factorio, however, trains are only able to drive in one direction, unless the train consists of several locomotives facing different directions. Only in manual mode is it possible to drive a locomotive in the other direction, and only at reduced power.

Therefore, in this thread, I have suggested that, in Factorio, locomotives should generally be symmetrical and that trains should always be able to drive backwards, also in automatic mode and not just in manual mode. For example, it should be possible for a single symmetrical locomotive at the back of a train to push the entire train into a siding and decouple its cargo wagons there. If my suggestion were implemented, it would no longer be necessary to imitate a symmetrical locomotive by placing two locomotives facing different directions next to each other, as was necessary in the video demonstration of your mod.

NiftyManiac
Long Handed Inserter
Long Handed Inserter
Posts: 90
Joined: Sat Jan 21, 2017 12:01 am
Contact:

Re: [MOD 0.14] Train Coupler

Post by NiftyManiac » Sun Mar 12, 2017 11:29 pm

steinio wrote:Is the coupler a rail signal or why doesnt the parked wagons don't block the station?
Watch the linked video, all your questions will be answered there.
Tekky wrote:Therefore, in this thread, I have suggested that, in Factorio, locomotives should generally be symmetrical and that trains should always be able to drive backwards, also in automatic mode and not just in manual mode.
I agree. This would definitely make this mod more practical and fun. The rail coupler is really a pain to use with monodirectional trains right now, but nobody wants bidirectional trains for their long routes for the reasons you brought up.

User avatar
steinio
Smart Inserter
Smart Inserter
Posts: 2197
Joined: Sat Mar 12, 2016 4:19 pm
Contact:

Re: [MOD 0.14] Train Coupler

Post by steinio » Mon Mar 13, 2017 5:57 am

NiftyManiac wrote:
steinio wrote:Is the coupler a rail signal or why doesnt the parked wagons don't block the station?
Watch the linked video, all your questions will be answered there.
Tekky wrote:Therefore, in this thread, I have suggested that, in Factorio, locomotives should generally be symmetrical and that trains should always be able to drive backwards, also in automatic mode and not just in manual mode.
I agree. This would definitely make this mod more practical and fun. The rail coupler is really a pain to use with monodirectional trains right now, but nobody wants bidirectional trains for their long routes for the reasons you brought up.
No. That's why I ask.
Image
Transport Belt Repair Man
My little mods: Link | My favourite mods: Bob's Mods | Angel's Mods | Yuoki Railway Core | EvoGUI | Logistic Train Network
Factorio Cheat Sheet by Denis Zholob

View unread Posts

driver
Long Handed Inserter
Long Handed Inserter
Posts: 54
Joined: Wed Oct 28, 2015 11:24 am
Contact:

Re: [MOD 0.14] Train Coupler

Post by driver » Mon Mar 13, 2017 11:18 am

Automated (de-)coupling was on my wishlist, great mod and good elaborated video. Shunting can get more complex than I thought initially :) if more than one train is involved, but you can still use it for more simple operations.
Here's a screenshot of a simple setup with two stations and two pairs of locomotives I made: A long distance train entering with two empty waggons, decouple and continue his intinerary with two full waggons loaded with iron ore without waiting. http://imgur.com/e3HgtkX

Tekky
Smart Inserter
Smart Inserter
Posts: 1004
Joined: Sun Jul 31, 2016 10:53 am
Contact:

Re: [MOD 0.14] Train Coupler

Post by Tekky » Mon Mar 13, 2017 5:37 pm

driver wrote:Automated (de-)coupling was on my wishlist
This has also been in my wishlist for over 10 years, when I was playing OpenTTD (Transport Tycoon Deluxe). However, it has never been on my wishlist for Factorio, because I assumed that it would be too much work to implement and impossible to be implemented in a mod. I'm glad NiftyManiac (the mod author) proved me wrong. You truly are a nifty maniac. :)

NiftyManiac
Long Handed Inserter
Long Handed Inserter
Posts: 90
Joined: Sat Jan 21, 2017 12:01 am
Contact:

Re: [MOD 0.14] Train Coupler

Post by NiftyManiac » Tue Mar 14, 2017 4:06 am

steinio wrote: No. That's why I ask.
Oh sorry, didn't understand the question. No, the coupler rail doesn't act as a rail signal. You can see in the video that I add signals next to some of the coupler rails but not others; sometimes you need it, sometimes you don't. A couple of the ones in the video are hard to see behind the stations.

driver
Long Handed Inserter
Long Handed Inserter
Posts: 54
Joined: Wed Oct 28, 2015 11:24 am
Contact:

Re: [MOD 0.14] Train Coupler

Post by driver » Thu Mar 16, 2017 7:10 pm

There may be still some problems with merging trains. Materials can get changed in something else after coupling.
Here's an example: The plastic train couples and after coupling, copper in the last waggon gets changed into steal.
http://imgur.com/Vgou7jw

NiftyManiac
Long Handed Inserter
Long Handed Inserter
Posts: 90
Joined: Sat Jan 21, 2017 12:01 am
Contact:

Re: [MOD 0.14] Train Coupler

Post by NiftyManiac » Sat Mar 18, 2017 11:04 pm

driver wrote:There may be still some problems with merging trains. Materials can get changed in something else after coupling.
Here's an example: The plastic train couples and after coupling, copper in the last waggon gets changed into steal.
http://imgur.com/Vgou7jw
Hmm. Does this always happen with that configuration? If not, can you post a save where it does? I'll take a look when I get some time.

driver
Long Handed Inserter
Long Handed Inserter
Posts: 54
Joined: Wed Oct 28, 2015 11:24 am
Contact:

Re: [MOD 0.14] Train Coupler

Post by driver » Sun Mar 19, 2017 2:00 pm

I started playing this selfmade map (which I made with 12.21) with version 14.21 (32bit) and used the mod respawn in singleplayer in the beginning, but not in 14.22
I wish I would have used just a normally generated map in 14.22. This map was for intended for freeplay, by I changed it to sandbox play to play around.
There are 4 clean trains in manual mode waiting for different operations on the map. If you automate them, they quickly get a problem with filtered steel coming from nowhere.
Attachments
cakewalkfewaliens.zip
(1.99 MiB) Downloaded 36 times
Last edited by driver on Mon Mar 20, 2017 12:31 pm, edited 1 time in total.

Yoyobuae
Filter Inserter
Filter Inserter
Posts: 310
Joined: Fri Nov 04, 2016 11:04 pm
Contact:

Re: [MOD 0.14] Train Coupler

Post by Yoyobuae » Mon Mar 20, 2017 4:26 am

Made a simple setup with single directional trains:
https://youtu.be/wpPNcK82XVQ

sparr
Smart Inserter
Smart Inserter
Posts: 1095
Joined: Fri Feb 14, 2014 5:52 pm
Contact:

Re: [MOD 0.14] Train Coupler

Post by sparr » Mon Mar 20, 2017 5:09 am

This is wonderful and I can't wait to start playing again and try it.

driver
Long Handed Inserter
Long Handed Inserter
Posts: 54
Joined: Wed Oct 28, 2015 11:24 am
Contact:

Re: [MOD 0.14] Train Coupler

Post by driver » Tue Mar 21, 2017 11:17 am

While it's fun to play around with this mod and get some ideas, I'm wondering if the concept of stations and trainstops (entities) could be more comfortable, not only for (de-)coupling but in generell, so that you need to build less trainstops.
This could be done by adding a modular plattform to a train stop, so that in the end you have a modular station consisting of several connecting plattforms which work like invisible trainstops (but in both directions), and only one main trainstop at the top.
The coupler could be one tile like an inserter which simply triggers the keys G or V. :)
http://imgur.com/a/Vza30

Yoyobuae
Filter Inserter
Filter Inserter
Posts: 310
Joined: Fri Nov 04, 2016 11:04 pm
Contact:

Re: [MOD 0.14] Train Coupler

Post by Yoyobuae » Tue Mar 21, 2017 12:34 pm

The current way allows for train stations across curves. Makes design a bit more compact.
Screenshot_2017-03-21_07-31-26.png
Screenshot_2017-03-21_07-31-26.png (2.08 MiB) Viewed 4914 times

sore68
Fast Inserter
Fast Inserter
Posts: 123
Joined: Mon May 02, 2016 8:39 am
Contact:

Re: [MOD 0.14] Train Coupler

Post by sore68 » Thu Apr 06, 2017 12:56 pm

image
so good!!

I think a looks good system will come out. :D

vortex1967
Inserter
Inserter
Posts: 40
Joined: Fri Apr 15, 2016 8:48 am
Contact:

Re: [MOD 0.14] Train Coupler

Post by vortex1967 » Tue Apr 18, 2017 4:30 pm

Have found a compatibility issue with the railtanker mod.

Manually connecting and disconnecting from a railtanker that contains fluid and pulling away works as intended.

Trains connecting and disconnecting using your mod can connect and disconnect while the railtankers are either full or empty.
The issue is when the train pulls away connected to the tanker when there is fluid in the tanker, the fluid gets left behind.
The tankers are empty and the entity of fluid that is left behind can only be removed with the 'selected.destroy' console command.

I like the concept of your mod, will make some interesting layouts.

Post Reply

Return to “Mods”

Who is online

Users browsing this forum: No registered users