File format · .eng

Microsoft Train Simulator .eng Engine Files: Structure & Repair

Microsoft Train Simulator .eng files define locomotive physics and configuration. Learn how these text-based files are structured, why they fail, and how t


Microsoft Train Simulator (MSTS), released by Microsoft in 2001, relies on a highly modular file architecture. Locomotives and other rail vehicles are not contained in single monolithic files; instead, their operational parameters are defined by plain-text configuration files known as Engine files. These files are critical to the simulation, acting as the bridge between the game's physics engine and the user's installed content. When an Engine file becomes corrupted or contains syntax errors, the associated locomotive will fail to load, often causing the simulator to crash to the desktop.

What the Format Is and What Software Uses It

The Engine file format is utilized exclusively by Microsoft Train Simulator and the various community tools designed to modify it. The format is easily identifiable by its .eng file extension. You will typically find these files located inside the TRAINS\TRAINSET directory of an MSTS installation, nested within individual folders for each specific locomotive or rail vehicle.

Because MSTS was built around an open, text-based architecture, a massive modding community emerged around these files. Third-party developers and hobbyists use utilities such as Route Riter, ConBuilder, and simple text editors (like Notepad) to create, edit, and troubleshoot Engine files. While Dovetail Games eventually brought Microsoft Flight Simulator to Steam, MSTS itself remains a legacy application, meaning its file architecture is entirely static and relies entirely on this early-2000s configuration standard.

Structure and Key Technical Facts

Engine files are plain-text files, usually written in standard ASCII or ANSI encoding. They do not utilize a complex binary structure or proprietary compiled format. Instead, they are organized into nested blocks enclosed in parentheses.

A standard Engine file is divided into several critical sections that dictate how the vehicle operates:

  • Header Information: Defines the wagon or engine type (e.g., Engine ( Diesel )), the name displayed in the simulator, and the specific 3D shape (.s file) and texture (.ace files) used to render the model.
  • Physics and Weight: Contains values for Mass (weight in tons), MaxVelocity, Decel, and various friction parameters. These numbers dictate how quickly the train accelerates, how far it takes to stop, and how it handles grades.
  • Power and Performance: For locomotives, this section includes MaxPower, MaxContinuousPower, TractiveEffort, and MaxBoilerPressure (for steam). It defines the raw mechanical capabilities of the engine.
  • Braking Systems: Details the type of brakes used (e.g., AirSinglePipe, TwinPipe), the maximum braking force, and the application and release rates.
  • Sound References: Points to the appropriate .sms (Sound Management System) files used for engine noises, brakes, and horns.

Because the file is plain text, the internal "syntax" relies entirely on properly closed parentheses, correctly spelled parameters, and accurate file path references to associated shapes and sounds.

Why Engine Files Become Corrupt or Unreadable

Since .eng files are plain-text documents, they are highly susceptible to human error and encoding issues. The most common causes of corruption include:

  • Improper Editing: Modders frequently open these files to tweak physics or change sounds. Accidentally deleting a closing parenthesis, misspelling a parameter, or inserting an invalid value will immediately break the file.
  • Encoding Shifts: Because MSTS is an older application, it expects standard ANSI encoding. If a user opens and saves an .eng file in a modern text editor that defaults to UTF-8, invisible Byte Order Marks (BOMs) or altered character encodings can be introduced, rendering the file unreadable by the simulator's parser.
  • Incomplete Downloads or Transfers: When transferring large collections of add-on trains between hard drives, file transfers can occasionally truncate, leaving half-written .eng files that lack their closing blocks.
  • Missing Dependencies: While the .eng file itself might be perfectly intact, it is common for users to perceive the file as "corrupt" when it fails to load due to a missing .s (shape) or .ace (texture) file referenced within its code blocks.

What Data Can Be Recovered

In the vast majority of cases, all data can be recovered from a damaged Engine file. Because the format is entirely text-based, there is no complex binary data to decode. Even if the file is severely mangled by a bad text edit, the underlying physics values, sound references, and shape file paths remain visible and salvageable.

If the file has been partially truncated, the remaining data can usually be read, and the missing parenthesis or parameter block can be manually reconstructed by comparing it to a working file from a similar locomotive.

How Recovery Works

Repairing a Microsoft Train Simulator Engine file is a process of syntax validation and correction. We approach recovery through the following steps:

  1. Isolation and Testing: We first isolate the suspect .eng file. If running the simulator generates an error pointing to a specific train, we check the Windows event logs or use third-party diagnostic tools like ConBuilder to pinpoint the exact line number where the parser failed.
  2. Encoding Normalization: We open the file in an advanced text editor (such as Notepad++) and check the encoding. If the file has been accidentally saved as UTF-8, we convert it back to ANSI, which often resolves invisible character conflicts instantly.
  3. Syntax Auditing: We systematically scan the document for unclosed parentheses. MSTS requires strict symmetry; every ( must have a corresponding ). We also verify that all numerical values (such as Mass and MaxVelocity) contain no letters or invalid characters.
  4. Path Verification: We cross-reference every file path listed inside the Wagon and Engine blocks to ensure the referenced shape and sound files actually exist in the correct directory.
  5. Restoration: Once the syntax errors are corrected and the file is saved in the proper format, the locomotive will successfully load back into the simulator.

Frequently Asked Questions

Can I open and edit a Microsoft Train Simulator .eng file in Notepad?

Yes. Engine files are plain-text documents and can be safely opened in Notepad, Notepad++, or any standard text editor. However, you must ensure you save the file in ANSI format, not UTF-8, or the simulator will not be able to read it.

Why does my game crash immediately after I edited an .eng file?

The MSTS parser is highly sensitive to syntax. If the game crashes to the desktop immediately after selecting a locomotive, you likely deleted a necessary parenthesis, misspelled a parameter, or entered an invalid character (like a letter where a number is expected). Revert your changes or carefully check your syntax.

What is the difference between a .eng file and a .wag file?

In Microsoft Train Simulator, .eng (Engine) files are used for self-propelled rail vehicles that generate power, such as diesel locomotives, electric trains, and steam engines. .wag (Wagon) files are used for unpowered cars, such as freight cars, passenger coaches, and cabooses. Both utilize a similar plain-text structure.

My .eng file is fine, but the train still will not load. What is wrong?

An Engine file does not exist in a vacuum. It acts as a set of instructions that tells the simulator to load specific 3D models (.s files) and textures (.ace files). If any of the files referenced inside the .eng document are missing from the folder, the train will fail to load.


If you are struggling with a corrupted Microsoft Train Simulator Engine file, or if a custom add-on locomotive refuses to load due to configuration errors, we can help. Our team specializes in parsing, validating, and rebuilding legacy simulation configuration files. Send us your damaged .eng file today for a free evaluation and recovery assessment.

Send us your .eng file for a free evaluation

Our recovery engineers will tell you exactly what can be recovered — at no cost. There is no charge if we cannot recover your data.

Start a free evaluation