Track speed

The maximum speed a train should operate on track is set in four locations.

Route

In the route.trk file the maximum speed for the entire route is set in meters per second (m/s). The name of this file is defined in the RouteID and should match the name of the folder containing the route.

SpeedLimit ( 26.8224 )

Speed posts

In the track database file route.tdb the maximum speed is set for trains in the direction of the speed post. For the speed post the limit is 60 mph, the second attribute of element SpeedpostTrItemData.

    SpeedPostItem (
        TrItemId ( 1186 )
        TrItemSData ( 124.177 00000006 )
        TrItemPData ( 443.845 173.534 -12513 15030 )
        TrItemRData ( 443.845 301.293 173.534 -12513 15030 )
        SpeedpostTrItemData ( 898 60 -0.0392686 )
    )

Signals

In file sigcfg.dat the maximum speed when a signal is passed for each indication is set. For a restricting indication the limit is set to 20 mph.

SignalAspect ( RESTRICTING “Flashing Red” SpeedMPH ( 20 )

Temporary restrictions

In the activity file activity.act temporary speed restrictions are defined. The temporary restricted speed is set in the route.trk file in meters per second (m/s).

        ActivityRestrictedSpeedZone (
            StartPosition ( -12513 15030 402 178 )
            EndPosition ( -12513 15030 526 166 )
        )
TempRestrictedSpeed ( 6.7056 )

Duplicate wagons

When the same wagon is defined in different folders only that in the first folder is visible to Train Simulator. If a consist file is altered to include both wagons the second wagon is shown as the first wagon.

SIMISA@@@@@@@@@@JINX0D0t______

Train (
TrainCfg ( “WLE coal”
Serial ( 1 )
MaxVelocity ( 29.05760 1.00000 )
NextWagonUID ( 3 )
Durability ( 1.00000 )
Engine (
UiD ( 0 )
EngineData ( WE4016 TEWE4016 )
)
Wagon (
WagonData ( TE1000 TEWE4016 )
UiD ( 1 )
)
Wagon (
WagonData ( TE1001 TEWE4016 )
UiD ( 2 )
)
Wagon (
WagonData ( TE1000 “TT WE Coal” )
UiD ( 1 )
)
)
)

Wagon TE1000 is defined in both folders TEWE4016 and TT WE Coal. Only the first wagon is used in the simulator.

When the same consist is viewed in Shape Viewer the wagon from TT WE Coal is shown.

Open Rails shows the same wagon as Shape Viewer and not the wagon shown by Train Simulator.

Running MSTS at high resolution

When the resolution of your screen exceeds 2048 pixels Microsoft Train Simulator will crash on startup. To avoid this crash copy file D3DIM700.DLL to your installation at default path C:\Program Files (x86)\Microsoft Games\Train Simulator

This patch is contained in msts-widescreen-patch.zip

The developer site for the patch is at https://github.com/UCyborg/LegacyD3DResolutionHack

Open Rails models

Recent models from Train Simulations only work with Open Rails. These models can be altered to also work with Microsoft Train Simulator (MSTS).

Convert .dds textures to .ace textures. Use the convert command from ImageMagick to convert .dds files to .tga files. Then use TGATool to convert .tga files to .ace files. The form of the convert command is convert source destination.

convert VIA_P42DC_916.dds VIA_P42DC_916.tga

Split large sub-objects to fewer than 12,000 polygons.

Correct error in count of controls in cab view.

Locating content for Open Rails

Open Rails records in the Window Registry the location of content folders. The registry key is HKEY_CURRENT_USER\Software\OpenRails\ORTS\Folders

There can be one or more values with the registry name set to the name of the installation profile and registry data set to the path of the folder containing ROUTES and TRAINS.

To change installation profiles in Open Rails click the Options button on the main window and click the Content tab in the Options dialog.

Open Rails installation profiles

Parsing SIMIS files

The files used by Train Simulator are Unicode text format. The first line is a signature related to the file extension. Following are elements and attributes.

SIMISA@@@@@@@@@@JINX0D0t______

Wagon ( CN_ES44DC_2304
  Type ( Engine )
  WagonShape "ES44DC extra"  ( "2304a.s" )
  FreightAnim ( "2304b.s" 1 1 )

Strings must be enclosed within quote (“) characters if they contain spaces. The elements are composed of named identifiers, an optional name, open parenthesis, attributes, and close parenthesis.

CN 2304 Train Simulator

Open Rails does not correctly handle optional names except for anim_node elements.

CN 2304 Open Rails

It does not display the shape, “2304a.s”, but does display the following freight animation, “2304b.s”.

To continue a quoted string on multiple lines use a plus (+) operator. It is an error to not have a closing quote before a line break.

Collide objects

When placed a static object is defined in the world file as

Static (
UiD ( 1 )
FileName ( 3DT_Car_TrailerG142a.s )
Position ( 121.479 1844.29 -50.77 )
QDirection ( 0 0 0 1 )
VDbId ( 15 )
)

3DT_Car_TrailerG142a static

Select a static object in Route Editor then press Ctrl-M to make it into collide object. The definition is changed in the world file to

CollideObject (
UiD ( 4775 )
CollideFlags ( 69 )
FileName ( 3DT_Car_TrailerG142a.s )
Position ( 121.479 1844.29 -50.77 )
QDirection ( 0 0 0 1 )
VDbId ( 15 )
)

In Route Editor a Collision properties tab is added.

3DT_Car_TrailerG142a collide object

Press Ctrl+Plus in simulator to make bounding boxes visible.

3DT_Car_TrailerG142a in simulator

Collide object do not stop trains but instead stop smoke and can be used for bridges over track.

The SD file for a shape must have a bounding box to be effective.

SIMISA@@@@@@@@@@JINX0t1t______

shape ( 3DT_Car_TrailerG142a.s
ESD_Detail_Level ( 5 )
ESD_Alternative_Texture ( 0 )
ESD_Bounding_Box ( -3.18 0.0 -7.83 3.18 4.1 7.79 )
)

Automatic and manual switches

Switches in Microsoft Train Simulator are either automatic or manual. Automatic switches are controlled by the dispatcher. Manual switches are controlled by the player. Automatic switches function as manual switches while in explore mode.

Activity Editor shows automatic and manual switches using the same graphic so they are not distinguishable. To determine whether a switch is automatic or manual create a short path that includes just that switch.

path reverse direction

The path file used is from C:\Program Files (x86)\Microsoft Games\Train Simulator\ROUTES\SoldierSummit\Paths and a short path with a start, junction, and end nodes will have three TrackPDP elements.

TrackPDPs (
 TrackPDP ( -12507 14303 -300.982 2425.48 430.157 1 1 )
 TrackPDP ( -12507 14303 -347.236 2425.51 377.545 2 0 )
 TrackPDP ( -12507 14303 -398.91 2425.93 317.468 1 1 )
)

The 2 identifies that TrackPDP element as a junction node. Search the track database file for this junction using the x-coordinate, -347.236.

  TrackNode ( 1081
   TrJunctionNode ( 0 216 1 )
   UiD ( -12507 14303 113 0 -12507 14303 -347.236 2425.51 377.545 0 -2.42041 0 )
   TrPins ( 1 2
    TrPin ( 620 0 )
    TrPin ( 1082 1 )
    TrPin ( 1256 1 )
   )
  )

The second attribute of TrJunctionNode, 216, identifies the track shape. The third attribute is 1 for manual junctions and 0 for automatic junctions.

TrackShape ( 216
 FileName ( A1tPnt10dRgtMnl.s )
 NumPaths ( 2 )
 MainRoute ( 0 )
 ClearanceDist ( 26 )
 SectionIdx ( 1 0 0 0 0 179 )
 SectionIdx ( 2 0 0 0 0 183 176 )
 ManualJunctionShape ( )
)