Map Validator¶
Map Validator is an advanced diagnostic tool built into nEditor, designed to detect hidden errors in OMSI 2 map files.
Many critical issues in OMSI 2 result in cryptic error messages (such as the notorious Fehler bei Bereichsprüfung / range check error), an empty logfile (logfile.txt), or missing terrain tiles. Map Validator inspects the map's file hierarchy and pinpoints the exact lines, files, and root causes of potential crashes.

1. Launching and Using the Tool¶
- In the nEditor main menu, click the Map Validator button.
- In the popup window, click Select OMSI 2 Map Folder.
- Choose the target map directory (e.g.
.../OMSI 2/maps/MapName). - The editor will automatically run a comprehensive multi-stage audit and display a live console report categorized into informational messages, warnings ([WARN]), and critical errors ([ERROR]).
2. Validation Checks Overview¶
Map Validator inspects the map for the following rules and anomalies:
A. Directory Structure Integrity¶
- Verifies the presence of the primary configuration file
global.cfg. If missing, the folder is rejected as an invalid OMSI 2 map directory. - Checks for the
TTDatadirectory (responsible for timetables, tracks, and bus stops).
B. Terrain Tiles [map] and Duplicates Check¶
- Tile Enumeration: Parses the
[map]section inglobal.cfgand confirms that all declared.mapfiles physically exist on disk. - Duplicate Tile Detection: Flags duplicate entries for identical
(X, Y)coordinates in the[map]section. - Deduplication Risk Warning:
> [!WARNING] Why are duplicate tiles hazardous?
> In maps developed over years in the original OMSI editor, duplicate tile definitions frequently appear in
global.cfg. Many third-party utilities try to automatically "clean" them. However, if timetable links inTTDatareference higher tile indices, deduplicating the list shrinks the tile table and directly causes Fehler bei Bereichsprüfung crashes! nEditor's Map Validator warns you about this scenario.
C. Entry Points [entrypoints] and Quaternions Check¶
- Declaration Integrity: Confirms that the declared number of entry points matches the actual entries parsed.
- 3D Rotation Quaternion Validation:
- Spatial rotation quaternions
(X, Y, Z, W)must form a unit vector with a norm of1.0. - The validator detects corrupted values, out-of-range components exceeding
[-1.0, 1.0], and floating-point precision flaws from external tools that trigger crashes when spawning vehicles.
- Spatial rotation quaternions
- Tile Index Validity (
tileIndex): Checks whether entry points refer to valid, existing tile indices withinglobal.cfg. - Object Index Verification: Ensures the referenced
objectNumberdoes not exceed the actual scenery object count on that specific tile.
D. Timetable and Bus Stop Integrity (TTData)¶
Busstops.cfgFile:- Verifies that each stop's
tileIndexis within the valid range (0 .. TotalTiles - 1). Out-of-bounds indices directly cause game crashes. - Flags potential tile index conflicts if deduplication is attempted.
- Verifies that each stop's
StnLinks.cfgFile:- Validates all
[stnlink]relations and[stnlink_entry]route segments. - Checks tile index bounds for each track segment.
- Detects excessive numbers of unassigned tiles (
tileIndex = -1), indicating broken or corrupt AI traffic paths. - Verifies that start and destination stops (
from_id,to_id) exist inBusstops.cfg.
- Validates all
- Trip Files
*.ttp(Time Table Trips):- Confirms that all
[station_typ1]and[station_typ2]stops are properly defined inBusstops.cfg.
- Confirms that all
E. Terrain Texture Scale [groundtex]¶
- Detects ground texture entries in
global.cfgwith scale factors exceeding255(such as300). - Values exceeding 255 cause memory overflow in the OMSI engine and result in Fehler bei Bereichsprüfung.
3. Validation Summary¶
Once the audit concludes, a summary is displayed at the bottom of the console: * Total number of critical errors (CRITICAL ERRORS), * Total number of warnings (Warnings), * Confirmation when all checks pass successfully (All checks PASSED).