Skip to content

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.

Map Validator Tool Window


1. Launching and Using the Tool

  1. In the nEditor main menu, click the Map Validator button.
  2. In the popup window, click Select OMSI 2 Map Folder.
  3. Choose the target map directory (e.g. .../OMSI 2/maps/MapName).
  4. 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 TTData directory (responsible for timetables, tracks, and bus stops).

B. Terrain Tiles [map] and Duplicates Check

  • Tile Enumeration: Parses the [map] section in global.cfg and confirms that all declared .map files 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 in TTData reference 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 of 1.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.
  • Tile Index Validity (tileIndex): Checks whether entry points refer to valid, existing tile indices within global.cfg.
  • Object Index Verification: Ensures the referenced objectNumber does not exceed the actual scenery object count on that specific tile.

D. Timetable and Bus Stop Integrity (TTData)

  • Busstops.cfg File:
    • Verifies that each stop's tileIndex is within the valid range (0 .. TotalTiles - 1). Out-of-bounds indices directly cause game crashes.
    • Flags potential tile index conflicts if deduplication is attempted.
  • StnLinks.cfg File:
    • 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 in Busstops.cfg.
  • Trip Files *.ttp (Time Table Trips):
    • Confirms that all [station_typ1] and [station_typ2] stops are properly defined in Busstops.cfg.

E. Terrain Texture Scale [groundtex]

  • Detects ground texture entries in global.cfg with scale factors exceeding 255 (such as 300).
  • 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).