Trains

Version 1.0

Trains are the first things you think of when you hear of railways. There are many more types of trains around than airplanes. Indeed only two producers of airplanes remain and so many producers of trains.

My trains are never stand alone objects. They are either standing in a station, on a rail, on a bridge, or moving on an object that lets them move. Each of these objects is intended to support all trains, even those which have not yet been designed, provided the trains are not too long or of a class that can never be found in such an object.

MLI© technique (Multi Layer Inclusion).

I solved this requirement by using inclusion files with filenames ( *.inc ). Since the calling objects can not know which files they will call this is done in a multi layer technique. The caller calls a high layer or a mid layer. Current high layer inclusions are

Trains.inc - calls all trains

Trainsh.inc - calls all short trains (length < 100m)

The mid layers define a class of trains:

Trainsim.inc - simple passenger trains

Trainloc.inc - local passenger trains with higher details

Trainexp.inc - calls express trains.

Traincar.inc - calls cargo trains

Loks.inc - calls stand alone engines

Wagons.inc - calls stand alone wagons

So in order to include a new train into all of your objects you need the inclusion file for that train and an updated version of the mid layer. To include a whole new class (eg long cargo trains) you need an update of the high layer, the additional mid layer, and the train specific files. You do not need a change in the calling routine.

The examples above show the same bridge object with train220.inc, a German Interregio train, and train109.inc, a German local train.

The calling of trains from the calling macros is simple. One parameter (%7 on all current macros) is reserved. If it is 0 no train is drawn but a value calls the corresponding inclusion files. Most macros with more than one rail put the train on the right rail if positive and on the left if negative. However you should check this for each calling macro because there may be exceptions. The bridge above is called with %7=220 for the upper and %7=109 for the lower picture.

Some inclusion files support several trains - train220.inc produces train 220 and train 221. When you set %7 to a value that is not foreseen by the mid layer inclusion files no train is drawn. When you call a train that is foreseen in the inclusion layers but is not in your directory you get an error message "include file not found". The behavior of AIRPORT 2.10 is not quite reproducable in this case. If you get problems look at the Hints chapter.

Train classes

1. Simple trains (trainsim.inc)

The first group (train # 1 to 99) consists of simple trains. They use small texture and small code. They are a quick means to introduce typical color schemes for many different railway companies but are important even for high detailed scenery. At major city centers many lines come together and many other buildings will be displayed. If you want to place trains into these stations the simple trains provide a way to save texture and scenery buffer and improve the frame rate. A pilot does not have the time to admire the beauty of a highly detailed train here so use the simple trains in densely populated areas.

With moving trains this group gains still more importance since the scenery buffer of FS98 is too small to support many complex trains running together at one point. Thus these simple trains should make up most of the moving trains in high density areas.

To learn more about the simple trains click here.

2) Local trains (trainloc.inc)

These short trains have a much higher level of detail. They also need more scenery buffer, texture buffer and hit more on frame rate. I recommend using these trains 10 km away from the big centers in smaller stations and on local railway lines. The engine can be at the end or the front of the train - this one is pushed.

To learn more on the local trains click here. Local trains have train # between 100 and 199.

3) Express trains (trainexp.inc)

This will be the biggest group of trains - long trains up to 315 m long. They can be placed on the longer bridges or in stations with long platforms. The engine typically heads the train.

These trains have the property that they can bend while moving through a curve.

To learn more about all the express trains click here. The train # is between 200 and 499. The numbers above 400 are reserved for the very high speed trains like the ICE and the TGV.

4) Cargo trains (traincar.inc)

This will again be a very large group of trains. Since a cargo train typically has more cars than an express train, and the cars are much more complicated, some of them will be killers for scenery buffer and frame rate.

To learn more about the cargo trains click here.

5) Stand alone engines (loks.inc)

You see them everywhere, standing or moving, so they are also needed.

This is an Amtrak F7, you call it with #10333. To learn more about standalone engines click here.

6) Stand alone wagons. (wagons.inc)

To learn more about stand alone wagons click here.