Creating a Diamond Crossover complete with Track Node
by Jeffrey Kraus-Yao

Contributions by Yuri Sos


In his tutorial on creating diamond crossings, Vince Cockeram demonstrated that one track simply laid over another might be an expedient way to create a diamond crossing, but that it would not be recognised in the sim as such and thus trains would collide on the opposing tracks. A crossover node is required at the junction and up till now, only diamond crossings specially created and registered in the global tsection.dat, could be correctly signalled.

It is now possible to add a crossing node by direct editing of the track database files. This is not as daunting as it sounds!

Crossover nodes are used by MSTS signalling to control access to a track by a train in order to prevent collisions between Player and AI trains. Crossover nodes are automatically placed, being integral to special crossover track sections (e.g. default and Xtracks diamond crossing pieces) and when these track pieces are laid, two crossover nodes are installed at the same position with one crossover node per track.

However, the track database can be manually edited to add crossover nodes. By placing and converting track interactives (e.g. speed posts, deer hazards) placed by Route Editor (RE), the difficult part of selecting which track vector and calculating distance from start of track vector is done by Route Editor.


The Procedure

The first version of this procedure used "Speedposts". However, their unpredictability in areas other than isolated diamond crossings can make placing them problematic (they can sometimes not jump across 2 tracks or, more frequently jump across more than two tracks). (If you want to read the older tutorial, click here.)

It's probably better to use the deer hazard as at least you can be sure of its placement. You will need to use two deer hazards for each proposed node. Here's a non-noded diamond crossing as seen in AE>.

Start by backing up your route.

In Route Editor, start by placing a deer hazard on each track close to where the two tracks cross. Make sure the hazards are placed on separate tracks - we can move them later. This will create two Hazzard elements and link each TrVectorNode to the deer hazard by a TrItemRef element. Make a note of the World tile co-ordinates.

Save changes and quit Route Editor.

Using your favourite unicode-aware editor (ConTEXT is used in these screenshots), open the two track database files, route.tdb and route.tit and search for "Hazzard" (sic); they are generally the last two items in the file, but the RE will sometimes drop one of them into an empty spot further up the file; in the example shown, we can see that they are separated by a couple of other Items; here we have the .TDB file (the .TIT file will be identical but you must make identical changes to each file):

We're going to make a few changes to both nodes in both files.

  • Change HazzardItem to CrossoverItem : in two places in the two files;
  • Change the "6" in the TrItemSData to a "2". If this is not done the signals will not be enabled by the dispatcher;
  • Delete the complete line containing TrItemPData - in two places in the two files;
  • Add a new line CrossoverTrItemData ( tritemid trackshape ): in two places in the two files; the first parameter of the CrossoverTrItemData element is the TrItemId of the other pair of the crossing. The second parameter is a track shape. Choose the number of a crossing track and it will use the ClearanceDist defined for that track shape in the global tsection.dat file. Suggestions include
    • 75: this is the default A1tXover2_5d.s with a clearance distance of 50m; or
    • 76: this is the default A1tXover5d.s with a clearance distance of 25m.

Save your changes.

Now let's have a look at this diamond crossing in Activity Editor. Crossing nodes are visible, protecting this diamond.

The nodes are close to, but not exactly on the crossing. No matter, the crossing will still be protected. You can adjust the position of the nodes by altering the first parameter of the TrItemSData element, eg TrItemSData ( 339.645 00000002 ), where 339.645 is the distance in meters from the start of the trackvector. This number could be changed for both entries so the two nodes are on top of each other and then appear as one. I adjust the value by 5 or so metres (in both .tit and .tdb files)and simply reload the route in AE after each change to see how I'm going. Shown below, I've moved the east-west node, then the north-south node.

Finally, you should have both the .tdb and .tit files looking something like this:

Ok, now let's open Route Editor. As you open it, you may see an error message like this:

If you do, simply answer "yes" and continue. The Hazzard entries will be deleted in the World files. This will make changes irreversible. Immediately save and quit Route Editor, then re-start (RE likes to arc up if you don't folow this simple step and you may lose your route). Answer "No" if you may want to convert the crossing node back to a Hazzard for deletion with Route Editor.

Now restart Route Editor, place your signals, save and quit Route Editor.


Test Your Installation

It's time to create an activity and test.

Here we have a team-ALCO X class locomotive as the player engine and the default GP38-2 as the traffic (AI) engine. Upper quadrant semaphores have been placed so that you can see the aspect clearly. The loco has a green signal whilst the diseasel is held behind a red signal on the crossing track.

As soon as the train clears the crossing, the signal for the traffic train is set to green and the GP38 begins to move off.


Complex Junctions

(Added by Yuri Sos 12 May 2011)

This technique can be used to protect even complex junctions. Here's an example of a complex tramway junction with three separate tracks crossing over each other at the same place. All routes had to be signalled and protected for activities to work properly.

The outer crossovers were quite simply noded, thus:

The three-way junction looks tricky, but is in fact just three crossovers that happen to be sitting on top of each other. As you can see by the image below, the crossovers are for crossing paths 1 & 2, crossing paths 2 & 3, and crossing paths 3 and 1:

Following the principles above, I was able to place three pairs of deer hazards to create the three nodes protecting the junction completely. A few tips:

  • do only one pair at a time;
  • save and quit Route Editor to the desktop between each pair;
  • back up the route between each node placement.

The next three images show the placement one by one for nodes at 1-2, 2-3 and 3-1 respectively.

Once I had placed all the nodes (and written down the TrItem numbers for each pair), I then moved them all to the one position on the junction. The image below shows you the junction's appearance in AE.

The junction works a treat! Here below you can see a player (double-) tram crossing the junction (from left to right), another tram (AI) following one section behind, an AI tram in the opposite direction entering the junction and turning, whilst another two AI trams are coming up the street at right: no collisions, all waiting their turn at the junction (the route uses BNSF interlocking signals buried below street level):