Trainz Utility
v1.1 β’ Safe
Trainz Asset Fixer
A Python script that finds and fixes specific Content Manager errors in TRS19, TRS22, and Trainz Plus. Think of it as a targeted repair and warning tool, not a catch-all fixer.
- π‘οΈ Backup first: Creates
.bakcopies before changing anything β bogey conversions always get their own backup even with--no-backup. - π§ͺ Dry-run mode: Use
--dry-runto preview what would change β nothing is written. - π VE146 β Old bogey tags: Converts legacy root bogey lines to the modern
bogeys { }block. - π¨ VE65 β Missing texture stubs: Creates
.texture.txtfiles so the validator stops complaining. Asset may still look wrong without a real texture. - π VE10 / VE103 β Missing sounds: Writes a silent WAV stub. Sound slot is filled but will be silent until replaced.
- β οΈ VE179 β Bad region: Warns only β the right region KUID is project-specific and must be set in Content Manager.
- β οΈ Brace errors: Warns about mismatched
{ }β does not auto-"fix", as the correct location can't be guessed.
β οΈ Use at your own risk. Always back up your assets before running any script. While the fixer creates
.bak copies automatically, we take no responsibility for data loss or broken assets.
Requirements
- Python 3.7 or newer β Windows, Linux, or macOS
- No extra libraries needed
Usage
- Auto-detect Trainz folder:
python3 trainz_universal_fixer.py - Preview only (safe):
python3 trainz_universal_fixer.py --dry-run - Fix one asset:
python3 trainz_universal_fixer.py --path "path/to/asset" - Fix whole editing folder:
python3 trainz_universal_fixer.py --path "path/to/editing"
What it does NOT fix
VE39 / VE68 (texture sizes), VE13 (category-class), VE48 (trainz-build), VE217 (.m.reflect renaming), and thumbnails are not handled. These require manual editing.
A note on stubs
- Texture stubs stop the validator error but the asset may still look broken β replace with a real texture when possible.
- Sound stubs are silent β they exist only to suppress VE10/VE103, not to restore missing audio.
