News Center
-Current
-Submit news

Com Center
-Forums
-Email

Map Tutorials
-Introduction
-Foreword by RVMECH
(Getting Familiar)
Chapter 1: Part 1
Chapter 1: Part 2
Chapter 1: Part 3
(Sculpting Tools)
-Chapter 2
(Texture Tools)
-Chapter 3
(Object Tools)
-Chapter 4
(
Misc. Map Tools)
-Chapter 5
(
String Files)
-Chapter 6
(
Scripting Teams)
-Chapter 7
(
Making Trains)
-Chapter 8

FIRST MAP
-Part 1
-Part 2
-Part 3
-Part 4
-Part 5


Site Staff
Webmaster
-LionKeypr
Map Staff
-RVMECH



 

 

Chapter 8: Creating Trains in Your Map

 

Gather round kiddies....Lets make us a train!

This tutorial will describe how to make and get the train up and running for your map. It is assumed that you have read the previous tutorials or are familiar enough with the editor to actually create a map and locate all the tools. You will need to know how to make the train before you make a specific map for it. The tracks need to be laid out and the tunnels need to be placed. If you are using an existing map then you will more than likely have to modify the terrain and object placement to allow room for the aforementioned processes.

The map we are going to use for this tutorial is a simple test map. It contains a mountain range with cliffs a semi-oval track system, 2 tunnels and a little eye candy (props). The train will start on a waypath, stop at a predetermined spot to allow troops to garrison a car or two, start back up, stop again and disembark (kick off) the passengers, start up again , enter a tunnel system and then exit the tunnel system going back into the routine again. Take a look at the finished product so you can get a good idea of what we are trying to do.

Start off by going to the [Road Options] menu and selecting a track type for your map. Place the tracks down in the same manner as you would a road or path. Don't make the curves to tight or the train won't take the curve properly, just nice, even, casual turns will work just fine.

Now let's select the Tunnel artwork from the civilian object list. Place the tunnels near the cliff or hill face and push it into the cliff using the z-axis tool to lower it or raise it to the proper height, making sure that the backend is entirely inside the terrain and the base is on or just below ground level (See the Screenshot). Square it up with your tracks or, if that is not feasible, then move your track nodes until it lines up with the tunnel entrance.

OK, we have laid out our tracks and set the tunnels in place, the next step is to drag a WAYPATH around the tracks in a precise manner so that the train follows it and looks natural when doing it. The ini section for the train engines states that the path prefix name for all trains is to be Railroad. This means that after we make the waypath we will name it (the path) Railroad. As it is the prefix that is specified we can also have a second train system and name it Railroad2 if we so desire. Start your waypath at a tunnel entrance and drag it in the direction you want the train to go. Notice that when you come to a curve that the waypoints are placed close together so the train will follow the curve precisely and not stray from track system. Normally 3 waypoints are used for a curve unless it is complex or S type curve. Repeat this process up to the other tunnel entrance where you will place a waypoint directly in front of it

The waypath thru the the mountains does not need to be very precise as the train will be hidden from view, as long as the mountains are high enough. They should be at least 30 feet above the area that is DIRECTLY in front of the tunnel entrance. Drag the waypath thru the center of the mountain range . Don't worry about making gentle curves here, the train doesn't mind as it has no real tracks to travel on anyway.=). Continue with the waypath and end up by connecting it to the very first waypoint we place at the other tunnel entrance. Look at this screenshot to get an idea of how it should look going thru the mountains.

We need to label the path before we go on. Click on any waypoint in the path and the [Waypoint Options] box will appear. Scroll down to the Waypoint Path Labels box and type in the name of the path which in this case is simply Railroad. The waypoints will now have an extra label (Railroad) next to there numeric identification. The train follows the contour of the terrain at all times unless it is told to do otherwise. We need the train to go thru the tunnel and under the mountains. To accomplish this we need a way of telling the train to MAINTAIN, or stay at, the altitude that it's at when entering a tunnel and also a way of telling it to start following the terrain again. If we name the tunnel waypoints with a suffix of [Tunnel] the train will maintain the current altitude until it comes to a waypoint that does not have that suffix attached to it. Look at this screenshot. You can see that I have named the waypoint in front of the entrance Railroad33Tunnel. The train will continue on at this altitude until it reaches a waypoint that does not have this suffix. Rename all the waypoints that you have placed in the mountain range using this suffix. The tunnel exit does not get the suffix as we want the train to follow the terrain when it exits.

Our rail system is almost complete, we need to add a point for the train to stop and let passengers enter and also a point where the passengers will disembark. Again we do this with a suffix. Pick a waypoint on a straight area and rename it using the suffix [Station] (See the Screenshot). The train will pause at this location for approximately 10 seconds before departure. You know when it is getting ready to pull out when you hear the whistle go off, sounds cool! Pick another spot further on down the line for the disembarkation area. Again we communicate with the train by using a suffix. Rename the waypoint and use the suffix [Disembark] (See the Screenshot). The train will stop here for another 10 seconds and will force the occupants to leave before pulling out.

All we need to do now is to place the engine next to the track, or on it if you like. There is no need to place any cars as they are already defined in the Civilian Object ini file. Simply place the engine next to the waypath and the cars will spawn behind it. The cars are determined by a template for each engine. By modifying the templates you can switch cars around. For this tut we will use the first engine. There are 2 train engines listed in the object selection menu. Choosing one or the other determines the make up of the train. The Train Engine will give us the following cars:

TrainCar03
TrainCar03
TrainCoal
TrainCab
While train engine 3 will give us these:
TrainCar013
TrainCar033
TrainTank3
TrainCar023
TrainCab3

You have just learned how to make a railroad system. Have fun. For your convenience I have included the map here for you to look at in the editor.

 

« Chapter 7 (teams)