Skip to content

MSTS Validation Experiments

perpetualKid edited this page Sep 13, 2026 · 4 revisions

MSTS validation experiments

This page defines a reproducible validation method for uncertain MSTS schemas. It separates checks that can be performed on preserved files from experiments that require Microsoft Train Simulator or the Route Editor. A parser accepting a record is not a runtime result, and a runtime result from one MSTS build is not automatically a universal format rule.

The current schema pages contain derived implementation evidence and observed relationships, but no controlled MSTS execution results are claimed here unless a procedure, input corpus, MSTS/editor version, and output comparison are recorded.

On this page

Evidence levels

Use the strongest applicable label for each result:

Label Meaning What it can establish
Observed content A record or value occurs in a named original or community file The structure or value exists in that producer's corpus.
Static validation A deterministic check over files and cross-references Counts, indices, reciprocal links, path reachability, and unresolved references.
Experimental A controlled MSTS or Route Editor input change with captured output Behavior of the tested version and procedure.
Independent implementation A separate parser or editor agrees with the structure Stronger corroboration of layout; not proof of MSTS runtime behavior.
Derived implementation FTS/Open Rails accepts, writes, or interprets the structure Compatibility behavior of that implementation lineage.
Inference A hypothesis based on names, correlations, or partial behavior A test target, never a settled field definition.

FTS and Open Rails share parser ancestry and should be counted as one derived lineage. TSRE5 is independent where its source and behavior are separately verified. Agreement between copied or inherited parsers is not a second independent experiment.

Experiment protocol

For each experiment:

  1. Record the MSTS or Route Editor version, operating environment, route/content package, and tool build.
  2. Make a byte-for-byte backup of the input files and calculate hashes outside the content being tested.
  3. Change one variable at a time. Keep route, train, activity, and installation state constant.
  4. Record the exact changed token, original value, replacement value, and reason for the change.
  5. Launch the smallest workflow that exercises the record: load route, open Route Editor, load activity, place object, or run service.
  6. Capture success, warning, crash, ignored change, repair prompt, rewritten files, and generated defaults.
  7. Hash and compare every output file. Preserve both the original and generated versions.
  8. Repeat with a control file and, where possible, a second content producer or MSTS build.
  9. Publish the observation, not a stronger semantic claim than the evidence supports.

A load failure is not enough to identify the invalid field: isolate the change, check logs, and repeat with the smallest possible file or route. A successful load does not prove that the changed value was used; inspect the resulting behavior and rewritten data.

Preservation rules

  • Never edit the only copy of an original file.
  • Preserve text encoding, SIMISA envelope, binary/compressed form, record order, unknown fields, repeated records, count values, and raw numeric tokens.
  • Keep absent, empty, zero, and implementation-generated default values distinct.
  • Compare decoded structures and raw bytes separately. A semantically similar rewrite can still destroy producer-specific information.
  • Do not replace an unresolved value with a parser default merely because the simulator loads the file.
  • Treat Route Editor rewrites as output from that editor version, not as proof that the original file was malformed.
  • Do not publish private archive paths, installation identifiers, or undistributable content. Refer to a corpus entry by a stable local identifier and hash.

Static corpus checks

Static checks are the first, cheapest experiment layer and can run without MSTS. They should produce a report containing input identifiers, file hashes, check version, findings, and unresolved references.

Check Inputs Expected observation Does not establish
tsection.dat bounds Global and route section/shape tables Declared bounds, actual records, duplicate IDs, missing referenced sections/shapes Which bound MSTS uses when they disagree.
TDB graph .tdb / .rdb nodes, pins, vector sections Invalid links, unreachable nodes, item ownership, section references Route Editor repair or runtime tolerance.
World/TDB identity .w/.ws, .tdb/.rdb Tile-local UIDs, selector/database ownership, missing or duplicate object links Whether MSTS repairs or ignores a mismatch.
Path graph .pat points and nodes Invalid fromPDP, main/siding links, cycles, unreachable branches Spatial matching tolerance or editor repair.
Cross-file assets .s, .sd, .ace, .sms, .wav, vehicle and world references Missing files, ambiguous basenames, unsupported extensions, context-dependent lookup Runtime fallback precedence.
Operations references .act, .srv, .trf, .con, vehicle files Missing route, path, service, traffic, consist, shape, sound, and cab references Which missing reference prevents MSTS loading.
Round-trip preservation A parser/writer and a source file Token/order/count/index changes after read/write Whether MSTS accepts the writer's output.

Static reports should distinguish hard structural errors, unresolved references, suspicious variants, and informational implementation extensions. Do not turn every warning into a repair.

Route and world experiments

These experiments target the first route-level priorities:

Question Controlled change Observe
tsection.dat collection bounds Alter only a collection header while keeping records and IDs unchanged Route load, Route Editor enumeration, warnings, and any rewritten bound.
Duplicate section or shape ID Duplicate one ID with identical and then different payloads Selection precedence, load failure, editor repair, and output ordering.
Dynamic-track conversion Convert one route dynamic-track object while retaining geometry and placement Changes to route tsection.dat, .w, .tdb, and visible geometry.
World/TDB UID mismatch Change one world object UID or one TDB reference Missing object, ignored link, repair prompt, or rewritten relationship.
Tile-boundary position Move an object or path point across a tile edge without changing its absolute position Coordinate normalization, object identity, and editor rewrite behavior.
Static collision flags Toggle one CollideFlags bit on a CollideObject Visual obstruction, physical interaction, editor preservation, and runtime behavior.
Forest and transfer dimensions Change one Area, TreeSize, ScaleRange, Width, or Height value Rendered extent, scaling, defaults, and rewritten values.

These tests require a known-good route copy and a capture of all files rewritten by the Route Editor. The current wiki records no completed MSTS results for them.

Track-item experiments

Use one isolated item at a time and retain the reciprocal or cross-file records:

Item Controlled change Observe
Crossover Break one reciprocal link, change one shape ID, or move one XoverPts location Pair detection, editor repair, shape selection, and placement tolerance.
Platform or siding Disagree one endpoint name, flag, or reciprocal ID Which copy is displayed, repaired, or preserved.
Level crossing Change one timing value, flag, count, selector, or CrashProbability representation Warning, animation timing, rail/road ownership, and numeric acceptance.
Pickup Change capacity, fill rate, type flag, or linked item Units, supply behavior, animation, and missing-link handling.
Sound region Change TrItemSRData, track type, rotation, or link cardinality Track-sound selection, orientation, mismatch handling, and .ws/world behavior.
Car spawner Change frequency, average speed, endpoint order, or optional list Spawn timing/speed, route traversal, defaults, and endpoint repair.
Signal Change one TrSignalDir field, subobject bit, or world/TDB link Head selection, junction direction, rendering, and repair behavior.

A field's accepted numeric type is not established by one successful value. Test integer-looking and fractional values where the file grammar permits them, then compare loader behavior and rewritten representation.

Asset and operations experiments

Area Controlled change Observe
Shape descriptor Remove .sd, empty its bounding box, or toggle one ESD flag Default descriptor state, visual obstruction, snapping, texture selection, and rewrite behavior.
ACE texture Change one surface code, mipmap level, channel, or envelope Decode result, error handling, fallback, and preservation of unknown header data.
SMS/WAV Remove one file, change a trigger, use a cue point, or provide an unsupported WAV format Missing-file handling, playback, loop/release behavior, and logs.
Rolling stock Remove or alter one shape, sound, cab, brake, coupler, or freight reference Load stage, diagnostics, runtime behavior, and rewritten defaults.
Path/service/activity Change one index, time, flag, or missing reference Loadability, runtime schedule, editor repair, and preserved raw values.

Sound and rolling-stock tests should use short, legally usable assets and a deterministic activity. Audio playback observations need the sound-quality setting, camera/view, and repeat count recorded.

Result template

Copy this template for each completed experiment:

Experiment ID:
Date:
Evidence label:
MSTS/Route Editor version:
FTS/Open Rails/TSRE5 version, if used:
Input corpus identifier and hashes:
Control input:
One changed variable:
Original record/value:
Replacement record/value:
Procedure:
Observed load/runtime behavior:
Files rewritten:
Output hashes:
Repeat count:
Result:
Remaining uncertainty:

Use Result for the narrow observation, for example: “Route Editor rewrote the collection header to the number of enumerated records.” Do not expand that into “the header is always a record count” unless other producers and files support the conclusion.

Corpus observations

SCE route anchor

User-supplied directory inventory identifies the route-definition companion set:

  • SCE.trk
  • SCE.tdb
  • SCE.rdb

Evidence label: Observed content. This establishes filename presence only. No claim is made here about SIMISA encoding, record validity, graph consistency, world-file coverage, asset completeness, or MSTS/Route Editor load behavior. The machine-specific source path is intentionally omitted.

Current status

No controlled MSTS or Route Editor execution result is recorded on this page yet. The following work is ready for execution when a legally usable MSTS installation and corpus are available:

  • static tsection.dat bounds, duplicate IDs, and dynamic-track reference checks;
  • world/TDB UID and selector consistency checks;
  • crossover reciprocity and XoverPts placement checks;
  • level-crossing numeric and timing variants;
  • pickup, sound-region, and car-spawner cross-file checks;
  • shape descriptor absence/default behavior;
  • .sms/WAV missing-file, codec, trigger, and cue-point behavior;
  • activity, service, traffic, consist, and vehicle missing-reference behavior.

Until those results are captured, the related schema pages should continue to label these meanings as implementation evidence, observed variants, inference, or open questions.

Sources

  • MSTS content: evidence taxonomy and research workflow.
  • Kuju structured file format: envelope, encoding, and preservation boundaries.
  • [[Track database (.tdb)|MSTS-Track-Database]], [[track sections (tsection.dat)|MSTS-Track-Sections]], and [[world files (.w and .ws)|MSTS-World-Files]]: route-level schemas and existing validation checklists.
  • [[Path files (.pat)|MSTS-Path-Files]], [[activity files (.act)|MSTS-Activity-Files]], [[service files (.srv)|MSTS-Service-Files]], and [[traffic files (.trf)|MSTS-Traffic-Files]]: operations schemas.
  • [[Shape files (.s and .sd)|MSTS-Shape-Files]], [[texture files (.ace)|MSTS-Texture-Files]], [[sound assets (.sms, .wav, and .ws)|MSTS-Sound-Files]], and vehicles and cab views: asset schemas and cross-file references.
  • Stephen Dearne (SDTrains), A TDB Primer, v1.2: community examples and Route Editor repair observations; see the source register.

Navigation

User documentation

Development and architecture

MSTS domain knowledge

News archive

Clone this wiki locally