Custom rail type

Post your ideas and suggestions how to improve the game.

Moderator: ickputzdirwech

User avatar
SLywnow
Inserter
Inserter
Posts: 30
Joined: Sat Apr 25, 2020 7:37 pm
Contact:

Custom rail type

Post by SLywnow »

TL;DR
The ability to specify a separate type of rails and then select the type in the train and cars.

Why?
At the moment, the rails are rails, you can change the appearance, and that's it. But why not add the ability to choose which tracks the train can go on?
Specifically, I am interested in this because I want to make a mod where moving on normal rails is unacceptable, but all I can do now is not to let my train be put on normal rails, no one will prevent me from connecting my rails with normal ones.
I think I'm not the only one who want it, we can come up with a lot of interesting mods if we can specify separate types of rails, such as rail tracks for planes, cargo ships https://mods.factorio.com/mod/cargo-ships without workarounds or my idea is a vacuum train that can only travel inside its tube

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

Re: Custom rail type

Post by sparr »

Your mod could make sure your trains aren't placed on normal rails and vice versa, and that the two rail systems aren't connected, all with events fired on entity placement.

Pi-C
Smart Inserter
Smart Inserter
Posts: 1720
Joined: Sun Oct 14, 2018 8:13 am
Contact:

Re: Custom rail type

Post by Pi-C »

sparr wrote:
Thu Sep 03, 2020 1:37 am
Your mod could make sure your trains aren't placed on normal rails and vice versa, and that the two rail systems aren't connected, all with events fired on entity placement.
Not connecting the rails systems seems to be required by the game, but is somewhat less than optimal. At some point, I made a suggestion somewhere that junk trains should be able to use all rail tracks, but normal trains (being heavier etc.) shouldn't be able to drive on junk rails. Junk trains are strictly for the early game because they are slow and inefficient -- but you get them cheap and early. For the period where players transition to a normal rail network, it would be quite handy if the junk trains could use the regular rails (doesn't make sense later on, when a slow junk train will block the network for the real trains, so players should eventually recycle their junk). Getting something like that would be a dream come true! But I don't think that's possible because the rail path finder would have to check for the correct rails as well …
A good mod deserves a good changelog. Here's a tutorial (WIP) about Factorio's way too strict changelog syntax!

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

Re: Custom rail type

Post by steinio »

viewtopic.php?f=3&t=50632
  • Disallowed defining different rail categories for this moment as having more than one will never work properly until we spent some non-trivial time with that, which is not a priority now.
Image

Transport Belt Repair Man

View unread Posts

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

Re: Custom rail type

Post by sparr »

Sure, it would be much harder to make two types of trains and rails where train type A can go on both types of rails but train type B can only go one one type. Two totally separate types would be much easier.

For the harder case, how about this...

Define two totally separate types, then make a new type of station so when a junk train wants to switch networks it has to path to one of those transfer stations, and when it gets there it will get moved over to an adjacent track on the other network. You could borrow code from the automatic train deployment mod (which can copy and delete trains) for this.

Post Reply

Return to “Ideas and Suggestions”