Reference Manual‎ > ‎Signalling Guide‎ > ‎

Train Simulator Signalling

Using Signals

Whilst this documentation is generally aimed at the developer, this is also reference available to users who would like a deeper insight into some of the content available in Train Simulator.

For detailed information on the signalling systems provided, please see the Signal Asset Glossary

Source Files

You can obtain a copy of all the default signal source files, for educational purposes only, from the Downloads section.

The source files include four signal systems:
  • UK Modern Colour Light
  • UK Semaphore
  • German Modern HP
  • US Modern Colour Light
The download will allow you to examine the general configuration of signals including their blueprints and scripts, as well as the source 3D Studio Max mesh and texture files that form the physical asset used in Train Simulator.

Developing Signals

What follows is detailed information regarding the development of Signal systems for use in Train Simulator.

Every signal in the Train Simulator world is an instance of a particular signal blueprint which defines that signal type. The blueprint controls everything from the 3D model that’s used in the game to the name that’s displayed in the Editor and which LUA script is used to control the signal’s behaviour.

These scripts react to events such as a train passing the signal or a message being received from another signal, and then change the appearance of the signal as appropriate, switching lights on or off or animating any moving parts the signal may have.

This document will explain how to set up signals using the Blueprint Editor and the LUA scripting language, and how the various signal scripting functions work. It assumes some understanding of LUA, although a user without scripting experience should be able to make modifications to the existing scripts so that they work for a custom signal.

This document should give the user a working knowledge of how signals are set up, how scripts control their behaviour, which functions the scripts require, and how those functions all fit together.

Although Train Simulator's signalling system is inherently complex, the good news is that much of the hard work has already been done. Many of the signal scripts that ship with Train Simulator are fairly generic and can be easily adapted to work with a wide range of different signal types. New signals can often be created simply by copying an existing signal script and editing it to suit.

A good place to start is to look at existing scripts that behave similarly to the signal you are trying to create. Train Simulator's signal scripts tend to contain lots of comments and debug messages, which should help to explain what the signals are doing and why.