Let us restrict the number of trains a train stop can accept
Moderator: ickputzdirwech
Let us restrict the number of trains a train stop can accept
Hi.
I've been playing this great game for a while now, and in my last game I've tried to implement an on-demand resource supply system.
The idea is really simple: all loading train stops share the name of resource it provides ("Iron", "Copper", "Oil", etc). Trains are waiting at circuit-controlled semaphore in some sort of a stacker and they leave it only if the factory needs resources. Once a resource drops bellow certain amount, the semaphore turns green, and the train chooses one of the resource providing train stops (which opens it's entrance semaphore only when it has enough resource stored in it's chests), goes there, picks up the resource, comes back to unloading station and finally goes to train stacker.
The problem: when stacker opens it's semaphore, all waiting trains go to the same loading station even if that station can supply only one train (which is common for oil outposts).
Possible solution: let us restrict the number of trains a train stop can accept. I'd like to send a signal to train stop which would say it to accept only specified amount of trains. If train stop is not connected to circuit network it can accept unlimited number of trains (default behavior). Otherwise train stop is visible to the specified number of trains (which can already be enroute to this train stop) and is not (disabled) for all other trains.
Thanks
I've been playing this great game for a while now, and in my last game I've tried to implement an on-demand resource supply system.
The idea is really simple: all loading train stops share the name of resource it provides ("Iron", "Copper", "Oil", etc). Trains are waiting at circuit-controlled semaphore in some sort of a stacker and they leave it only if the factory needs resources. Once a resource drops bellow certain amount, the semaphore turns green, and the train chooses one of the resource providing train stops (which opens it's entrance semaphore only when it has enough resource stored in it's chests), goes there, picks up the resource, comes back to unloading station and finally goes to train stacker.
The problem: when stacker opens it's semaphore, all waiting trains go to the same loading station even if that station can supply only one train (which is common for oil outposts).
Possible solution: let us restrict the number of trains a train stop can accept. I'd like to send a signal to train stop which would say it to accept only specified amount of trains. If train stop is not connected to circuit network it can accept unlimited number of trains (default behavior). Otherwise train stop is visible to the specified number of trains (which can already be enroute to this train stop) and is not (disabled) for all other trains.
Thanks
Re: Let us restrict the number of trains a train stop can accept
I've actually implemented this train stop behavior using the pdb file, which comes along with factorio executable and made this video..
I could share the source code of my DLL implementing this behavior but I need explicit permission from devs to do so.
I could share the source code of my DLL implementing this behavior but I need explicit permission from devs to do so.
Re: Let us restrict the number of trains a train stop can accept
You should try this mod: https://mods.factorio.com/mods/Optera/L ... ainNetwork
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
-
- Manual Inserter
- Posts: 4
- Joined: Mon Feb 06, 2017 8:36 pm
- Contact:
Re: Let us restrict the number of trains a train stop can accept
Logistic Train Network is nice mod but it sticks us with predefined logistic and schedules.
Its just turn trains in some kind of high capacity drones.
While with proposed solution and logic network we could create greater variety of way toruin everything deliver goods.
For example using Logistic Train Network is hard to organize warehouse avoiding direct delivery from deposit and almost impossible to prevent empty trains going between exchanging stations.
It would be cool to have such mod allowing to restrict number of trains simultaneously going to station by sending logic signal but unfortunately afaik mod api doesn't capable to that kind of things.
I hope 0.15 train stop disabling will work this way
Its just turn trains in some kind of high capacity drones.
While with proposed solution and logic network we could create greater variety of way to
For example using Logistic Train Network is hard to organize warehouse avoiding direct delivery from deposit and almost impossible to prevent empty trains going between exchanging stations.
It would be cool to have such mod allowing to restrict number of trains simultaneously going to station by sending logic signal but unfortunately afaik mod api doesn't capable to that kind of things.
I hope 0.15 train stop disabling will work this way
Re: Let us restrict the number of trains a train stop can accept
And this suggestion does not? Or what?metacreamy wrote:Logistic Train Network is nice mod but it sticks us with predefined logistic and schedules.
Well, I think you are wrong here.
Right target is viewforum.php?f=28 Modding interface requests
or the already mentioned thread about Logistic Train Network Mod.
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
Re: Let us restrict the number of trains a train stop can accept
I'd be interested in seeing what ever code you've managed to createGrayMage wrote:I've actually implemented this train stop behavior using the pdb file, which comes along with factorio executable and made this video..
I could share the source code of my DLL implementing this behavior but I need explicit permission from devs to do so.
If you want to get ahold of me I'm almost always on Discord.
Re: Let us restrict the number of trains a train stop can accept
So can I treat those words as explicit permission to post my code on Github?Rseding91 wrote:I'd be interested in seeing what ever code you've managed to create
Re: Let us restrict the number of trains a train stop can accept
Yes, you canGrayMage wrote:So can I treat those words as explicit permission to post my code on Github?
Re: Let us restrict the number of trains a train stop can accept
Uhh... I finally managed to post the source code on GitHub. Here. Test maps included. Hope you guys will have a look at what I've done and consider implementing this in future release.
Re: Let us restrict the number of trains a train stop can accept
Twinsen said he already did it in 0.15, but I haven't checked
Re: Let us restrict the number of trains a train stop can accept
Yay! Can't wait. Thank you.
Re: Let us restrict the number of trains a train stop can accept
Are these feature is still on the line ?
I really wish this feature.
Recently i've been playing with Concurrent Train Restriction mod,
https://mods.factorio.com/mod/Concurren ... estriction
And i can't help but amazed how simple yet powerful this train restriction feature are, this really should be in vanilla.
It solves many "problem" with various train mod, in some part of of it, all of them still requiring us to naming train stop with unique identifier (Coal1, Coal2, Iron1, Iron2, etc)
But this mod, is working EXACTLY just as the original suggestion, it doesn't need a unique identifier.
All train stop that have same purpose can share a same name.
And it's so very simple to setup, can even dynamically adjust number of train (based on supplied signal)
The only problem with this mod, well, the author rarely active, so it crash often under certain circumstances.
I really wish this feature.
Recently i've been playing with Concurrent Train Restriction mod,
https://mods.factorio.com/mod/Concurren ... estriction
And i can't help but amazed how simple yet powerful this train restriction feature are, this really should be in vanilla.
It solves many "problem" with various train mod, in some part of of it, all of them still requiring us to naming train stop with unique identifier (Coal1, Coal2, Iron1, Iron2, etc)
But this mod, is working EXACTLY just as the original suggestion, it doesn't need a unique identifier.
All train stop that have same purpose can share a same name.
And it's so very simple to setup, can even dynamically adjust number of train (based on supplied signal)
The only problem with this mod, well, the author rarely active, so it crash often under certain circumstances.
Re: Let us restrict the number of trains a train stop can accept
Huh. Another thread with this idea, though this one has an interesting detail that it looks like this was a feature that was supposed to be in 0.15. I wonder what happened. o.O
Re: Let us restrict the number of trains a train stop can accept
This was added in 1.1.
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.