What is the REF file format?
A .ref file in the context of Microsoft Train Simulator (MSTS) is a plain-text structured reference file that lists available scenery shapes for use in a train route. It serves as an index for the MSTS Route Editor, populating the object picker with the shapes, collision properties, shadow settings, and alignment types available in a given route library.
The file uses MSTS's token-block text format - a hierarchical structure of named blocks and key-value pairs also found in other MSTS file types. The top-level block is typically named Shape_Definition_File. Each entry records the .S shape filename, collision class, shadow behavior, and a human-readable description. Because it is plain text, it can be read and edited in any text editor.
Microsoft Train Simulator 1.0 was released in July 2001 and received no major updates beyond patches. The .ref format lives on through Open Rails, an open-source successor that reads MSTS .ref files natively and remains actively maintained. Dovetail Games' Train Simulator (formerly RailWorks) uses a different format.
Note that .ref is a generic extension used by many unrelated applications; only its location within an MSTS or Open Rails route directory identifies it as a train simulator file.
Security & safety
RISK: LOWPlain-text file, cannot execute. Safe to open in any text editor.
Format details
in a nutshell- Generic Reference / Cross-Reference File - Compilers, linkers, and IDEs use .ref for symbol cross-reference tables; format varies by tool.
- Refworks/ProCite Reference Management Export - Some reference management tools export .ref citation files in a tagged text format.
- Various game engine reference files - Multiple game engines use .ref for asset manifests or object-reference lists; unrelated to MSTS.
Programs that open REF files
Technical details
deep spec| Developer | Microsoft Corporation |
| Application | Microsoft Train Simulator Route Editor; Open Rails (open-source successor) |
| Format type | Plain-text token-block structured file |
| Top-level block | Shape_Definition_File |
| Encoding | Text, ASCII (Windows-1252 in MSTS era) |
| Typical size | 1 KB - 500 KB |
| Per-entry fields | .S shape filename, shadow properties, collision class, alignment type, description |
| Function | Populates the Route Editor object picker with available scenery shapes |
| Associated OS | Windows |
| Introduced | 2001, with Microsoft Train Simulator 1.0 (released July 2001) |
| Open Rails compatibility | Reads MSTS .ref files natively; actively maintained community successor to MSTS |
| Released | 2001 (with Microsoft Train Simulator 1.0) |
Community Q&A
asked by usersNo questions yet - be the first to ask about REF files.