Setting Up & Using Signals

Using the Blueprint Editor

The Blueprint Editor is a simple tool for creating and editing blueprints for objects to place in the game world. In this case, the object is a signal. To start, open the Depot and find a simple signal.
  1. Start up the Blueprint Editor.
  2. Click on the + next to where it says "Kuju" to expand the list of Source Files.
  3. Do the same for RailSimulator, RailNetwork, Signals and finally UK Colour Light.
  4. In this folder are all the scripts that control the signals. Scroll to the bottom of the list. Here there are folders containing blueprints for the modern UK signals. Expand the UK_Mod_Shunt folder.
  5. Double click on UK Mod ShuntSig Exit.
The Blueprint Editor will now display the blueprint for the UK Shunt Exit signal. The relevant fields are:

Display NameThe name displayed for this signal in the object list in the Editor, for each of the languages that are supported by Train Simulator. The Display Name needs to be unique or it will not be possible to tell which signal is which
CategorySignals should be flagged as Track infrastructure to ensure they appear in the correct part of the object list in the editor
Geometry IDThis is the 3D model used in the game for this signal type
Signal - Number Of Track LinksThis sets how many links the signal will have when it is placed in the world
Signal - StoppingWhether a train ever needs to stop at this signal. In most cases, this should be true so that trains will stop at the signal if the track ahead is blocked, but for certain signals (such as a distant or repeater signals, which shows the state of the next signal up the line rather than the track itself) this should be false
ScriptThe LUA script which will be used to control this signal’s behaviour

To see what the signal is going to look like in the game, click on the Preview button. This will load the signal into the game engine. It may be necessary to move the Blueprint Editor window out of the way to see it.

As in the route editor, it is possible to click on the model and move it around. This signal consists of a single model, so moving it around won’t actually change anything. But if the signal was made up of multiple models (for example, a signal light mounted on a post) it would be possible to change the relative positions of the models in this way to make sure they all lined up correctly (eg, making sure the light was mounted on the top of the post).

Once the signal is set up correctly, save the changes by clicking on the Save button. DO NOT do this now, as this is a real signal used by the game, and changing it could break the signalling on the British routes. If you have made any changes to the blueprint, double-click on another blueprint and click "no" when it asks if you want to save changes. Then go back to the shunt exit blueprint and make sure that any changes you made to it have disappeared.

Exporting Blueprints

If you create a new blueprint or edit an existing one, before you can see your changes in the game, you must first export the blueprint. This will compile all the source files referenced by the blueprint and copy them to the appropriate folders. To do this, just click on the Export button.

At the bottom of the blueprint editor window, there is a debug output area. Pull up the window separator that stretches across the screen below the blueprint to expand this area so that you can see the text displayed there.

If your export succeeded, you will see a list of files that have been compiled and copied, with the words “Successful build” at the end. Any errors will be flagged.

Don’t worry if it didn’t compile – this is a basic signal that may not be included in your specific version of Train Simulator, and therefore may not be relevant to you.

Signal Link Placement

Now shut down the Asset Editor and load the game. Select Build and then New Route. From the dialog box, scroll the list and click on Default, give your new route a name and click CreateWhen the game finishes loading, select the Linear Object Tools mode and lay down a length of track with another line diverging from it to form a junction.

Then go back to Object Tools mode to place the signal. Click on the little signal icon in the second box down on the left to list all the signals ("Track Infrastructure" – remember this was one of the options set in the blueprint), and scroll down all the way to the bottom to find UK Mod ShuntSig Exit (the display name that was set in the blueprint for this signal).

Click on the signal’s name and then position it so that it is just next to one of the two lines that split at the junction, a little way up the track. Press the left mouse button to place it in the world and (keeping the button pressed down) move the mouse left or right to rotate it until it’s facing in the correct direction – looking towards the junction, the front of the signal with the lights on it should be visible.

As soon as the signal is placed, you’ll see a pale blue box with an arrow coming out of it, connected to the signal by a line. This is a track link. The box shows where the link is on the track, and the arrow tells which direction it’s facing. Move the cursor so that it’s over the track just next to the signal. It snaps to the middle of the track. When it is positioned correctly, click the left mouse button again to place the link there.

This particular signal has two links (again, this was set in the signal’s blueprint), so now the second link must be placed.

Notice that this second link has a number 1 above it. The first link placed is link 0. Link 0 always goes near the signal it belongs to. Link 1 (and any other links after that) should be positioned further down the line, beyond the junction(s) that the signal is protecting.

In this case, the shunt signal’s link 1 should go on the track a couple of meters beyond the junction, after the lines have merged. Again, hover the mouse cursor over the track and then click the left button when the link is in the right place.

Now all the links for this signal are positioned and another signal can be placed. Place a second signal next to the other line, and again position its first link near the signal and the second link beyond the junction, after the two tracks have merged together.

Right-click to stop placing signals. To check that the links are in the right place, click on the Linear Objects Tool button in the top left box to go into track editing mode. You should now see a red triangle hovering just above the track near the junction. This is the point at which the track splits ready for the junction.

Next press the spacebar. This changes the track view mode in the editor, giving useful visual information about track directionality and other settings. Press space a few times until green lines appear on the track representing the position of the signal links.

Both signals should have their link 1 on the other side of the red triangle from their link 0. If the link 1 isn’t far enough out, select the signal whose link is in the wrong place, hover the mouse over its link 1 until it highlights, and then left click and drag the link along the track until it is in the right place.

Once all the links are correctly positioned, click on the Drive icon in the bottom right of the screen to save the route and go back into the game. The two signals will now initialise – one of them will keep its lights on, the other will turn its lights off.

If you go to the 2D map (press 9) and zoom in on the bit of track you placed, you should see the junction represented by a blue dot. Just beyond where it splits is a red dot representing one of the signals and a green dot representing the other. This indicates that one of the signals is blocked and the other is clear.

Hold down shift and left click on the blue dot representing the junction to switch it. After a second the green dot should turn red and the red dot should turn green. Exit the 2D map and you’ll see that the lights have switched as well. This shows that the signals are working correctly.

Link Replacement Rules

Although the shunt exit signal is very simple, some junction signals have more than two links, and it's important to ensure that all of these are in the right places if the signal is to work correctly. So when you're placing signals, bear in mind the following rules:
  • A signal's link 0 should always be placed on the track closest to the signal.
  • Any other links the signal has should be placed beyond link 0, further up the line.
  • Every valid route for a train passing this signal going forwards should have a link on it. Link 1 normally goes on the route that's straight ahead, and any other links go on diverging routes to either side.
  • These links should be placed beyond all of the junction(s) covered by this signal - there shouldn't be any more junctions between one of those links and the next home signal on that route.
  • A signal's links should normally all be facing in the same direction. In other words, if you pass link 0 going forwards and keep travelling in the same direction, you should pass the next link belonging to this signal going forwards as well. The editor usually places links the right way round automatically, but it can get confused if you place a signal on a piece of track that curves by more than 90 degrees. If one of your links is facing in the wrong direction, you can reverse its direction manually by holding down SHIFT and clicking on the link.