Filling Up Your Yards With Static Trains
by Jim "sniper297" Ward

Overview

First, why static trains?

Well, we all love really big freight yards - problem is they look really lame unless they're filled with cars, and filling them with cars in an activity drops the frametrates to 3FPS. The reason for that is for each and every loose consist car in an activity, the game loads the wag files, shape files and textures, sound files, and location on the track database, with a unique UID number for each car since it has to keep track of it as a potential movable object.

Static trains are purely scenery objects, nothing but the shape and texture is loaded, and they're much easier on framerates.

Typical empty MSTS yard

This is not a very big yard, there are only three yard tracks on the left, and a player track with two AI traffic tracks on the right. Adding fake tracks and static trains on the outside will create the illusion of a much bigger yard.

Two ways to do this, use real track sections that are not connected to the tracks you drive on, or use fake tracks. Fake tracks are better because they don't show up in the activity editor, so an activity designer can't accidently create a path that runs thru static trains. John Milligan's dumbtrak.zip from the file library is a good source, or you could steal the shapes and ref datablocks for "maintracks" and "dirtytracks" from the Port Ogden & Northern (current PONver9.zip).

 

Filling Up The Yard

To begin, go to \TRAIN SIMULATOR\TRAINS\TRAINSET, pick the engine or wagon you want to turn into a static object.

Open the vehicle in Shape Viewer and Press Ctrl-T:

get textures from shape

This will list all the textures (.ACE files) used by this model.

Copy the .s and .sd files to the route's SHAPES folder, copy all the .ace files to the route's TEXTURES folder:

Moving shape files

Open the route's ref file in wordpad, add a datablock:

Static (
	Filename ( "US2CHEMICAR.s" )
	Class ( "Static Trains" )
	Align ( None )
	Description ( "static US2CHEMICAR" )
)

For the illustration I'm using default cars (which I also use in my route, since I'm really stingy about fattening the zipfile with custom textures, I just add lines to the installme.bat to copy them from the end user's folders), but you can do this with addon cars as well.

Once you have the ref file entry and the shapes and textures where they belong, you'll have a new object class, static trains.

Object Selector screen

Easiest way to do this is to find an empty tile, hit the G key (snap to grid) and set the grid size for 1 meter (bottom left of "placement" window). Lay the fake track section, then select a static train and place. Move the train to line up with the rails:

Object Placement

then turn off snap to grid and raise it so the wheels are on top of the rails:

Object Placement

After placing as many cars as you want on the track and getting them aligned, multiple select (hold down the CTRL key and click on each object in turn), then CTRL C to copy. Move to the location next to the real yard tracks, hit CTRL V to paste. Use the movement and rotation keys to shift the combined objects before you deselect, and you'll probably have to raise everything so the ballast shows above ground.

Here's Anderson yard on PO&N 9, there are five actual yard tracks with 20 real loose consist cars in this scene:

Object Placement

Here's a new yard I'm working on: six actual yard tracks, and the Dash 9 with 25 mixed cars is the only real train in the scene:

Object Placement