SGTrains Forums
Developing: Crossover tracks - Printable Version

+- SGTrains Forums (
+-- Forum: openBVE Singapore (
+--- Forum: BVE Problems and Questions (
+--- Thread: Developing: Crossover tracks (/showthread.php?tid=385)

Pages: 1 2

Developing: Crossover tracks - Samuel Lee - 27 May 2011

Hmm, can somebody show an example code of route on how to create a leftward crossover and rightward crossover WITH the train crossing into another track?

The given example is a weak attempt to create the main line train from Clementi to crossover in Clementi sidings near UPD.

In order to preserve the route shape which is mainly Google Earth, the important code starts from position 32675 whereby the rail 2 was supposed to be the crossover track, had the line is a full line up to Joo Koon. However, since I want to terminate the train in Clementi sidings (Just like JEMP disruption), I had to crossover the train by that position. The tracks there had to be straight for the line.

The crossover ends at 32725 and the gap between 2 tracks should be 4.4

As for position 32850 onwards, there is a track from UPD to EB mainline. That sector is also not a concern. Please ignore the viaducts / 3rd rail issue. I can fix them later but not before the positioning of crossing over a track is done. Thanks a lot.

Download attachment:

RE: Developing: Crossover tracks - joeyfjj - 27 May 2011

You need to edit the entire route for the "main" track the user is on to turn there. That means shifting all the objects to the left/right too.

RE: Developing: Crossover tracks - Mark4211 - 27 May 2011

I also need to learn how to crossover tracks but SMOOTHLY.

RE: Developing: Crossover tracks - joeyfjj - 27 May 2011

(27 May 2011, 08:15 PM)Mark4211 Wrote:   Show/Hide


RE: Developing: Crossover tracks - Mark4211 - 27 May 2011

(27 May 2011, 08:18 PM) Wrote:   Show/Hide

Any demo? That need adjust the .rail # right?

RE: Developing: Crossover tracks - JerichoChua - 27 May 2011

To be honest, I myself do not know how to create crossover tracks, and make train really cross over. I kinda struggle in it so... Definitely need help Tongue

RE: Developing: Crossover tracks - Samuel Lee - 28 May 2011

(27 May 2011, 08:18 PM) Wrote:   Show/Hide

No. That does not work well.

From Willis's CGL, he used .turn 0.02, but it still become Rojak for mine.

Well, as for .curve, it is useless. I did tried that as well, but the other tracks are not straight enough.
(27 May 2011, 08:34 PM)Mark4211 Wrote:   Show/Hide

More or less. But that might work if that is unused crossover (Queenstown crossover, for an example).

RE: Developing: Crossover tracks - SMB142J - 28 May 2011

XXX (Position)
.curve -/positive XX (Any value) (crossover track. Which you are on previously, became the crossover track.)
.railstart XX (Continue the track which you are on previously)

XXX (Position)
.curve 0

XXX (Position) (When  you "crossed" over to the other track)
.curve -/positive XX (Any value)
.railend the track that you are crossing over to. (Let the crossover track continue)

And of course you must change the viaducts, object arrangement. I didn't insert the viaduct codes above cos' I dunno your walls arrangement.

If you want I can do a demo for you.

RE: Developing: Crossover tracks - Samuel Lee - 28 May 2011

Actually I have just found that
  • Code:
    command is widely used for routes that really crosses the track. But the downside is that the code is deprecated, a.k.a outdated code.
  • Code:
    command is the recommended code for any turning, and of course including the crossover. But the downside is that the .curve turns all declared rail into curvy shape. And we know that the crossover in Eunos, Aljunied, Yishun, Woodlands, Lakeside and many others are straight tracks, apart of the crossover itself. AND THIS IS WHY I STARTED THIS THREAD TO SEE HOW TO DO IT IN BEST OF BOTH WORLDS!!! AngryAngryAngryAngry

Anyway, thanks everybody for their enthusiastic participation. The given attachment is my version / implementation for the code in Clementi sidings before the entrance / exit to UPD.

You will need to download the first 7zip attachment IF you want to see the rails, viaducts and such.

Notes: This forum don't allow upload of .csv format. Why huh? Can I know what are the approved formats (7z is not, sorry. WTF? Freak!!!) or not? So, you have to change the .txt extension to .csv format.

Oh ya, I would also like to share and point out that
command DOES NOT continuously turn until
.turn 0
is called, as though
command only turns for 1 block of 25m tracks and for longer crossover of 50m or even longer, more
code might be needed to declared until the track straightened and make the same amount of
command in the other direction as previously did in order to crossover back the train.

This is what I observed from CGL V0.8 (Removed track type aka the 3rd rails / guide rails related and viaducts code):

Track.Signal -2; CHD1; -2.2; -1
;Notes: Start of crossover
Track.Turn 0.02
Track.RailStart 3;0;0;14
;Notes: Rail 3 was the track used for Boon Lay bound CGA trains that goes up high in the sky.
Track.Rail 3;-0.5
Track.Rail 1;3.5
;Notes: Rail 1 is CGA bound track
Track.Turn 0.02
Track.Rail 3;-1.5
Track.Rail 1;2.5
Track.Rail 3;-2.5
Track.Rail 1;1.5
Track.Rail 3;-3.5
Track.Rail 1;0.5
Track.Turn -0.02
Track.Signal -2; CHD2; 2.2; -1
Track.Rail 3;-4
Track.Rail 1;0
Track.Railend 1
Track.Turn -0.02
;End of crossover

To Willis: Please correct my misunderstanding, if any, as I am also confused of the rail index which was not documented.

RE: Developing: Crossover tracks - TIB437G - 24 November 2011

(27 May 2011, 04:49 PM)joeyfjj Wrote:   Show/Hide
i use RouteBuilder to create such tracks can?