Trackside Junction

File location: ...\Trainz\world\custom\trackside\

Trackside is used for special scenery objects that can be placed on or near the track, such as signals and speed limit signs.

Typical Directory Structure for custom Trackside should be:

World
custom
trackside
Custom_trackside
Config.TXT
Custom_trackside.IM Mesh
x.TGA
y.BMP
*.tecture.TXT

This is used for creating junction control levers.

Config.TXT File Example for Junctions

kuid <KUID:###:#####>
kind mojunction
region Australia
trackside 2
light 1
mode0 lever1
mode1 lever2
soundscript {
        toggle
        {
                 trigger toggle
                 distance 5, 100
                 nostartdelay 1
                 repeat-delay 1
                 sound {
                 points.WAV
                 }
        }
}
obsolete-table {
}
username
" "
description " "
trainz-build 1.3
category-class WX
category-region-0 AU
category-era-0

TAGS DESCRIPTIONS
region surveyor region
trackside this is a value that is the distance in meters the object is placed relative to the center of the track. Negative values will put the object on the left side of the track, and positive values will appear on the right.
light sets lighting to be used for object to be ambient or directional. 0 sets ambient lighting and object is light by general light value, 1 sets directional light which is affected by the position of the sun.
mode0 the model name, located in subfolder, of the initial junction. Example refers to a file lever1\lever1.IM
mode1 the model name, located in subfolder, of the switched junction. Example refers to a file lever2\lever2.IM
soundscript soundscripts for mojunction objects can be activated with toggle trigger message as in example.

Trackside Signal

File location: ...\Trainz\world\custom\trackside\

Refer to config.TXT files attached within ZIP file.

Config.TXT File Example for Signals

kuid <KUID:###:#####>
kind mosignal
light 1
trackside -2.7
function TrackSignal
region Britain
name "02"
fontsize 0.07
fontcolor 255,255,255
obsolete-table {
}
username
""
description ""
trainz-build 1.3
category-class WA
category-region-0 UK
category-era-0

TAGS DESCRIPTIONS
region surveyor region
light sets lighting to be used for object to be ambient or directional. 0 sets ambient lighting and object is light by general light value, 1 sets directional light which is affected by the position of the sun
trackside origin offset from track center expressed in meters
function must be set to TrackSignal
name default number board entry
fontsize font size for number boards
fontcolor RGB font color for number boards

Signals

The next section of the config explains which aspects the signal is capable of displaying, and also which light points are activated when each state is displayed. The supported aspects are configured by reference number as follows . . .

0 STOP
1 STOP THEN PROCEED
2 CAUTION AND LEFT DIVERGE
3 CAUTION AND RIGHT DIVERGE
4 CAUTION
5 PROCEED AND LEFT DIVERGE
6 PROCEED AND RIGHT DIVERGE
7 ADVANCED CAUTION
8 PROCEED
The following two aspects are only used for scenarios.
9 SLOW
10 MEDIUM SPEED

The aspect section of the config.TXT is arranged as follows . . .

signals
{
0 { (don't forget the 'space' between the number and bracket)
           light 7
}
2 {
           light 6,0,1,2,3,4
}
4 {
           light 6
}
}

Looking at the example above, under the heading signals we see the states the signal is capable of displaying in the left column. From this extract we can see that this signal is capable of displaying aspects 0, 2 & 4.

When aspect 0 (stop) is displayed, light point 7 is activated.
When aspect 2 (caution left) is displayed, light points 6,0,1,2,3,4 are activated.
When aspect 4 (caution) is displayed, light point 6 is activated.

Lights

Each light point needs to have a corona associated with it. Coronas are stored in each signal object's directory alongside it's textures. Examples have been packaged within the zip file this document was located.

signals
{
0 { (don't forget the ' space' between the number and bracket)
           corona corona_white.TGA
}
2 {
           corona corona_white.TGA
}
3 {
           corona corona_white.TGA
}
4 {
           corona corona_white.TGA
}
5 {
           corona corona_green.TGA
}
6 {
           corona corona_yellow.TGA
}
7 {
           corona corona_red.TGA
}
8 {
           corona corona_white.TGA
}
9 {
           corona corona_white.TGA
}
}

Looking at the example above, under the heading lights we see the light points that are attached to the 3D model. This model has 10 of them, they are named a.light0 to a.light9.

From the signals section we know that when aspect 0 (stop) is displayed, light point 7 is activated.

Looking at the extract above.

When light point 7 is activated, it displays corona red.

When aspect 2 (caution left) is displayed, light points 6,0,1,2,3,4 are activated.

When light point 6 is activated, it displays corona_yellow.
When light points 0 - 4 are activated, each displays corona_white.

Signal placement is very important for correct operation of the system. There are some rules to consider while signaling your map which if not observed may cause problems with getting the correct aspects to display.

There are also various departures from prototypical operation which should be considered when designing new signaling, and also when installing it into a map.

Please refer to the SP3 Signaling document for further details. Default location: ...\Trainz\Docs

Trackside Speedboard

File location: ...\Trainz\world\custom\trackside\

This is a speed limit sign.

Config.TXT File Example for Speed Board

kuid <KUID:###:#####>
kind mospeedboard
trackside -2.5
speedlimit 5.56
obsolete-table {
}

username ""
description ""
trainz-build 1.3
category-class WS
category-region-0 UK
category-era-0


TAGS DESCRIPTIONS
trackside this is a value that is the distance in meters the object is placed relative to the center of the track. Negative values will put the object on the left side of the track, and positive values will appear on the right.
speedlimit this value is the maximum speed allowed in meters per seconds. To convert miles per hour to meters per second multiply by a conversion factor of 0.447.
For example: 10mph is 4.47 m/s. To convert kilometers per hour to meters per second multiply by a conversion factor of 0.278.
For example 10kph is 2.78m/s.

 

Content Creation Guide Table of Content

Paint Shed Guide