Route Building Tutorial 1: First Steps

If you’ve ever looked at a route file, it all looks quite bewildering at first. What this tutorial will describe are the essential commands for creating our VERY basic route. A word of caution take care with syntax, commas, dots and semicolons are all used to separate the various components of the route, get these wrong and errors will arise. Upper or lowercase may be used throughout.

Type in (or copy from here if you wish) the following, I’ll explain what all this means after..

Looking at each of these lines of code in turn,

Route.comment allows you to add a description at the head of the route file. It is not advisable to use , . or ; in the comment as these are used to separate various parts of BVE code.

Route.Gauge this specifies the track gauge, it has no affect on the appearance of the route but will influence the train physics. 1435mm is the UK standard gauge.

Route.DeveloperID including this allows access to developer mode in BVE. One of the most useful features of this is allowing the driver to open and close train doors manually.

Route.Change this should have a value of 1 or 0. When set to 1, the train will be started up and ready to drive away. Setting the Change value to zero will allow you to go through the train startup routine (providing coding of the train allows it).

With Train optional statement, all routes seem to have this although they do seem to work OK without it.

Train.Folder this specifies the directory containing the train which is going to operate on the route. I have chosen the class 170 as it is quick to accelerate and brake and, importantly when developing a route, gives on of the widest viewing angles.

With structure everything after this statement defines the individual components of the route.

.Rail(1) defines the index of the rail and the rail object file associated with it. The rail objects will be in either .CSV, .B3D or .X format. DLTUTORIAL\straight.B3D refers to the directory where the object file is located and the filename.extension of the rail object. This format will be the same for all of the object files we index for use in the route.

Up to this point, we have only defined what train we are going to use, if it will be ’started up’ at the beginning of the route and one of the track objects we are going to use.

Now, it is time to add a bit more code to our route file so type in or copy the following:

.Rail(1) defines the index of the rail and the rail object file associated with it. The rail objects will be in either .CSV, .B3D or .X format. DLTUTORIAL\straight.B3D

refers to directory where the object file is located and the filename.extension of the rail object. This format will be the same for all of the object files we index for use in the route.

Up to this point, we have only defined what train we are going to use, if it will be ’started up’ at the beginning of the route and one of the track objects we are going to use.

Now, it is time to add a bit more code to our route file so type in or copy the following:

The first four lines here continue to index the objects that are being used in the route.

Ground(1) defines the index of the ground and the object file associated with it. Notice that the directory has again been specified. As with all object files, they may be in .CSV, .BSD or .X format. Ground objects are normally used, as their name implies, for the base ground and will therefore normally be based around grass, trees and other landscape elements.

Freeobj(1) and Freeobj(2) freeobjects are those which can be positioned anywhere on the route. Once again we define the indices and object files.

Texture.Background(0) this command indexes the bitmap images which are to be used as the background.

In the with structure part of the route file, we have indexed (listed out) the objects which BVE will need to load in order to display the route. It is this list of objects that you can see flashing up at the bottom of the screen as a route loads the more of these there are, the longer it will take to load a route.

Don’t forget to save the route file regularly and that it must be in .CSV format.

Having instructed BVE which objects we will be using, they now need to be positioned in the correct place and some commands added that will let us actually drive a train. This is done in the With Track part of the route file, so paste this into the end of your new routefile:

Save this and go for a drive before we discuss what this all means and how we can change and expand the route.

Leave a Reply

Your email address will not be published. Required fields are marked *