Version 1.5.4 - A Visual Studio Code extension that provides comprehensive language support for ENG, INC, WAG, CVF, and SMS files used in Microsoft Train Simulator and OpenRails.
- Download
eng-language-support-1.5.4.vsix(2.52 MB) - In VS Code:
Ctrl+Shift+P→ "Install from VSIX" - Select the downloaded file
- Restart VS Code
code --install-extension eng-language-support-1.5.4.vsix- File Types:
.eng,.inc,.wag,.cvf,.sms - Sections: Engine, Wagon, CabView, Sound, Lights, Effects, Controls, etc.
- Keywords: Engine parameters, physics properties, sound definitions, animations, cabview controls, and more
- Comments: Both regular
comment()and specialcomment(**)syntax with proper nesting - Strings: Quoted file paths and parameter values
- Numbers: Integer and floating-point values with scientific notation
- CVF Controls: Digital displays, levers, dials, multi-state displays, and cabview elements
- Smart Folding: Automatic code folding for sections and comment blocks
- Auto-Closing: Automatic closing of parentheses and quotes
- Bracket Matching: Highlighting of matching brackets and parentheses
- Comment Support: Block comment toggling with Ctrl+/
- Smart Path Resolution: Automatically resolves relative file paths
- Multiple Strategies: Tries different path combinations to find files
- Supported Extensions:
.s,.sms,.wav,.mp3,.ogg,.inc,.eng,.wag,.cvf,.ace,.dds,.tga,.bmp
.eng- Engine definition files (locomotives).inc- Include files (shared definitions).wag- Wagon definition files (cars, carriages).cvf- Cabview definition files (cockpit layouts and controls).sms- Sound definition files (audio management system)
This extension provides specialized support for SMS files used to define train audio systems:
- ScalabiltyGroup - Priority-based sound groups
- Streams - Audio stream configuration
- Triggers - Event-based sound activation
- Activation/Deactivation - Sound state management
- SoundLoop - Continuous looping sounds (engine, wheels)
- PlayOneShot - Single-play sounds (horn, bell, brakes)
- Variable - Parameter-controlled sounds
- Discrete - Multi-file sound selections
- Volume/Priority - Audio mixing controls
- FrequencyCurve/VolumeCurve - Dynamic audio modulation
- SpeedControlled - Speed-based sound variation
- RandomDelay/InitialDelay - Timing controls
- Distance3D/Doppler3D - Spatial audio effects
- RandomSelection - Random sound file picking
- SequentialSelection - Ordered sound playback
- Sections: Engine, Wagon, CabView, Sound, Lights, Effects, etc.
- Keywords: Control flow (if, else, endif), logical operators (and, or, not)
- Parameters: MaxPower, MaxForce, Mass, Length, BrakeForce, etc.
- Comments: comment(...) block comments
- String literals: Quoted strings for names and descriptions
- Numbers: Integer and floating-point values with scientific notation
- Operators: Mathematical and comparison operators
- Open VS Code
- Go to Extensions (Ctrl+Shift+X)
- Search for "ENG Language Support"
- Click Install
To set up the development environment:
- Clone this repository
- Open in VS Code
- Install dependencies:
npm install - Compile:
npm run compile - Press F5 to launch a new Extension Development Host window
To compile the extension:
npm run compileTo watch for changes:
npm run watchpackage.json- Extension manifestsrc/extension.ts- Extension entry pointlanguage-configuration.json- Language configurationsyntaxes/eng.tmLanguage.json- TextMate grammar for syntax highlightingexamples/sample.eng- Example ENG file for testing
ENG files are configuration files used by Microsoft Train Simulator and OpenRails to define:
- Locomotives: Engine specifications, performance characteristics
- Rolling Stock: Wagon properties, cargo definitions
- Cab Views: Control layouts and instrument panels
- Physics: Mass, dimensions, brake systems, coupling
- Sounds: Audio configuration and 3D positioning
- Animations: Moving parts and visual effects
INC files are include files that contain:
- Shared configurations: Common parameters used across multiple locomotives
- Reusable components: Engine definitions, brake systems, sound configurations
- Modular definitions: Separated sections that can be included in main ENG files
WAG files are wagon definition files that specify:
- Rolling stock properties: Freight cars, passenger cars, specialized wagons
- Physical characteristics: Mass, dimensions, loading capacity
- Brake systems: Air brake configurations, handbrake settings
- Cargo definitions: Load types, loading animations, weight distribution
- v1.5.4 (2025-10-06) - Enhanced SMS and CVF file folding support, improved language configuration
- v1.5.3 (2025-10-06) - Comprehensive keyword expansion (280+ new keywords from 200,000+ analyzed files)
- v1.5.2 (2025-09-24) - Enhanced WAG and CVF support
- v1.5.1 - File path navigation and improved syntax highlighting
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
MIT License - see LICENSE file for details