Creating Signal Type

Signal types are loaded dynamically and custom signal types can be created in the 'signals/' folder.

This document describes how to create custom signal types. The existing signals are also great for understanding file structure and how the models are drawn.

Create Directory (And define ID)

The name of the signal type's directory is also the id of this signal type. This directories name must start with your initial or some other rather unique character combination, followed by an underscore (_), to prevent name collisions. If relevant, follow the prefix by the country code.

IDs without leading initials (such as 'SE_electric rather than 'ene_SE_electric') are reserved for the signals shipped with the extension (and 'ene_' prefix is already reserved by me, Eneroth3). Using such an ID for your own signals may lead to it being overwritten when updating the extension. Create a directory with the chosen ID as name in 'signals/' to save the files for the signal in.

Making the Models

The signal should be horizontally centered at the origin. The origin corresponds to the top of track plane and the foundation of the signal can go further down into the track bed.

The front side of the signal should be facing Positive y. This may seem a bit backward since it's the back side of the model, however it's consistent to how track endings are drawn since the signal is turned inwards to the track its drawn on and not outwards away from it.

All indicators are drawn in the same model but only the one currently used will be visible. Indicators can be either groups or components and are identified by their name.

valid indicator names:

Some signal types uses different diverging indicators for right or left, some uses the same. The same goes for the through indicators. The plugin first tries to show the indicator also showing left or right and falls back to only showing through or diverge if it cannot be found.

Diverge Left Diverge Right Diverge Through Left Through Right Through

Creating Info File

To create or edit signal information run Ene_Railroad.property_editor in the Sketchup console. Select signal, type in the ID of your signal type and then enter the information for it.

Signal info is optional and only shown when hovering signal type dropdown in track properties dialog.

distance_to_track is the distance between the track and the signal's origin. Leave blank for default length.

The name typically starts with the country the signal is from and then states if it's electric or mechanic.

Create Preview Image

To create the preview image of the signal, open preview.skp in signals/. Change signals type of the tracks in the model by right clicking it and open track properties.

The closer to 1362 * 610 the viewport size is, the better line thickness will match other previews. My Viewport Resizer can be used to achieve this.

The scene saved in the model has the camera angle matching other signal previews but since signals differ in size and position you may need to pan and zoom into a better location.

You can also open the track group, open its child groups until you can select the part functioning as a signal (not including the base), right click it and chose zoom extents. When opening the track group you will be asked if you want to prevent the group from being automatically redrawn in the future. Click no since you just need to open it to select an entity, not edit it.

Run this code in console to save preview image:

Ene_Railroad.save_preview_image

Distributing signal type

The whole folder for the signal type can easily be compressed, shared, and decompressed in someone else's signal folder.