Jump to content

Trainz/Trainzoptions.txt file

From Wikibooks, open books for an open world
(Redirected from Trainz/Trainzoptions.txt)
logo
Fundamentals for Trainz Trainees

Setting up Trainz properly for yourself
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

The INI file Trainzoptions.txt is used by the loader module (the EXE file which any Trainz shortcuts link to and load) to initialize the Trainz run time Graphical user interface (GUI) modules and so historically provided the means to define the startup state of older versions of Trainz.

In TS2009 and successor versions many of the most popular trainzoptions.txt features have been replaced by settings in various options menus. If using TS12, you will probably have no need to use the trainzoptions.txt settings at all (the default TS12 installation doesn't even create a trainzoptions.txt file). A possible exception is the "-freeintcam" settings.
  • The "-freeintcam" switch affects only Driver and allows the user to reposition the internal CAB camera(s) which is especially useful in older legacy locomotive assets where multiple camera mounts in cabview was not a fashion. (Today more recent Locos sometimes have far too many. In practice, one usually uses toggling with [ & ] between 2 or 3 views, and the rest can be ignored.)
  • The "-showkuids" will have Surveyor display the kuid of an asset by default in the lower RH screen corner. This is an option in Surveyor in TS12, under General Options in the Surveyor Options menu.
  • In the long term, one might want to experiment with alternative Field of View parameter settings: -surveyorfov & -driverfov &-cabinfov simply because your hardware, especially your monitor native mode (width in pixels) will affect what you see, and adjusting these can give a better experience. Save the experiments until later when you are used to the defaults so have something to judge against.



This is one of the few underlying complexities the new Trainzer will not need to alter, but in those older releases, wanted to change early in their experiences with the Trainz operating environments. (See rule of thumb note preceding tables)


N3V/Auran provides a reasonable starting point that appears to provide optimal performance for most users, but play it very conservatively on the default video mode, initializing Trainz with the basic 1024x768 Super-VGA (SVGA) mode.

Various parts of the excellent Trainz .pdf manuals identify typical options you may use in the Trainz options settings file. The options listed below will likely not work for all versions of Trainz. In particular, many one-time options affecting performance throughput have been rendered ineffective in TRS2012-SP1.

Examples

[edit | edit source]
Note: The following display data are settings for the Native Mode of the video monitor. Trainz releases post Trainz Classics 3 will set the width and height to SVGA common settings (1024 x 768), but the actual video display mode is set in the Launcher > Options Menu in these N3V era later versions.
  • The following is a (laptop) trainzoptions.txt file still in day-to-day use on a beloved TRS2006 installation:
-DepthBits=24 
-StencilBits=8	
-fullscreen
-width=1280
-height=800
-Jet=bin
-cabinfov=75
-driverfov=65
-DefaultAutoMip=none
-vsync=0   —   (now options setting after TS2009)
-showcachebar   —   (no effect after TS2009)
-allownoctrlrightclick
-freeintcam
-showkuids
-time=0.0

 


  • The following is a tower/desktop trainzoptions.txt file for a modern computer and graphics card (with embedded in-file comments) using a medium small display (1440 x 900) in day-to-day use on EACH OF TS2009, TS2010 and TS2012 installations:
-DepthBits=24
-StencilBits=8
-Jet=bin
/// Org settings
///-cabinfov=60
///-width=1024
///-height=768
-Intro=disable   —   (no effect after TS2009, some Windows versions required for pre-TS2009 versions)
-cabinfov=74.7975
-driverfov=63.9863
-surveyorfov=65
-DefaultAutoMip=none
-DynamicVertexBufferSize=4194304
-DynamicIndexBufferSize=196608
-VBO
-framerate=200
///-showcachebar
-allownoctrlrightclick
-width=1440
-height=900
-showkuids
-freeintcam
///-fullscreen (default)   —   (now options setting after TS2009)
-windowed   —   (now options setting after TS2009, but telling myself here doesn't hurt)
  • As a rule of thumb, if there is a setting nowadays for a parameter in the Trainz Options Menu tabs off the Launcher screen), it need not be tweaked in the Trainzoptions.txt ini file.
    • New users will benefit most by installing -allownoctrlrightclick and -freeintcam options. The first allows you to check things easier when driving with a single right click hold. The second also used in Driver enables an offset from the attachment point of one camera view inside the cab (INTernal Camera viewpoint)—the offset is set by using arrow keys to slide forward or back, left and right, so the camera view (Toggled by '[' and ']' keys)
    • Interested in modeling your own route, then -showkuids is useful in surveyor when cherry picking assets from someone else's route for your own route under construction. People that have lavished man-years on a well done route will be insulted if you don't snoop their creations. It's the best way to see an assets visual effect. Thumbnails give no scale.
    • The most frequently altered parameters by power trainz users is the surveyorfov of the three FOV (Field of View) settings... for a particular temporary situation. (Low numbers allow close detailing work, larger numbers more vista to get better overall 'wide views'.


The below table will seem bewildering and perhaps worrisome to new Trainz users. Historically, most Trainzers have only a small number of the below in their Trainzoptions .INI files.
  • Most common would be: {the set: -allownoctrlrightclick, -debug, -driverfov, -height, -fullscreen, -freeintcam, -ShowKuids -surveyorfov, -width } for average computers and average users.




Table notations

[edit | edit source]
Warning:  Use caution when using these options as it may result in Trainz not starting at all. You should preserve a copy of the original default and any last known working trainzoptions.txt files before or during alteration so you can revert to it in the event of a corrupted or non-working file.
  • Tip: The easiest method is to open the file for edit then ALT+Tab ↹ or ⇧ Shift+ALT+Tab ↹ back to the Windows Explorer folder view where the file will still be highlighted from being selected. There just press F2 and rename the file.

We suggest names that keep the same beginning filename so all names (versions) sort together, so 'just' insert a dummy extension like:

  • trainzoptions.org.txt or use some unique date coded name such as:
  • trainzoptions.14-05-22.txt ('.yy-mm-dd' sequence is ALWAYS unique, so very useful!).




  • In the following table, Opt or Yes means the feature is enabled in newer Trainz releases, meaning after the TRS2006—TC3 series; a Status=Obs(olete) means the entry was for a much lower graphical video card environment that is relatively useless in today's Hi-Definition monitors.
Reminder: Trainz Defaults to the SVGA standard 1024 x 768 pixels unless the video is set up in the Options button from the Launcher screen menu. While the TrainzOptions.txt files in the N3V authored releases (after and including TC3 and TS2009, within TS2009 and newer versions, the pre-launch diagnostic sets a different default in the Launcher > Options > Display tab menu, so the video mode in this file has become irrelevant, but still present.




  • Trainzoptions items common to all Trainz releases have been given no background color; signifying the option parameter has continued in later newer Trainz versions. ED. NOTE: Unfortunately there is no good documentation to quickly sort which switches and parameters are still active, nor when they were available. Hence completing updating this page involves a lot of trial and error, and comparison version to version. Since the matter is not a high priority in re-organizing this work, this page may never be color coded completely.
    Bottom Line: If a parameter seems like it may help you, copy the current file, and try changing the parameter. The WORSE that can happen is Trainz GUI's don't load, and you have to revert and relaunch.
  • You will NOT have to reboot, nor do anything corrective taking a lot of your time.

}}


  • Legacy items with little or no relevance in the more recent N3V Games authored Trainz releases have been given a light grey background color. Each successive main retail version by N3V has replaced these INI file switch parameters with additional options click boxes or GUI menu selections, so more and more of this data table has become irrelevant (and/or obsolete).


  • Trainzoptions items active through Trainz Classics (TC3's tech-level improvements) Trainz Service Pack releases have been given a LightCoral background color; signifying the option has been discontinued in later N3V Games published Trainz versions, starting with the release of TRS2009.


  • Trainzoptions items active through TRS2009's and TRS2010's Service Pack releases have been given a light medium green background color; signifying the option has been discontinued in later newer Trainz versions.


  • Trainzoptions items active through TRS2012's Trainz Service Pack releases have been given a 'Pale Turquoise' background color; signifying the option has been discontinued in later newer Trainz versions.

Table I

[edit | edit source]
Entry Label Status Active Description Versions
-640 Obs No? Equivalent to specifying "-width=640" and "-height=480".
This is the old obsolete IBM PC EGA graphics card standard display resolution.
-800 Obs Yes Equivalent to specifying "-width=800" and "-height=600".
This is the old obsolete IBM PC early SVGA graphics card standard (ca. 1990) display resolution, which soon lost out to 1024 x 768 SVGA in the hurly-burly of the battle of graphics cards technologies.
-1024 Obs Yes Equivalent to specifying "-width=1024" and "-height=768".

- Trainz typically defaults to this resolution during setup and may 'forget' Options Settings during Service Pack upgrades.

v1.0 up
-allownoctrlrightclick - yes Removes the requirement to have to hold down the CTRL key when right clicking an object in driver to see info about the object. TRS2006 and later. TRS2006 up
-autopilotsignaldistance = XXX - ??? Modifies the autopilot signal-visibility distance, specified in meters. Default value is 200m. Smaller values are not permitted. This will affect how the autopilot reacts to the signals - how soon it will begin to slow down and how close to the signal it will attempt to stop. If you have AI collision issues, a lower speedlimit or reworked signaling on the route is likely a better option as this affects all Trainz routes you may download, or run.
-cabinfov - Yes Changes the field of view in Driver inside the Locomotive CAB (Control Cabin). Large numbers are wider view and smaller numbers allow you to zoom in more. Adjusting this setting for some sessions can help one to better operate inside that CAB. related:
-driverfov
-surveyorfov
-debug - Yes Including this option enables debug mode. The main feature of debug mode is that it allows you to accelerate the game speed by holding down the Shift key. This can be useful for content creators that might want to test their sessions more quickly. However debug mode is not an 'officially supported' feature and the behavior of Trainz in not guaranteed when using the Shift speed-up. Use the +/- keys to speed up/slow simulation time
-DefaultAutoMip=none Obs No Mysterious setting, is set as a default setting up to TRS2012-SP0; SP1 eliminates most Trainzoptions.txt entries affecting performance, replacing them with defaults or selectable in the Trainz Options settings screen off the launcher menu. First appeared in TRS2006—TC3.
-driverfov= - Yes Changes the field of view in Driver. Large numbers are wider view and smaller numbers allow you to zoom in more. 55 is default.

Table II

[edit | edit source]
Entry Label Status Active Description Versions
-disablecarz=X cur yes Default 0 (carz enabled). If set to 1 (carz disabled, over-rides route/map 'carrate' setting), so ensures then that Trainzcarz will not appear on roads. This may (unconfirmed officially) result in smoother framerates as offloads calculations tasks on Computer CPU and Graphics Processor. (Consider use only on huge routes generating stuttering and pauses else leave alone.)
-DisableEnvMap cur unk Causes Trainz to not render Environmental (mini) maps. This may improve performance on certain minimum-spec (or lower) graphics cards.
-disablefog cur Yes? Causes fog to be completely disabled. This may give some relief to less capable computers and graphics cards, as particles such as fog and smoke need calculations for each display frame shown.
-disablerailjointsound cur Yes? Disables the rail joint "clickity-click" sound. Probably TRS2006 and later.
-disableztest cur Yes Turns off z-buffer testing for coronas (signal flares, headlights, sun.) This will make the flares shine *through* other objects, however will reduce 'graphics artifacts' with the ground and train clipping the flare.
-dualhead cur Yes Enables support for dual-display mode. This will only work if you have two displays attached to a single video card acting as a single, large display (i.e. single frame-buffer). This won't work if there are two displays on different video cards or configured to act as independent displays. Currently dualhead support is only utilized in the Driver module. This option requires that a dualhead resolution is selected (ie. 8:3 ratio) and that Trainz is run in fullscreen mode. On some video cards this option may require you to manually switch to the appropriate resolution prior to launching Trainz.
-filter=XXX Obs Unk Specify the texture filtering mode. Default is trilinear which provides the best visual results. Other options are bilinear and none. This option is unlikely to provide performance gains, except perhaps on minimum-spec (or lower) graphics cards. [Setting nowfrom TS2009 in Options Menu Tabs]
-framerate=XXX cur* Yes Requests that Trainz limit the frame rate to the specified number of fps. Now set by N3V software and initialized in the ini file on first startup. May help with maintaining a stable frame rate on faster machines.
  • Earliest versions accepting: Some reported doesn't appear to work with vsync enabled.
-framestoaverage=XXX unk Yes This option controls the 'smoothing' of frame rate timing. Increasing this option may result in less visual 'stutter', however can cause period 'surges' if rapid changes in frame rate occur. Increasing this option may be useful for high-end machines with fast graphics cards where the frame rate remains fairly constant. Default is 4, maximum is currently 16, minimum is 1 (no averaging.)

Table III

[edit | edit source]
Entry Label Status Active Description Versions
-freeintcam Yes Allows user to move around locomotive to place cameras. This is particularly useful in older content Locomotives operations.
-fullscreen - Opt Causes Trainz to take over the chosen display. This is the preferred mode. Some very experienced users have reported TRS2012-SP1+hot fixes runs much smoother in windowed mode. -fullscreen will be set by default when Trainz installs.
-heartbeat=XXX - Yes Specify the time interval at which the physics heartbeat occurs (in seconds). Defaults to 0.03sec. Larger intervals decrease processor usage for physics at the expense of accuracy. Intervals larger than 0.05sec are not recommended. Changing this option is probably unnecessary and may have a negative impact on physics accuracy.
-height=XXX Obs Opt Manually specify the window/screen height (in pixels). When in fullscreen mode, this must match the Width setting used. Width-to Height ratios other than 4:3 are untested. When in dualhead or surround modes, this is still the vertical height of a single display. From Trainz 2009, height and width settings in the Options Settings API over-ride the INI file.
-HighPrecision ? ?
-intro=disable Obs No Disabled the playing of the Auran intro video when Trainz ws started in early Trainz versions. Irrelevant after TC3. The word "disable" must be entirely in lower case and not enclosed in quotes. (Was sometimes helpful when Trainz crashed on startup in early Windows Vista era).
-keepallresources - Yes? Does not empty cache in RAM memory, so keeps more all objects in memory (see [this thread] for more information) (May have been eliminated by SP1 of TRS2012)
-loc ? ? Displays the xy location of the cursor. x is distance in meters north/south of the ground plane origin and y is distance east/west of it. x is negative for locations north of the origin and positive for locations south of it. Y is negative for locations west of the origin and positive for locations east of it. The origin is the northwest corner of the 1st base board used to begin the route.
Does not function with -ShowKuids.
-PrototypicalTractionLevel Obs No This is a hold over from Trainz 1.x affecting the traction of engines in the dynamic physics model. Since TRS2004 introduced Trainz Sessions with Trainz gsl Script rules, a default environmental rule starts each session, so this switch is obsolete.
-render=renderdirectx ? ? Cause Trainz to use the w:Microsoft DirectX 3D API for graphics rendering as opposed to OpenGL(default). This may improve performance or compatibility where the video card drivers do not correctly support OpenGL.
-ResourceMemory=XXX Specifies the amount of memory reserved (in megabytes) for resource disk caching in RAM. This will prevent Trainz from accessing the disk as often, reducing caching time and 'stutter' caused by slow disk access. This option defaults to 0. (see [this thread] for more information)
-showcachebar No Displays the cache bar which is displayed in TRS2004 but by default not displayed in TRS2006.
 • Probably TRS2006 and later; the cachebar was useful to see when Trainz graphics rendering were behind when the user skipped to a new location, and by hitting [P] and pausing the simulation, the user could avoid stutter and jerking, or just take a bathroom break.
-ShowKuids - yes Displays the kuid of the currently selected asset in Surveyor, especially useful when an unfamiliar asset is selected by one of the get tools. No effect in Driver, Scenarios, etc.

Table IV

[edit | edit source]
Entry Label Status Active Description Versions
-surround Cur Opt Enables support for triple-display (triple-head / surround gaming) mode. This will only work if you have three displays attached to a single video card acting as a single, large display (ie. single frame-buffer.) This won't work if there are three displays on different video cards or configured to act as independent displays. Currently surround gaming support is only utilized in the Driver module. This option requires that a surround gaming resolution is selected (ie. 12:3 ratio) and that Trainz is run in fullscreen mode. On some video cards this option may require you to switch to the appropriate resolution prior to launching Trainz.
-surveyorfov=75 Cur Changes the field of view in Surveyor. Large numbers are wider view and smaller numbers allow you to zoom in more, so get closer detailing terrain. 55 is default.
-vsync=XXX Cur Activates automatic 'vertical sync'. This option may be overridden by the video card driver settings. When active, vertical sync results in smoother updates (no visual tearing) but lower frame rates. This is usually a good thing. This is equivalent to "-vsync = 1".

Allows finer control over vsync, attempting to synch to every second frame ("-vsync=2") or every third frame ("-vsync=3") etc. Larger numbers lower the maximum possible frame rate further but may improve the chance of achieving a steady frame rate. Probably not useful for most people.
-width=XXX Cur Yes Manually specify the window/screen width (in pixels). When in fullscreen mode, this must match one of the available display resolutions, and an appropriate height must be selected. When in dualhead or surround modes this is the horizontal resolution across all displays, not across a single display.
-windowcentered Cur Opt Centres a Trainz window on the screen when running in windowed mode?
-windowed Cur Opt Causes Trainz to run in a window, so should not concurrently be used with -fullscreen option. This was found to originally (TRS2006 era) be useful for debugging, however some others thought it might result in reduced frame rate and cause visual 'stutters', especially in DirectX mode. Such conflicting interpretations may be the result of differences in graphics card capabilities in that era (2005 to 2009) and newer technology now contains as minimums what was fancy then.

- In TS12-SP1 experienced Trainzers like computer professionals Jcitron finds (and recommends) the opposite (given an advanced graphics card and 64 bit machine and OS), that for him frame rates are up and Trainz runs smoother when windowed using Directx. Also confirmed by Will Woods making systemic study of TS12 vs. TS12-SP1 behaviors in July-August 2013 for Yesterdayz Trainz user group.

-zfar=XXXX Cur Opt Override the default z-buffer far distance of graphics processors and video cards. Specified in meters. The default is 1500m. Decreasing the far distance will result in slightly improved z-buffer accuracy but will result in far-away objects not being visible (Note: this may not result in a speed gain if a high draw distance is specified in the Trainz Options' 'tuning screens' as Trainz will still consider the far-away objects as visible (so run calculations to generate far terrain and features) even if the video card is unable to render them.) Increasing the z-buffer distance probably isn't useful as Trainz doesn't allow the selection of draw distances greater than about 1300m, and the z-buffer accuracy will be decreased causing visual artifacts.
-znear=XXX Cur Override the default z-buffer near distance. Specified in meters. The default is 0.1 meters. Smaller numbers allow the viewing of objects closer than 10cm but rapidly decrease the z-buffer accuracy and will cause visual artifacts on most graphics cards. Larger numbers will improve the z-buffer accuracy and may provide less artifacts, especially in 16-bit depth buffer modes, however there may be problems viewing nearby objects such as inside cabin view.

Using wide screen monitors · Essential Hints