Logo
Print this page

RWDBFDup: a script for finding duplicate scenario GUIDs

Chacal
2015-08-22

Railworks (TS201x) keeps information about scenarios in your local scenario database,
which is a file named SDBCache.bin in the Railworks/Content folder.
Each scenario has a GUID (an ID number) looking like this: 180b376b-50d2-48b6-b77c-a4b18c75616c.
Scenario files are saved in a folder named with this GUID number.

Before TS2013, copying a scenario from one route to another was a simple matter of copying its folder.
Starting with TS2013, this is no longer possible because GUIDs now have to be unique in the database. If duplicate GUIDs are found in the database, the game will, at worst, crash at startup and at best, complain with this unhelpful message in Logmate: "Duplicate Scenario GUID in SerializeDatabase".

It is unhelpful because it doesn't say which scenario is duplicated, leaving you with the hopeless task of finding it yourself.

Enter RWDBFDup, a simple script that will find any duplicates in a few seconds and print out the GUIDs and the names of the relevant scenarios and routes so you can remove unwanted ones.


It is easy to use and harmless, since it makes no change to your scenario database.

 

Installation

1. Download the zip file from the RWA file library

2. Open it using either Windows Explorer, Winzip, WinRAR, 7Zip, etc.

3. Extract the contents to a new folder on your computer

Note: Recent versions of Windows try to be nice and user-friendly, and let you open a .zip archive file in Windows Explorer as if it was a folder. This is a lie! An archive file is NOT a folder. It is important to extract the contents and use it from outside the archive.

The folder you have created should now contain two files: this readme and the RWDBFDup.vbs script. Depending on your Windows configuration, you may not see the .pdf and .vbs file extensions.

 

Operation

1. Double-click on RWDBFDup.vbs

2. Change the path to your Railworks installation or keep the one displayed

RWDBRepair 02



3. Wait until the operation is completed



5. View the results

The result file below shows two scenarios having the same GUID. They also happen to have the same name. The two routes are clearly identified.



To resolve this conflict, you can now:

- delete one of the two scenarios (using the TS2015 editor, or RW-Tools, or by deleting the scenario folder in Windows explorer); or

- change the GUID of one of the two scenarios by renaming its folder AND editing its scenarioProperties.bin file.

Details and notes

1. I cannot test the script on every user's computer. Some errors may occur, in which case the operation will abort and you will see an error message. If this happens you should review the log (RWDBFDup.log), which is quite verbose. Most often the log will point to an obvious cause to the problem, such as a missing file, etc.

2. If you have any problem with no obvious cause in the log, contact me on the forums at www.RailworksAmerica.com with a precise description of the problem, and provide the log.

 

Last modified on
Copyright 2018 by Mutagenix - A subsidiary of the NERR Network. Best viewed at 1280 x or more.