Trainz/Fundamentals

From Wikibooks, open books for an open world
Jump to navigation Jump to search
logo
Fundamentals for Trainz Trainees
TOC | BeginningsFun | AM&C | Creation | InBook Refs ORP Refs:  • Index • Containers • Kinds • Tags | Appendixes  • Vers
 Glossary
 HKeys-CM
 HKeys-DVR
 HKeys-SUR
 HKeys-WIN
 Mouse use
 Notations

Trains need a place to operate. Since they neither float nor fly, they need terrain. Terrain holds up tracks for trains to run on. Of course, terrain and track are hardly enough on their own to create an interesting place to run trains. We need to locate some interesting features on the terrain. Trainz provides the GUI module Surveyor to create interesting places to operate trains, and most users will want to create a new railway eventually. This section introduces Surveyor along with concepts and techniques for creating those places to run trains. Oddly enough, the best way to run a Driver Session is to spy out the scenario's virtual world in Surveyor. This is strategically smart, sort of the way an operating company requires it's Loco Driver's to ride along over a route and qualify on it under a trainer before turning them loose with trains pulling difficult cargoes.

Starting Trainz GUIs[edit | edit source]

The indents indicate successive levels of menu screens:

Warning:  If you haven't run a new install of Trainz yet, well and good. It should be run with Administrator privileges on Windows OS's newer than Windows XP. The easiest way: (1) use ⊞ Win+E to open Explorer, or if you've got a shortcut launch icon use ALT+↵ Enter to open a Windows properties API.
 • (2a) from Explorer, navigate to the Install's Trainz Root folder; (2b) from the shortcut, click Open File Location (on XP: Find Target) — (2c) in both, right click the Application program, "Trainz.exe"
 • (3a) Open the Compatibility TAB, (3b) Check the click box: "Run this program as an administrator"; (3c) now press Change settings for all users then (3d) Apply followed by (3e) OK, to close the API.
 • (4...) Back on that shortcut API... Find the click box to Run as administrator; this may require opening the Advanced button. Check that too.
  • These steps should be repeated for all Trainz's *.exe and any shortcuts that launch part of Trainz.
     • In the ..\bin folder, just one level away from you now, repeat for especially ContentManager.exe, TADDaemon.exe and TrainzUtil.exe, and lastly, optionally, Launcher.exe, Trainz.exe, and CCP.exe[note 1]


 

  • Start TRAINZ, enters the Launcher menu;
    • Select Start, navigates to the 'Loader menu', which presents itself Labeled as "Main Menu".
    • Note the loader app, ..\bin\trainz.exe directly loads Trainz and presents the same Main Menu; by whatever name, and its function is to load the correct Trainz GUI module. Furthermore, on older Trainz releases this is the only screen which lists the install's (Version) Code Build number, which is needed to discuss things with customer support (should things really suck on your Trainz).
  • While it seems likely to new Trainzers that the best place to start is by Driving Trainz, no Loco Engineer is allowed to drive a route that is unfamiliar, so we suggest starting in Surveyor, to take a look at things before climbing into that CAB in the tutorials.
    • Select Surveyor, this action will begin importing available assets that also can be seen by running the Content Manager button (with an appropriate Search filter), so will begin initializing menu list data to Trainz Surveyor's Menu.
       • This may take a while the first time, as the data base will know it has not been checked over.
       • To expedite the process, you can disconnect your internet connection temporarily using Windows API controls from the Task Bar.

  In the TRS's -- TS2009-SP3: A two purpose list menu will appear revealing route name and indented, 'mated' Sessions list for each route/map. Some may show no Driver sessions. Surveyor is used to alter or create routes and sessions. Since each session is only good on the matching route, its content is paired with and indented under its associated route. A driver session without a route will not show in this menu, but will be found in the content manager. With no place to set down wheels, these should be deleted as useless—but they will all be of your own making. In CM they will indicate a Missing Dependency—the map or route which is missing. Tip: If you want to delete a route, first delete any associated sessions, so you don't create such orphans. In post TS2009-SP4/TS2010 installs:

Hereafter, we'll just say'post-TS10' or 'TS10+', by which we also mean TS2009-SP4, which brought that transitional Trainz version series into the same 'new Trainz' look, see, and feel; as well as changed the directory structure of the install.Tip: TRS2006—TS09-SP3 all had the same directory structure and similar CM, menus, etc. These changed in TS10 to the new methods. T:ANE is also a bit different, but shares the same menuing with a few appearance differences, so you should be able to keep up if that is your first Trainz experience.

The TS10+ main menu has a variety of Big Buttons. Notice how one is labeled "Learn to Drive", this launches the tutorials, we want you to put off a bit until after seeing their maps.

  • Click the Surveyor Button and enter the Surveyor Menu.
  • Select an existing route then Load or
  • Select Create New (put this off for now, we've tutorials to follow—and it is best to start with modifying an existing route to learn how to create a new one.)
'Note: The Driver menu and the Surveyor menus in all Trainz releases look much the same as the other, so the following comments also apply to Driver. In the Trainz 1.0—TS09-SP3 screens, save for skins coloring and icons appearances, the menus are also recognizably and functionally the same.

So Surveyor is running. Now what?

  • The best thing to do is to check out the route on which you plan to drive. In TS10 and TS12, the first tutorials are on the route: "", in TANE, on "TBD", and on previous Trainz releases, they varied a bit, so look for sessions labeled Tutorial nn by single LMB clicking on successive map lines in the menu, and find the map that way. You can hunt around like this in the later versions, but alas, must go down to another menu, THE SESSIONS MENU, to see the session names, then return if necessary to the Driver/Surveyor menu to hunt again.
  • Load that map and let's take a look around. Tip: By design, the first loco vehicle listed in the Session will belong to the Human Driver, so you.

 

Getting around Surveyor[edit | edit source]

For right now, just pick any map whose title appeals to you. LMB double-click on it to enter Surveyor, and you'll find yourself where the map was last saved. The surveyor camera mode is the same Free Camera Mode as you'll encounter when Driving, and believe me, it's one of Trainz's strengths added in Trainz UTC, though not really evident in usefulness until the TRS2004 code overhauls gave us Sessions[note 2].

By using the Arrow Keys, iirc, the default mode will move you around, sliding the camera forwards and back, and swoop the view about rotating some left and right while holding a RMB} click. That is the by default the RMB should tilt (dragging up & down) or PAN—often twisting the view around in a different direction. The arrow keys slide the screen center (the focal view of the camera) left, right, or forwards and back. This means to move around, say run ahead down the tracks like a crow flying, you must do so with the left hand on the arrow keys (away from the train controls! Oh My!).

Like many I find this mode disconcerting, preferring to set the controls so the mouse and rotate my viewing direction, the &upar; and &dnar; tilt my look and the RMB slides me around the world, left or right and forwards and back. Like in the default, the focal point is always mid-screen. Drag the cursor away from center screen, and the RMB action is to slide in that direction. Using the arrow keys to set which direction to look, avoids confusion as it doesn't change the viewing angle unless I hit said key, and the same goes for look-down or look-up angles—which can position the camera near shoe top level looking up at traincar undercarriages, and rotate up past directly overhead, so one can see from on high and a bit back towards where you were looking when looking from lower angles. Want to fly down those tracks, slide the mouse. The more you pressure the cursor off center, the faster you'll fly. This comes in handy to set switches ahead of the train coming into a yard! To change the mouse and arrow key assignments, CTRL+O in

Let's get back to driving...

Terrain[edit | edit source]

Let's start with a definition. Terrain is the surface of the earth, as shaped by erosion and geologic forces. Think of it as the dirt and rock that covers the planet, sculpted by gravity, water, erosion, earth forces and wind. Anything that isn't part of the surface isn't terrain. Water, roads, trees, buildings, cars, tracks all rest top of terrain thus they are features. We need terrain to put all the really interesting things on and, sometimes in, so we start by making some dirt.

Baseboards[edit | edit source]

File:Trainz default (standard 0m elevation Baseboard
Typical Trainz Baseboard, 720 m × 720 m 72 × 72 grid of 10 meters.
Baseboards meters kilo m's feet miles yards
10720 m0.720 km  2362.20 ft 0.447 mi 787.40
2 1440 m   1.440 km    4724.41 ft 0.895 mi 1574.80
3 2160 m   2.160 km    7086.61 ft 1.342 mi 2362.21
4 2880 m   2.880 km    9448.82 ft 1.790 mi 3149.61
5 3600 m   3.600 km   11811.02 ft 2.237 mi 3937.01
6 4200 m   4.200 km   13845.1 ft 2.622 mi 4615.05
7 4940 m   4.200 km   13845.1 ft 2.622 mi 4615.05
8 5660 m   4.200 km   13845.1 ft 2.622 mi 4615.05
9 6380 m   4.200 km   13845.1 ft 2.622 mi 4615.05
10 7200 m   4.200 km   13845.1 ft 2.622 mi 4615.05
11 7920 m   4.200 km   13845.1 ft 2.622 mi 4615.05
12 8640 m   4.200 km   13845.1 ft 2.622 mi 4615.05
13 9360 m   4.200 km   13845.1 ft 2.622 mi 4615.05
14 10080 m   4.200 km   13845.1 ft 2.622 mi 4615.05
15 10800 m   4.200 km   13845.1 ft 6.711 mi 11811.024

Image:10 Meter and blue 5m sub-grids on a map base board
10-meter and blue 5m sub-grids on a map base board. (Click to enlarge)
Before continuing to prep for driving, let's cover some background about the maps.

The basic unit of terrain in Trainz is called a baseboard, and each of those is sub-divided into a 10×10 meter grid (or optionally now, 5×5 minor grids too) which becomes pertinent at several levels of route construction. For reasons known only[note 3] to the original crew of programmers at Auran/N3V, baseboards are 720 meters and just under a half-mile (0.447387 miles) on a side. Some have proposed the hypothesis that originally they were scaled proportional to the nautical mile, as seen as an arc length (i.e. part of a curve) then scaled to metric, and rounded off, but the programmer made a math error during one of the chain of conversions, and later wouldn't admit it. It does almost fit that sort of scaling. Regardless of the reasoning behind its genesis, since Trainz 0.9 (Beta) this has been the size of the standard baseboard and continues to be a mystery in the general Trainz Online community.

New baseboards are flat land at sea level, so have 0.00 as elevation. The Terrain tools are used to shape this to what we want. There are 3rd party utilities to create prototype terrain from topographic maps, so one can faithfully build a route based on such a map and its data (and date) that literally spans hundreds of miles. These same "DEM" programs can embed the map under the baseboard, so when it is textured, the map is hidden by the texturing. This helps in placing streets, buildings, and keeping distances faithful to the prototype region. Alternatively, one can construct a fantasy railroad from scratch, like the map shown at right under the baseboard's table. Note the Grid, these lines show the edges of each baseboard.

Each baseboard has a 10-meter grid 72×72 marked out on it. Each intersection of the grid is an settable elevation point. The 10 meter elevation interval effectively limits the slope of terrain. Exactly vertical cliffs are not possible. Nor are undercut faces (overhangs). Mathematics necessary to support either are far too complex to perform in real-time, and any data system which allowed such would carry a lot of overhead to support the possibility, so slow the run time performance to a crawl. Such features are best left to supercomputers coding.
Trainz 2009 introduced an option to create baseboards with a 5 m grid, or to convert an existing baseboard from the default 10m grid to a 5m grid. The 5m grid is particularly useful when you need fine control over the shape of the surface, but significant work is required to take advantage of it. A suitable compromise is to use the 5m grid in areas around and under track, and the 10m grid for areas further away. You set the default grid size with RMB on the Add Terrain button before creating the baseboard. Existing baseboards can be changed by selecting a new default, LMB on the Add Terrain button and then follow with a LMB on the baseboard. Tip: Note that changing the grid size affects texturing when some is present - it will probably need to be redone after the change.  

Getting around[edit | edit source]

For right now, just pick any map whose title appeals to you. LMB double-click on it to enter Surveyor, and you'll find yourself where the map was last saved. The surveyor camera mode is the same Free Camera Mode as you'll encounter when Driving, and believe me, it's one of Trainz strengths added in the TRS2004 code overhauls. By using the Arrow Keys, iirc, the default mode will move you around, sliding the camera forwards and back, left and right. The RMB should tilt (dragging up & down) or PAN, (twisting the view around in a different direction. Like many I find this mode disconcerting, preferring to set the controls so the mouse and

Let's get back to prepping for driving...

Finding Traincars[edit | edit source]

  1. Entering a map already made, we will find ourselves located where the route was last saved. This is unlikely to be where we want. So let's find that.
  2. Type CTRL+F and an API will pop up which has a few options. Locate the arrow buttons either side of a API window saying "All", and click the left one until the window says "Vehicles". The menu now lists all the Traincars on the Session and Map.
    1. Scroll through the list and select various cars at random. It will navigate you (reposition the map view under your camera) to show that car.
    2. Now select another, it moves again
    3. Select a third... same instant repositioning.
    4. Find something that looks like a locomotive (Names are sometimes strange in Trainz, for they are cultural, and there were many railroad cultures over the years and span of the world) and you'll see most locomotives will be named by the Company of Manufacture (e.g. EMD, Alco, GE, or wheel arrangements in steam: 2-6-2, 2-4-0, etc. or both!) plus a rail company (usually abbreviated: 'ATSF', 'BN', 'BR', 'B&O', 'QR', GN&W', 'NYC', 'PRR', 'SF', 'SP', and... so on) whose heraldry (livery isn't precisely correct, but suffices for loose discussion too) is decorating the railcars.
       • This time when you've got a loco, Click on the Check Mark. The FIND API should close and leave you with the view of your chosen Loco.

Getting it Right[edit | edit source]

Unless you were grossly lucky, you aren't on the start to Drive location yet, so let's find that. The problem is we don't know what loco you're supposed to Drive in Driver. The way to find out is to snoop the session and see which is listed first.

  1. At the map top, on the title bar are some tool icons. To the left side, but located a bit right of the one saying "Menu" there is an icon that looks like a piece of tablet paper. Click that and a session menu API will open. Tip: Note it is safe to click up there on anything... Trainz protect you pretty darn well. Experiment if you like, we'll eventually cover their function, so if you get stuck, try ESC, and if all else fails, you should be able to return to the Main Menus... with additional ESC presses, if needed. (Since we're snooping, not altering things, we don't care to save anyway—you can auto-clone the route and session on your own later!)

Some Essential Surveyor Hints[edit | edit source]

These hints have a temporary home. They will be incorporated in this section as appropriate.  

Notes, Footnotes & References[edit | edit source]

Config.txt files are endemic and ever present in Trainz assets, for no asset can be defined without this type of Computer Science container. The keyword-value_of_key pairing must always be kept in mind in editing or creating Trainz content. The TrainzBaseSpec contains values and containers which are most common in asset defining config.txt files.  

Notes[edit | edit source]

  1. These exe files listed are TS2010, TS2009-SP4 and TS2012. It is important to include CM to prevent having access problems to files just edited or opened for edit. The others are safety measures which should technically, be umbrella-opened under Trainz.exe and CM, but this way there is no possible glitch.
  2. Playing UTC & TRS2004 scenario's which knew naught of the Free Camera Mode, means it wasn't hooked in and enabled in their scripting. Most would play much more enjoyably were it so!
  3. it is Possible that someone knows why 720 meters, but no one now knows for sure and who ever they are, they aren't telling!

 

Footnotes[edit | edit source]

 

References[edit | edit source]