Compatibility mode

From TrainzOnline
Revision as of 15:25, 21 June 2022 by Windwalkr (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

The "Compatibility mode" setting in Trainz is used to disable various optimisations in order to support legacy content (Routes, Sessions, and their dependencies).

This page details the various compatibility mode options available in TRS19 and later, and how they each affect gameplay and performance.

Contents

Maximise compatibility

In "maximise compatibility" mode, Trainz will disable all Route streaming, and maintain the maximum level of script support possible. While running in this mode Trainz will keep the entire Route loaded into system memory, which can massively degrade performance.

This mode should only be used to run legacy content which fails to operate correctly with streaming enabled.

In both TRS19 and TRS22, this mode is the default for the game due to the large number of legacy scripts in circulation. Users may override this default in the (out-of-game) Trainz Settings, and are encouraged to do so in order to achieve better game performance and/or test content to ensure that it functions correctly.

Stream objects

This mode enables Route streaming, but keeps the maximum level of script support possible. With streaming enabled, Trainz avoids loading portions of the Route which are inactive and far away from the player, increasing performance, reducing loading times, and reducing overall system resource consumption. This is especially evident on very large Routes. However, older scripted assets (especially session rules) can experience issues, as they may attempt to query Route data which is not currently loaded.

This mode is most appropriate for running most content from older versions of Trainz.

Packaged routes which are bundled with the TRS19 and TRS22 products use this mode even if "Maximise Compatibility" is selected, because they have been tested internally at N3V to confirm correct operation.

Maximise performance

In maximise performance mode Trainz enables Route streaming, and also prevents many legacy script functions from running. This can hugely improve performance but older scripted content is likely to function incorrectly, or not at all. Specifically, script functions which are tagged with the 'obsolete' keyword are likely not to function, and may return empty, null, or incomplete results.

It is expected that future Trainz products will enable this mode by default, so script authors should run in this mode or beyond when developing and testing their creations.

Show errors on legacy calls

This mode is useful for finding/debugging content which attempts to use legacy script features. While in 'Show errors on legacy calls' mode, Trainz will operate identically to 'Maximise performance' mode, but script calls to obsolete/legacy functions will also generate script exceptions. This allows content creators to determine which assets require fixing/replacing in order to support 'Maximise performance' mode, but due to the extra processing game performance will be slightly worse than when running in 'Maximise performance'.

This mode should only be used for testing and debugging during content creation.

See Also

Personal tools