railway scheduling confusion

Don't know how to use a machine? Looking for efficient setups? Stuck in a mission?
Post Reply
Luckyfalkor84
Manual Inserter
Manual Inserter
Posts: 3
Joined: Mon Nov 11, 2019 1:47 am
Contact:

railway scheduling confusion

Post by Luckyfalkor84 »

in my game, i have multiple little outposts that house defenses and artillery.
i run a train that runs supplies such as walls, repair kits, and shells.
when an outpost has all that it needs (like 10 walls, 10 turrets, and etc) combinators will trigger the train stop to shutdown till it needs more resources

what is happening:
my train gets supplies from home and then travels to each outpost, skipping the shutdown stops
the train runs out of shells at stop 2 of 6, the train will go to each and every other stop till it makes it back home and loops the schedule again.

what i want it to do:
when it runs out of shells at stop 2 of 6, i would like a way (either vanilla or through a mod) to instruct the train to head back home without visiting the other stops.

i tried a mod called Smarter Trains and it looked like it might work, but i could not get it to play nice.

i would settle for a scanning the train contents with combinators and sending a specific signal to the train through the stop to go to a specific stop (as in home), this is what i was trying to do with Smarter Trains mod.
the combinators scanning the train read 0 till the train is docked but will emit that info to the stop before it gets an updated picture of the train contents.
in that split second, this results in the condition for moving on to the next stop being met before realizing there is no need to move on quite yet.
i know it is a split second because the condition flashes but i keep it from moving on with an attached AND condition so i can see that i am dealing with a Race Condition issue.

User avatar
DaveMcW
Smart Inserter
Smart Inserter
Posts: 3699
Joined: Tue May 13, 2014 11:06 am
Contact:

Re: railway scheduling confusion

Post by DaveMcW »

Name all your outpost stations the same.
Your train schedule should only have 2 stations, outpost and main base.

This works great if you only have 1 train. Mods or complex designs are needed if you want multiple trains to avoid trying to supply the same outpost.

astroshak
Filter Inserter
Filter Inserter
Posts: 597
Joined: Thu May 10, 2018 9:59 am
Contact:

Re: railway scheduling confusion

Post by astroshak »

Name each delivery station the same thing. Use a Constant combinator and set a negative amount of everything that you want (-20 walls, -15 Turrets, -15 Laser Turrets, -10 Artillery Shells). Using Filter Inserters and separate chests for each item, offload the train to slot-limited chests. Wire up all the chests to that Constant Combinator and the Train Station. Set the Train Station to Anything < 0.

Set the train to leave after 5 seconds of inactivity.

The train will only run to stations that are missing stuff. Lock the slots on the chests so they hold a greater amount than the Constant Combinator is asking for if you want to maintain a buffer so the train is not called as soon as something gets used.

At first, the train will run back and forth between its supply station and its delivery stations as it attempts to meet each station’s initial demand. After that is filled, the train will wait at the loading station, until a station needs something.

As a tip : use Artillery Wagons to cart your Artillery Shells around. A regular Cargo Wagon can hold 40. An Artillery Wagon can hold 100. Just beware the swarm should those Artillery Wagons decide they want a piece of the nest-killing fun too.

Luckyfalkor84
Manual Inserter
Manual Inserter
Posts: 3
Joined: Mon Nov 11, 2019 1:47 am
Contact:

Re: railway scheduling confusion

Post by Luckyfalkor84 »

thanks for the info.
seems to work well enough.
i had hoped to be able to input logic such that it could keep visiting outposts till it ran out of any one thing.
though this is the next best thing.

torne
Filter Inserter
Filter Inserter
Posts: 341
Joined: Sun Jan 01, 2017 11:54 am
Contact:

Re: railway scheduling confusion

Post by torne »

What I typically do is name all the supply stations the same thing and then put it into the schedule several times, so the train goes to:
- depot
- resupply
- resupply
- resupply

or similar. This enables it to go to more than one station in a trip without it going to every single one of them. There's normally room on the train for enough supplies for a couple of stations, so this rarely results in the station not getting a full resupply.

urza99814
Long Handed Inserter
Long Handed Inserter
Posts: 91
Joined: Sat Dec 10, 2016 12:57 am
Contact:

Re: railway scheduling confusion

Post by urza99814 »

torne wrote:
Tue Nov 12, 2019 5:45 pm
What I typically do is name all the supply stations the same thing and then put it into the schedule several times, so the train goes to:
- depot
- resupply
- resupply
- resupply

or similar. This enables it to go to more than one station in a trip without it going to every single one of them. There's normally room on the train for enough supplies for a couple of stations, so this rarely results in the station not getting a full resupply.
That's what I usually do, and it's particularly good when you're expanding your borders. If you build the stops fast enough (ie, build the next one before the artillery at the last one stops shooting) what will happen is the second to last stop on the line empties the train of artillery shells, and the last one pulls all the building material. That way you can ensure the artillery won't start pulling biters until the defenses are fully constructed without actually putting any effort into achieving that. :)

Luckyfalkor84
Manual Inserter
Manual Inserter
Posts: 3
Joined: Mon Nov 11, 2019 1:47 am
Contact:

Re: railway scheduling confusion

Post by Luckyfalkor84 »

that suggestion is pretty good, I'll give that a shot, thanks.
it still is not a "dynamic" schedule but I'm being a tad picky now.

elsarams4
Manual Inserter
Manual Inserter
Posts: 1
Joined: Tue Nov 26, 2019 8:57 am
Contact:

Re: railway scheduling confusion

Post by elsarams4 »

astroshak wrote:
Mon Nov 11, 2019 12:36 pm
Name each delivery station the same thing. Use a Constant combinator and set a negative amount of everything that you want (-20 walls, -15 Turrets, -15 Laser Turrets, -10 Artillery Shells). Using Filter Inserters and separate chests for each item, offload the train to slot-limited chests. Wire up all the chests to that Constant Combinator and the Train Station. Set the Train Station to Anything < 0.

Set the train to leave after 5 seconds of inactivity.

The train will only run to stations that are missing stuff. Lock the slots on the chests so they hold a greater amount than the Constant Combinator is asking for if you want to maintain a buffer so the train is not called as soon as something gets used.

At first, the train will run back and forth between its supply station and its delivery stations as it attempts to meet each station’s initial demand. After that is filled, the train will wait at the loading station, until a station needs something.

As a tip : use Artillery Wagons to cart your Artillery Shells around. A regular Cargo Wagon can hold 40. An Artillery Wagon can hold 100. Just beware the swarm should those Artillery Wagons decide they want a piece of the nest-killing fun too.
I'm newbie, but it helped. Thanks

astroshak
Filter Inserter
Filter Inserter
Posts: 597
Joined: Thu May 10, 2018 9:59 am
Contact:

Re: railway scheduling confusion

Post by astroshak »

You’re welcome!

quyxkh
Smart Inserter
Smart Inserter
Posts: 1027
Joined: Sun May 08, 2016 9:01 am
Contact:

Re: railway scheduling confusion

Post by quyxkh »

The other thing you can do is wire the delivery stops and supply stop together, then read the train contents at the delivery stops and if anything's missing enable the supply stop. Have the supply stop alternate with your delivery stops and you're golden. This will let your train feed multiple delivery stops each run, which might help if the consumption rate's really bursty.

Post Reply

Return to “Gameplay Help”