Page 1 of 1

[Train Pathing] Include Ghost Images

Posted: Sat Aug 27, 2016 2:57 am
by IronCartographer
With the arrival of trains carrying roboports of their own, trains can now build, repair, and replace their own rail. Amazing! However, if a section of track is destroyed, a train will stop in its tracks and give a No Path error well before it has a chance to repair/replace the damaged rail.

So: Would it be possible to maintain train paths until there's no longer a ghost image?

Re: [Train Pathing] Include Ghost Images

Posted: Sat Aug 27, 2016 11:22 am
by ssilk
This is a suggestion where I have two minds.

One says "Cool, to achieve this we need to introduce, that blocks could have different maximum speed, so that a train doesn't crash into an open end. And if we think of open rails as a special kind of train stop, then (!) we could have automatic rail builder trains, that wait for broken rails and will repair them"

And the other says "Woaaa, what happens if I just change my rail paths? Built some rails, remove some. The trains should stop, long enough before they come to this, not continue! And how much afford you need to put into this to keep it running..."

Maybe like so: As mentioned above if a rail get's broken somehow, then the ends of the broken rail (or the beginning of the unbroken, just how you see it) create some kind of "hidden" train stop, with the name "Rail repair needed". A specially equipped trains has a schedule of "Rail repairer" and "Rail repair needed". And so waits for broken rails, drives automatically to them and repairs them. Hm. Would work with one-way traffic only.

Re: [Train Pathing] Include Ghost Images

Posted: Sat Aug 27, 2016 11:38 am
by IronCartographer
Trains crashing into the end of the rail wouldn't be a problem as long as that state were detected as "stopped" for the purpose of activating construction bots.

I envision having every train in the network (or at least the exposed parts of the network outside of any walled regions) built with a cargo wagon dedicated at least in part to maintenance and supply for the rails as well as outposts.

If you're actually *picking up* rail, the trains will still stop. It's only when there's a valid path through a ghost image that they will run into the end of the lines.

The alternative would be for a repair train to have regular stops along the line, and a dedicated rail alongside the rest. But can you imagine the explosion of train stops that would cause, getting enough of them to guarantee coverage? Not to mention setting up the train to visit them all in a proper sequence. Much, much simpler to have each train repair-capable and able to reclaim the ghostly remains of its previous track.

Re: [Train Pathing] Include Ghost Images

Posted: Mon Aug 29, 2016 11:44 pm
by Rhamphoryncus
I see two ways the game could go:
  • Biters attack rails (bot only sometimes? What about signals?) Ghost rails are included in paths. All trains get equipped with roboports. Train roboports are constantly active (but may slow/stop the train when they trigger.)
OR
  • Biters ignore rails as currently. Only service trains get roboports. Train roboports only activate when stopped at a station.
The first option has some realism appeal but the latter sounds like much better gameplay. No rabbit hole of consequences. Either way nothing should be done until vanilla actually uses roboports in trains (as opposed to supporting it for mods.)

Re: [Train Pathing] Include Ghost Images

Posted: Tue Aug 30, 2016 12:23 am
by IronCartographer
After some experimentation, it seems the fixes for biter AI toward rail in early-0.13 have prevented this from being as much of an issue as I thought. Power poles are at risk due to pathfinding aggro, but rail is ignored when biters reset from combat.

Edit: Do biters destroy rail in colonization attempts? I have heard stories about it, but never seen it.

Re: [Train Pathing] Include Ghost Images

Posted: Mon Sep 05, 2016 4:06 pm
by person3triple0
I'd like to jump in on this one. I really like the idea and I had an idea about another topic I was in awhile ago.

The Filtered Deconstruction mod comes to mind with this one, except instead of DEconstruction, a train will do repairs and replacements, but only on specific items.
For example, there could be a new train (or a module that does this with the grid) that gives the roboports a filter:
if(something is damaged/destroyed)
if(we can repair/replace it) //ie, checking the inventory to see if it has robots and repair packs
stop the train;
activate the robots;
//robots repair/replace
collect robots;
continue on path;

the only problem i see is that if there are biters nearby, the train will be attacked, so maybe a way to defend itself until the player can arrive would be needed

Re: [Train Pathing] Include Ghost Images

Posted: Tue Sep 13, 2016 1:58 pm
by IronCartographer
It would be pretty cool if trains could deploy destroyers. :)

Re: [Train Pathing] Include Ghost Images

Posted: Tue Sep 13, 2016 2:08 pm
by Deadly-Bagel
I've heard of players having biters colonising on their rails, spawning behemoths on the tracks which trains then run into and get blown up. So I don't think they destroy rails. I've never had this happen in any of my games either.

The problem with a "repair train" that tracks problems is if there is a train between the repair train and the damage, the repair train will not be able to get there. It would need to be a special entity that can move over the top of trains if it is to use rails, or you would need a third "maintenance" rail instead.

If we're going this far we might as well include weaponised carriages that only hold ammo or energy (both?) that is basically a carriage full of turrets. So you don't need to worry if there are still biters on your tracks as your weaponised repair train is fully equipped to deal with them.