From the VR Reading Room
 
Your information source for:
• Train/railroad simulators, virtual railroading and V-scale modeling

Also of interest:

Home
VR Reading Room
Virtual Railroader 'Zine
VMR Journal 'Zine
VR Blogger
Basic Trainz
Library
V-Scaler Column



Creating a Scenario and Map in Locomotion

By Alfred Barten

One of the most satisfying things in Locomotion is creating your own scenario using your own map. Doing so has the added benefit of enabling you to set up a map and other game parameters that favor the type of operation you have in mind - commuter services, long distance passenger operations, ferry boat lines - you name it. The best thing is you can do it without special skills or the need to purchase software. Everything you need is either on your computer already or can be gotten free on the Internet.

In a nutshell, the process involves preparing an image for the map, converting it for use in Locomotion, and customizing the map in the Locomotion Scenario Editor. With that complete, and still using the Scenario Editor, you can select or enter the various game parameters to define the scenario.

Before proceeding, I wish to acknowledge my sources. These are the people who contributed to the Landscape generator thread at the Transport Tycoon Forum, wherein the key ingredient, Locomotion landscape generator by Timmy Brolin, was announced and information by others was contributed.

Preparing a Test Map

First, we'll start with the map. As a demo of the principles involved, I began by creating a sample map in MS Paint. (This handy paint editor comes free with Windows. You can find it by selecting start > All Programs > Accessories > Paint.) The first thing I did was create a new Paint image, making it a white square, 384 pixels on a side. This is the size Locomotion requires for its maps.

Then I added a series of identical black rectangles and placed them in a row, and part of a second row. I gave each succeeding rectangle a slightly lighter value of gray. You can do this in Paint by selecting Colors > Edit Colors... on the menu bar and clicking Define Custom Colors>>. Note that we want to be using pure black or gray. The hue should be 160 and all other values zero for true black. As we go up the gray scale, the Luminosity and the Red, Green, and Blue values will increase. The three colors will always have the same values as each other; otherwise it isn't pure black, white, or gray. I chose values that correspond to each distinct landscape level in Locomotion. These levels are in increments of 6.4 on the 256-color scale (0 to 255). In the following table I've listed each level in its true value and its rounded value. You will need the latter for use in Paint.

True Value Rounded Value   True Value Rounded Value
6.4 6   102.4 102
12.8 13   108.8 109
19.2 19   115.2 115
25.6 26   121.6 122
32.0 32   128.0 128
         
38.4 38   134.4 134
44.8 45   140.8 141
51.2 51   147.2 147
57.6 58   153.6 154
64.0 64   160.0 160
         
70.4 70   166.4 166
76.8 77   172.8 173
83.2 83   179.2 179
89.6 90   185.6 186
96.0 96   192.0 192

Using the Fill With Color (paint bucket) tool, I filled each succeeding rectangle with a shade from 64 to 147. I also set the background to true blue, just so it would be distinguishable from everything else.

Using the Pick Color (eye dropper) tool, I selected a shade from a rectangle and, with the Brush tool, I painted contours on the map. When I had used as many as I had space for, I converted the blue background to pure black. Locomotion sees lighter colors as being higher in elevation, so black represents the base in this example.


Converting the Map

The process of converting the map has been made simple by Timmy Brolin. You can get his Locomotion landscape generator here. After you unzip the download, all you have to do is double-click the mapgen file and enter a few values, for which you will be prompted. In the example, I named the bitmap Fiction and saved it as a BMP file with 24 bit color depth. To be usable, a map must be 384 pixels on a side and be a BMP file with 8 to 24 bit color depth.

The landscape generator displays a small command line window. Wait a moment and it will bring up a Windows dialog, which lets you select the bitmap file you saved. Then you will be asked which world region you want. I entered n for North America. Next you will be asked to define sea level. I used 4. If you use a higher number, the water will be higher on your map. (In this example, a value of 10 brings the water almost to the lowest land level.) Finally, you will be asked to select a ground type. I chose 130 for green grass.

That's all there is to it. Now you can create your scenario.

Creating a Scenario

First, you need to place the new map where Locomotion can find it. Open the Locomotion folder (the default location is C:\Program Files\Atari\Locomotion). Open the Scenarios folder and then open the Landscapes folder. This is where the new map should be placed.

Now launch Locomotion. On the opening screen, select Scenario Editor. This opens the Object Selection screen.

Select Load Landscape in the file menu (identified by a floppy disk icon) and select Fiction from the available landscapes. You can now develop your scenario. The details are as desribed in the Locomotion manual for editing a scenario, but the first thing to do is establish at least one town. You can leave everything else as default if you want to get quick results. You can always modify the scenario later.

If you want to develop a scenario for a real location, continue on with Using a Satellite Map. Some of what is said is also useful if you want to use a scanned map, especially a scanned topo map, as your base.

Using a Satellite Map

Having satisfied myself that the process works, I decided to make a map and scenario for Long Island, New York. I found images from various sources, including Google Earth, but decided to go with a DEM image. The original was in color, but I converted it to grayscale as shown. Since the original was anything but square, I extended it at the bottom and sketched in the New Jersey coastline. Later I moved some of the extra space from the bottom to the top of the graphic - i.e., I lowered Long Island on the final map.

I found Paint wouldn't properly convert the color image to grayscale, so I used another free picture editor, IrfanView, to do the job. I use IrfanView for many things, including screen captures, picture format conversion, and resizing and sharpening. You can get IrfanView here.

Next I settled on four levels of land elevation (this is fairly flat country). Rather than paint bands of gray, which are difficult to distinguish from one another, I decided to color code the bands. I used true blue for water (which will be converted to pure black later), green for land level 1, brown for land level 2, yellow for land level 3, and light blue for land level 4. When finished, I converted these to gray 70, 77, 83, and 40, respectively. I inadvertently started with water as 64, whereas I had intended it to be black (i.e., 0). As a result, all the levels are one level higher than I had intended. To bring the water up to where I wanted it, I set it at 20 instead of 4 when asked by the Landscape converter. Since the water in this area is quite deep, the original miscalculation worked out for the best.



Once ready, I converted the image. I brought it up in the Locomotion Scenario Editor and filled in the towns, industries and so forth.

Locomotion provides a name for each town as you create it. Since this is a map of a real location, I wanted real names. To do this, select the town name in the Towns window. This displays the properties sheet for that town. Click the title of the property sheet (the town name) and enter a new name in the dialog that displays. Click OK and you're done.

After that it's just a matter of setting options for the remaining properties of the scenario. I made my example very easy and put it in the Beginner category. I also saved it as Long Island and placed the saved file in the Scenarios folder, but outside the Landscapes folder.

And there we are. I placed the finished scenario on my Downloads page for anyone to use.

Final Tweaks

When I took a close-in look at the final map I decided that the land should, in places, come almost to the water. So I went back to the original grayscale, reset the black water to 64 and began playing with the sea level setting when converting the map. A sea level of 12 worked perfectly, as can be seen in the lead-in shot to this article. So that's the version I'm going with, and that's the version available at my download page. The revised scenario name is Long Island 1946. I set 1946 as the start date because Long Island began to develop significantly after the end of World War II.

Playability

Whether or not this scenario turns out to be playable remains to be seen. I haven't tested it; I only created it to investigate and illustrate the process. In real life there are commuter rail routes from Manhattan, Brooklyn, and Queens to the eastern end of Long Island. There are ferry boats from Bridgeport and New London to Long Island. There are also commuter lines radiating from Manhattan.

Al

See also:
[Chicago to Jackson in Five Years]
More Articles:
[Visit the VR Reading Room]



If you want to be notified when a new article arrives, join the VR-News group at Yahoo. This group is purely for notification. Anyone can join; only the moderator can post.

�2006 Alfred Barten. All rights reserved.