Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Do derailed minecarts rejoin tracks  (Read 545 times)

levraininjaneer

  • Bay Watcher
    • View Profile
Do derailed minecarts rejoin tracks
« on: January 16, 2017, 05:14:40 pm »

Hi there

Just checking (couldn't find an answer quickly):

Once a minecart has derailed, will it ever rejoin a track? If yes, are there conditions to this happening?
I want my minecart to derail, but not to spill its goods. What should I do?

Thanks
Logged

Fleeting Frames

  • Bay Watcher
  • Spooky cart at distance
    • View Profile
Re: Do derailed minecarts rejoin tracks
« Reply #1 on: January 16, 2017, 11:20:42 pm »

"Derailing" means just not turning on a corner and instead going straight when there isn't a wall after it - and that's only L-type corner. The carts don't leave the floor when they do this, though; as such, "rejoining" has the same lack of meaning as with slower carts.

Carts going that fast can also have some other fun properties such as jumping over holes where a slower cart might go inside them, but that different thing.

As for the second half...Well, spilling goods happens at 55k+ speed while hitting the wall, while derail happens at 50k. So, you could engineer your track systems so that all wall-hitting after derail happens between 55k and 50k speed (tricky, but possible with ramp acceleration being nearly 5k, or rollers being 50k exactly if you use it).

Or alternatively, add a speed limiter after the derail sections, so minecart won't hit the walls in the first place.

Loci

  • Bay Watcher
    • View Profile
Re: Do derailed minecarts rejoin tracks
« Reply #2 on: January 17, 2017, 02:01:47 am »

Most minecart tracks do not "rail" minecarts at all. For example, sending a cart eastward:

A:  x->--------------

B:  x->||||||||||||||

Both examples behave identically; the north/south tracks do not actually impede eastward motion, nor do the east/west tracks enforce it.

The most notable exceptions are corner tracks--when traversed properly, they convert velocity in the entering direction into velocity in the exiting direction.

It is quite possible to get a cart to "derail" in the middle of example A (or B) by giving it a non-zero north/south velocity using a corner ramp, roller, minecart collision, etc. A proper corner will "re-rail" the cart (to the extent that is possible) by zeroing it's velocity perpendicular to the exit, causing it to again follow nice straight lines.

But all that is rather academic, and I doubt that "derailing" a minecart is your ultimate objective. Perhaps if you tell us what you actually want to accomplish we might be able to suggest a good way to go about it.
Logged

levraininjaneer

  • Bay Watcher
    • View Profile
Re: Do derailed minecarts rejoin tracks
« Reply #3 on: January 17, 2017, 03:20:46 am »

Hi guys

Indeed, yes: my objective was not to derail the cart as such.

I merely wanted to stop carts going in one direction on a certain turn, while wanting to allow carts going in the opposite direction to speed on. It was as much an exersize in minecart education as anything else.

So I had a de-railable corner, and everything was working the way it should, except that the goods got ejected. I played around a little and managed to fix it with a wall-supported corner track after the derail, and then a highest-friction track stop.

So to be clear:
Ejecting goods is not dependent on being railed or de-railed, but rather with hitting a wall at 55k+.
There is no real difference between "railed" and "derailed" minecarts. Rather: at speeds below 50k, a cart will turn at a corner* with no wall behind it, while at speeds above 50k, such corners (and all other non-ramp tracks) are treated, are simply treated as a tile with 10 friction.

*Provided the corner is correctly configured
Logged

taptap

  • Bay Watcher
    • View Profile
Re: Do derailed minecarts rejoin tracks
« Reply #4 on: January 17, 2017, 07:52:13 am »

This seems right.

Effectively a derailed cart is "railed" again as soon as there are rails again in its movement direction. There is no different state of the cart involved. As long as no diagonal movement is involved it is rather controllable and simple.

A good module you are looking for are two track corners (NE) given as L, minecart entering east.

Code: [Select]
#LL--<<<
 ##

What happens? Slow minecart turns north on the first corner it meets. Fast minecarts "derails" directly into the next supported corner and turns north there without any spilling. Since you separated fast and slow carts, you can now do what you want further down the line.

Understood that? Too easy? Now try this: http://dwarffortresswiki.org/index.php/DF2014:Minecart#Controlling_Speed - your classical speed limiter, put in fast loaded cart get out slow loaded cart. "Derailing" aplenty, but no spilling ever. Once speed is slowed down sufficiently it leaves.

Loci

  • Bay Watcher
    • View Profile
Re: Do derailed minecarts rejoin tracks
« Reply #5 on: January 18, 2017, 01:31:37 am »

If your carts have variable speeds, or if you don't want to think about the speeds at all, you can merge two tracks with a vertical drop:

side view:
___________________________
A ----                         |
_____                          L_____
B --------------------------- C
___________________________

Carts from A (and B) go to C, while carts from C only go to B.


You could also use an active control system triggering on directionality, weight, timing, etc. to selectively reroute some carts using rollers, hatches, doors, or the like.
Logged

levraininjaneer

  • Bay Watcher
    • View Profile
Re: Do derailed minecarts rejoin tracks
« Reply #6 on: January 18, 2017, 05:15:29 am »

Yes, indeed vertical merging is about the only way you can join two lines (i.e. origin A to destination C, origin B to destination C), without going at derail speeds. As far as I can tell, there is no way to even do this (on only one z-level) using pressure plates doors and/or bridges.

Or is there...

I suppose that, if you carve a legitimate corner track without a wall (remember, we are sub-derail speed), and you build a retracting bridge over it, and connect it to a pressure plate, a cart that triggers the pressure plate will turn, while a cart that does not will go straight, yes?

Code: [Select]
1: Normal situation: Sub-derail speed cart coming from A will get to C
A====bbb====C
B=P===╝

2: When cart m comes from B and triggers pressure plate P

A=====╔====C
B=P=m=╝
    →

When Cart m from B triggers pressure plate P, bridge bbb retracts (or raises to left) and cart B will also get to C
(provided there's enough time for bridge to retract before it gets there)
... yes?
Logged

Fleeting Frames

  • Bay Watcher
  • Spooky cart at distance
    • View Profile
Re: Do derailed minecarts rejoin tracks
« Reply #7 on: January 18, 2017, 06:23:39 am »

So what you want is to have both carts A and B go to C and carts from C go to A, right?

Just swap the A and B in that diagram, then; no buildings necessary
B=╔=C
A=╝

Carts from A and B will go to C, while carts from C will go to A.
If 50k+ speeds are a concern, add walls as necessary. i.e.
    BA
#╔╝╝#
#C##

As for the drop merging, I'd recommend a valid ramp right before the drop to make cart enter the drop instead of flying into a wall.

PS: If you need to work with pressure-plate based merging, I recommend hatches. Built a weight-sensitive one for 10 different weights in DF Together myself to sort empty carts back to different quarries after they dumped their load of marble, iron, gold or whatnot. (Mind the jumps over holes if you do this with higher speed carts)
« Last Edit: January 18, 2017, 06:26:05 am by Fleeting Frames »
Logged

levraininjaneer

  • Bay Watcher
    • View Profile
Re: Do derailed minecarts rejoin tracks
« Reply #8 on: January 18, 2017, 06:55:10 am »

I am an idiot.

Your method works for both sub-derail and derail speeds (provided a wall is added north of the SE track corner).
Logged