A perfect combination: Using Train Builder and Train Destructor

Adds new train stops forming a highly configurable logistic network.

Moderator: Optera

Post Reply
User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12888
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

A perfect combination: Using Train Builder and Train Destructor

Post by ssilk »

This afternoon I had the idea to use the Train Creator and Train Destructor to get rid of the problem of overfilled train depots.

There are the mods:
https://mods.factorio.com/mods/cooky173 ... ainBuilder
https://mods.factorio.com/mods/hopewell ... nstruction

What should I say: It worked!

Creating a train when too less trains in depot

I configured the train creator to send my train to the next depot (connecting it by wire). But before it must wait before a rail signal; which switches only to green, if the depot is "too empty". Finding out that state is simple, I count the number of green signals before a depot stop - other methods may be more elegant, of course. In that case I switch the waiting signal at the train creator to green. When that train has left a new train is created.

Destructing a train when too much trains in depot
There is a "trick": The destructor train station has also the name "Depot". But normally the path to that stop is closed. But if there are too many trains waiting (all waiting bays are full, same signal: I count the number of free signals) the path to the train destructor is freed and - cause that's the last stop that is not occupied - the train follows that path. And is destructed, when arrived. Nice.

The destructed parts go into a chest and will be reused if needed (see above). With a bit afford I could build belts to feed the needed parts back into the requester chest of the builder.

Summary:
Great fun to see the creation and destruction of trains and it feels right to use that: You don't need to have ridiculous big depots. Instead you have ridiculous numbers of trains in a chest.

And feature suggestion
I really think those two mods should be included into LTN. I looked into the code of both and I think both mods could be simply reduced to one kind of train stop that includes a requester and a provider chest (like the LTN stop includes lamp and constant combinator). The requester has no hidden function, it just requests numbers of trains and wagons. And the whole building/destruction is controlled by signals - as with LTN.

I think that is the next logical step to fully automate stuff. Of course the creation of trains should be a lot more configurable (I need to tweak the mod a bit to built that kind of trains I need). And I think the Builder and Destructor should be much, much bigger, some kind of "trainyard".
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...

User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2916
Joined: Sat Jun 11, 2016 6:41 am
Contact:

Re: A perfect combination: Using Train Builder and Train Destructor

Post by Optera »

They complement LTN nicely to get something very similar to OTTD depots.
However I won't include that directly into LTN for the following reasons:

One of the things that annoyed me most about OTTD where how depots could hold a hundreds of 30 tile long trains in a 1x1 space.
To me enforcing construction of realistic train yards is a desirable side effect.

The restrictive license I use for LTN would require the original authors of Train builder/destructor to transfer all ip and rights to me and remove their respective stand alone mods.
My time is spent better at digging into code than legal laws to make merging of other mods released under MIT into this restrictive license work.

User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12888
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: A perfect combination: Using Train Builder and Train Destructor

Post by ssilk »

Optera wrote:One of the things that annoyed me most about OTTD where how depots could hold a hundreds of 30 tile long trains in a 1x1 space.
Full agreement.

I made a suggestion out of it: viewtopic.php?f=6&t=51209
To me enforcing construction of realistic train yards is a desirable side effect.
Dito.
The restrictive license I use for LTN would require the original authors of Train builder/destructor to transfer all ip and rights to me and remove their respective stand alone mods.
Yes. Perhps a combined mod just for that would be better, cause that would then be usable standalone.

So, sorry for this off-topic, but I think there are not much more spaces, where I can
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...

mrvn
Smart Inserter
Smart Inserter
Posts: 5704
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: A perfect combination: Using Train Builder and Train Destructor

Post by mrvn »

ssilk wrote:This afternoon I had the idea to use the Train Creator and Train Destructor to get rid of the problem of overfilled train depots.

There are the mods:
https://mods.factorio.com/mods/cooky173 ... ainBuilder
https://mods.factorio.com/mods/hopewell ... nstruction

What should I say: It worked!

Creating a train when too less trains in depot

I configured the train creator to send my train to the next depot (connecting it by wire). But before it must wait before a rail signal; which switches only to green, if the depot is "too empty". Finding out that state is simple, I count the number of green signals before a depot stop - other methods may be more elegant, of course. In that case I switch the waiting signal at the train creator to green. When that train has left a new train is created.

Destructing a train when too much trains in depot
There is a "trick": The destructor train station has also the name "Depot". But normally the path to that stop is closed. But if there are too many trains waiting (all waiting bays are full, same signal: I count the number of free signals) the path to the train destructor is freed and - cause that's the last stop that is not occupied - the train follows that path. And is destructed, when arrived. Nice.

The destructed parts go into a chest and will be reused if needed (see above). With a bit afford I could build belts to feed the needed parts back into the requester chest of the builder.

Summary:
Great fun to see the creation and destruction of trains and it feels right to use that: You don't need to have ridiculous big depots. Instead you have ridiculous numbers of trains in a chest.

And feature suggestion
I really think those two mods should be included into LTN. I looked into the code of both and I think both mods could be simply reduced to one kind of train stop that includes a requester and a provider chest (like the LTN stop includes lamp and constant combinator). The requester has no hidden function, it just requests numbers of trains and wagons. And the whole building/destruction is controlled by signals - as with LTN.

I think that is the next logical step to fully automate stuff. Of course the creation of trains should be a lot more configurable (I need to tweak the mod a bit to built that kind of trains I need). And I think the Builder and Destructor should be much, much bigger, some kind of "trainyard".
Why not go even simpler:

Code: Select all


-S-[destructor] [constructor]-S-T-S-

S - Signal
T - Train stop
A new train is constructed. But it can only leave when the train stop is empty. Otherwise it blocks the constructor so no more trains can be constructed. Once the train stop clears the train leaves the constructor and the next train is constructed. On the other end empty trains return to the destructor and are destructed.

You don't need any bays at all. The downside is that every train gets destructed and constructed every time it loops around. If that is a slow operation then it is no good.

User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2916
Joined: Sat Jun 11, 2016 6:41 am
Contact:

Re: A perfect combination: Using Train Builder and Train Destructor

Post by Optera »

ssilk wrote:Yes. Perhps a combined mod just for that would be better, cause that would then be usable standalone.
Creating a mod pack consisting of LTN + Constructor + Deconstructor is no problem.
My license explicitly allows LTN being used in mod packs as long as they don't make any change to LTN except load order in info.json and variables in config.json.

Problem is, mod packs offer very little benefits in Factorio that'd be worth dealing with mod version fragmentation.
Factorio is one of the best games for modding I know. Most decently made mods are inherently compatible, or can be made compatible simply by adding optional dependencies. (If only Bethesda games had that)
Where other games require mods being repackaged to become compatible, in 0.15 we can simply click "sync with save" and get a state where mods will work together.

Beside that, if I made a mod pack, I'd end up rewriting the other mods in the pack as I did when taking over Loader Redux. :lol:
So, sorry for this off-topic, but I think there are not much more spaces, where I can
No problem, I know your ideas tend to de-rail, also LTN did originate from one such derailed ideas of yours. ;)

Post Reply

Return to “Logistic Train Network”