Thinning Out the Config file.

jeff1959

Member
I am getting ready to upload a small route and took a look at the config file. I discovered a slew of string references that are no longer part of the route. Some are named industries used, then removed. Some are removed triggers and track marks. Others are rolling stock once placed on the route, but removed.

Can I "cull the herd" and shorten the config file?
 
I'm certainly not an expert on the vagaries of config files, but as an old programmer my suggestion would be to make a backup copy of the config file and then start removing the bits line by line that you think aren't necessary. You could do a full edit and delete all of that you think are the unnecessary bits at once, but just realize that if you do that you might not be able to determine the removal of which particular line of code caused a particular issue. If everything blows up - plug in a copy of the backup and start over. Just make sure you keep a copy of that backup file until at least everything is performing as you expect.
 
I think - but I may be wrong, but I believe you should select to "Delete Faulty or missing assets" in the route. Otherwise your attempt to edit the config file will be overwritten by the route itself if this isn't done, and should also save you editing the config file. Hopefully someone can confirm or otherwise.
 
Jeff --

I found the same when I merged several layouts.

I made a backup cdp of the layout, edited the config file to remove all the unneeded entries. It worked. But DO make the backup -- just in case.
 
I think - but I may be wrong, but I believe you should select to "Delete Faulty or missing assets" in the route. Otherwise your attempt to edit the config file will be overwritten by the route itself if this isn't done, and should also save you editing the config file. Hopefully someone can confirm or otherwise.

I tried removing KUID's from the config file manually and it did not go well. Since then, I have used the Remove Missing Assets from the Surveyor menu and that works best in my cases.
 
My experience and advice is NOT to manually remove any items in the <kuid-table> or <string-table> lists. These lists, from my observations, are rebuilt every-time the route is loaded into Surveyor and Driver. It is constructed from data in the various other map and object files that are saved with the route so the deleted items will be returned to the list. The best advice, as pointed out in several posts above, is to use the Delete Missing Assets function.

However, as the config.txt file is a pure text file, any overhead created by excessive entries in the lists will be minimal - particularly is the route is several MBs in size. For example, my current route under construction has a config.txt of 370kB out of a total of 171MB.
 
Last edited:
Back
Top