Logo of blog type

About tracks.bin

Andrea66 TS2017

One of the most important and most critical files while developing a route is just track.bin and its files under the Track Tiles folder.

Unfortunately, crashes that occur occasionally in RW during editing could lead to invalidating the track. Restoring previous versions if you have a backup is not a problem as long as you restore the equivalent files under the Track Tiles folder. If this is not the case, the alignment between the track.bin and the tracks under Track Tiles is certain.

But even doing things correctly, you often risk having misalignments (at least this is my experience). Almost always the problem is not very serious, but staying with this situation could leads to issues loading the route and in game. This is proportionally problematic as the route extension increases.
Clearing a track.bin file and its sub-files (hereafter track-tile) is a fairly titanic challenge if you do not find the right tools to help you.

During the optimization phase of the To-Ba, I found myself facing this problem (thanks to Logmate warning line on several track), and I realized that without designing the right tools, the work really became impossible.
I have created scripts in Python that go through some aspects.
After an initial setup, you can run the various scripts in sequence and check and generate output lists for each of the following anomalies:

  • track node present in the tracks.bin but not present in track-tile li>
  • track ribbon present in the tracks.bin but not present in track-tile li>
  • track in track-tile but not in tracks.bin li>
  • track with idle tracking (apparent track) li>
    Surely with more time and better knowledge of Python and how it manage xml files I could have done a more automated job, but this was not the purpose I had prefigured.

    Although I often make backup copies and although I am very careful about recovery, I have found hundreds of “useless” rows that I cleaned while making the file even smaller, with benefit in loading and saving …

    For now I’m not going to publish these scripts because they are really “manual”, but if anyone is interested in verifying the route, please make it clear in comments or by email, and if the requests are significant, I will create an istruction/tutorial for use.

Leave a Reply