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 ( )
)

Repairing damaged track

When a track shape is missing from a world file but present in the track database then that track cannot be selected in Route Editor. This error is reported by ICHK as

—> ‘TrVectorNode(318-2)’: UiD-Number (-11609,14310,8) is NOT defined!
‘TrVectorNode(318-2)’: Connection between Shape-/Section-Id and UiD not available!

If the track is in a vector with an end node then it can be repaired by removing the damaged track section and those to the end node from the vector and moving the end node to the last undamaged track section.

Moving the end node to a different track section requires that some of the elements in the end node be adjusted to the new track section.

TrackNode ( 9
TrEndNode ( 0 )
UiD ( -11609 14310 73 1 -11609 14310 -156.549 182.484 -482.472 -0.00261801 1.59697 1.02446e-008 )
TrPins ( 1 0
TrPin ( 318 1 )
)
)

The picture below shows missing track covered by static objects 100ftTrackTies.s.

vector 318 before

TrackNode ( 9
TrEndNode ( 0 )
UiD ( -11609 14310 track_uid track_point -11609 14310 -156.549 182.484 -482.472 -0.00261801 1.59697 1.02446e-008 )
TrPins ( 1 0
TrPin ( 318 1 )
)
)

Two elements that need to be adjusted are track_uid and track_point. The track_uid identifies the section of track in the world file. The track_point identifies the point in the path through the track. The track_points for single track are 0 and 1, for junctions 0, 1, and 2, for double track 0, 1, 2, and 3, and so on.

The picture below shows the damaged track replaced with good track.

vector 318 after