Releasing a Route...?

I'd just like to point out that doing a fresh intall of trainz, whatever the version modernity is likely totally unnecessary if you all know WHERE your version is putting files of various kinds. CMP is a database manager and internet interface, not something incorporating pre-rendered data into a compiled object. That is, when we boot into a route or a session, Surveyor or Driver have their own calling routines to suck in data objects (kuid objects) which they then label, attach internal handles, etcetera used 'on the fly' to populate the visible Polygonal Meshes we can see... the most common of which are likely pre-located in the cache and less used organized in the HDD Cache. A 'just one' kuid will likely stay on the HDD until needed on a largish layout. Colors, common cars, trees, etc. will reside in RAM and cache RAM.

Only things we can see, not things off camera are being processed at anyone time. Oh there is simulation software 'timing' and 'operating' whatever the other consists are doing in simulated real time, but no or only a few video mesh operations (e.g. track crossing from one baseboard to the next, requires off camera re-indexing of the 'addressing' of the 'off' locale should you suddenly visit that loco, but until that train enters your visual sight, until it needs a camera view, Trainz isn't likely to be doing graphical rendering.)

To return to the point on topic, simply renaming the given directory something else and substituting an empty substitute folder of the right 'normal' name will and should more than suffice. Running CMP THEN, will flag the assets as missing dependencies... thereby identifying your third party dependencies at the first level... which is the one's we grab inside Surveyor and place on the layout. At the least, that will give you a complete list of things that ARE NOT PART OF CD/DVD boxed assets (those are likely located in the db Cab files, I'm nearly positively certain there is no co-mingling, so the Cab content is expanded in a different folder entirely). Once produced, that list (Screenshot time) can then be further vetted vs the DLS, so you can identify which calls are real 3p assets (3pC) and be culled. You can really expedite this with a second (illegal--but see my bio) PC running a clone of the first... then the screen of one can be used to cull the things on the other...

If your folder is renamed elsewhere, say off C:\ instead of C:\Program Files\Auran\TRS20xx (or whatever) your original data remains unmolested, an you aren't wasting chunks of time overexercising your hard drives, adversely affecting date stamping, nor generating a need to track versions. For that and another reason, I moved all my Trainz into an C:\Auran folder to expedite directory flipping and ease finding stuff I moved for a bit. Do 'that conversion' as a save as before and after weeding out such 3pC when you are ready to rename the folders, create dummies and check, cull your 3pC contents, or keep them. Notice here you should have an indication that some are in DLS available state, so you know others can get them. Making a list to get would be nice though. Add it as a text file inside the route folder before you export it. (Open for Edit should not be necessary, I'm nearly certain 'spare files' in one of my layouts or another have been satisfactorily ignored by CMP.) I don't know whether the db manager checks and inventories when it boots, but it likely does... the loading delays indicate that is so to me. I'm sure we all know it rebuilds if Assets.tdx and .bku are renamed or deleted. Then, it does resurvey and index each data item for certain. (The other day it even sucked in stuff (parts of a layout to merge) I'd deliberately put in a sub-folder to have at a later time when I deliberately killed assets.tdx and .bku and rebooted. I'd forgotten all about them.)

By extension, you can copy an entire layout and or session knowing where Trainz is keeping your layout and Drivers sessions, merely by copying the correct hashcode named folders. Identifying those is easy as well. Search using windows in advanced mode for the most recently changed files in the local (directory) sub-folder. Sort by date modified, and the top or bottom of the list will be files most recently altered. Click and Open Containing Folder, and look in am editor edit to check the 'username=' field is what you actually wanted, then copy once you've got the data directory. (The Date the folder was created may or may not be valid as some clue to find what you want.)

I used this method to move files from one networked computer to the other just three days back. I'd overwritten something in the laptop adding the deluxe content of TRS2004 when I should have told it no... the TRS2006 item was more up to date and so I broke part of it generating a run time error in both Driver and Surveyor. (I've got a handle on it, or at least several things to try to fix it. I'd had hardware issues with the tower, which turned out to be a loose or faulty power cable that needed pushed together. I'd feared I lost several years of Trainz work! So I'll take the mistake over a broken main computer that crashes mysteriously or on which the hard drive [out of the blue] in the next instant 'hard drive cannot be found' error! Whew! I'm glad that's over.)

(I've just begun to think of building a flat data base on a spreadsheet (Open Office) to give me a route/session map to source data. Meaning which hash-code named folder is which route or session. The content should you look is the same folder content you get when 'Open for Edit in Explorer'. I've not tested whether the folder names change, but believe they don't and so are based on a hash of the kuid or username (English) to maintain 'onto' mapping to the db manager.)

In any event, no need to break things and spend time wasted when a few renaming keystrokes and a little basic computer knowledge will suffice. Hope this is helpful to you all.
 
What you say is exactly right for TRS04. In fact back then I had a series of batch files on the desktop which would change the 'World' folder around and delete the corresponding chump files to suit specific routes etc. Pretty sure the original idea came from the DHLR group, but I pinched the idea and expanded it. But back then the world folder was comparatively tiny and the 20 or 30 seconds it took to rebuild the chump was no big thing.

In later versions though you would need to rebuild the data base every time you changed the local folder, plus you'd need to change the 'Original' and probably a couple of others. to NOT rebuild the database every time there's a whole slew of folders and files you'd need to rename every time, and get it exactly right every time.

IMHO easier to just have two installs - a working install and a clean install. Bombproof!
 
The only 3 colors I've ever seen (it's -showkuids) of the kuid numbers are white, yellow and red. Never knew what the first two meant but doesn't red indicate a faulty or erroneous asset? Perhaps someone else can chime in on this.

Different red! Red up in the menu flyouts means faulty, not to be confused with red down in -showkuids which is part of the BuiltIn/DLS/3Party coding. Pretty sure red is 3Party, but not at my Trainz compuer to check....

Yellow = content is built in.
White = content was downloaded from the DLS.
Red = content is neither built-in nor from the DLS.
 
Compared to reloading a fresh trains every time you want to validate and upload a route:(, rebuiding the database is a moderate time sink:D. So let me revise and extend with a step-by-step method per your input. (Looking with a Hex editor, the world folders *.ja files do appear to be pre-processed indexed parts of the data base reflecting content, but not the routes or sessions. They appear to be the Cab, compressed organized compendium of assets in binary form of the distributed release.)

Whether the world folder can contain added & changed content I can't say as I have yet to download a single thing, but the time stamps in my world folder indicate all the *.ja files are part of the initial install and haven't changed since. Pursuing the thought "where the "Deluxe Content" I did add from TRS2004 deluxe's bonus CDROM go", I just checked, and they appear as *.gsl files in the TRS2006\libraries sub-folder, and affected no other directories. Those assets included spines, locos, cars, buildings at the least and I'm not sure what else. Hence, if downloads go there or to world or both, that's what needs 'backed up, blanked, and rebuilt'. Note there are a lot of other .gsl files in the libraries directory, but all have the common date stamp of the build release date as those in ...\world, the exe and so forth. In short they are easy to identify by the version's release common date stamping which won't be changing, whereas any new downloads will have widely varying timestamps.) This suggests to me that when downloading 3pC off the DLS, tracking which files it creates in a list therein (...\libraries\3Pclist.txt) would streamline finding which to hide somewhere later. This means forethought and self-discipline to create that tracking record will save a lot of time over the long haul. It also suggests you can likely eliminate a lot of 3pC content by 'Date Modified' vetting, in which case, I'd rename the libraries directory, and copy JUST THE release date coded ones into the new manually created replacement directory. When done delete the whole thing and rename the libraries directory back to \libraries. Simple. Actually, I can improve on that immediately. After downloading 3pC, move it into a '\Auran\LibraryFilesFrom3pC' directory. Now copy that whole directory into the \libraries directory, when it asks whether to overwrite the first duplicate (old) file, tell it 'Yes to All'. By copy the whole, I mean open each folder, [CTRL]-[A] to select all, [CTRL]-[C] to copy the file names, then paste ([CTRL]-[V] into the open \libraries folder. This will give all 3pC in \libraries the same datestamp making it easy to find them and either move or just delete them when needed ( s.a. for this task going forward).

[Having just written the last part of the above while proof reading all this, I'm not at all sure we need the below, given the date stamping in \libraries clearly indicate which are originals. But since it's done, I'll post it in case I'm misfiguring this.]

Recalling the mission, finding what 3pC kuid's are polluting a route we want to upload and share on the DLS... so the first step is to identify what 3pC is NOT on the DLS... so we want a naked stock virgin database as a testing tool. Hence:

1) You want to have a clean install to work with, so need to reload Trainz just one more time. Note changing your trains directory name (e.g. ...\Auran\TRS2006 renamed ...\Auran\TRS2006full) gives you a missing Trainz and safeguards important things like Assets.tdx and so forth. Renaming it effectively deletes it, as the registry has whatever path name it was installed under (unless you changed it like I did when I moved C:\Program Files\Aurans to C:\Aurans, requiring five or six pathname edits in regedit.exe, iirc), you can now safely reinstall it under the same (old) pathname.

[Also note, you can rename the exe files and the path and actually have two runable copies by using regedit to make matching changes before you install and use the old appropriately modified and clearly named shortcuts. In this motif, you need to preserve but modify the data/path in the registry Hkeys, not break them (renaming the directory does that). I'd FIND the exe name, and add the 'a' suffix (e.g. TRS2006.exe becomes TRS2006a.exe) everywhere, including in Hkey fields... Hence TRS20xxa.exe is or could be the dirty current directory and executables, the new install we're about to make in TRS20xx using the standard named TRS20xx.exe. Before leaving regedit, return to the top and search ([CTRL]-[F]) just the name of the exe file without the '.exe' and add the 'a' suffix to any Hkey field which has just that short name. There should be at least one. This technique would use double the disk space and duplicate everything but one version would be naked Trainz and the other extended Trainz where you do your main creation and work and downloads. What you loose in HDD you gain in saved time. Further, any of the exe file references in the registry you might have missed renaming will also work, even if they call an executable--the same file is in the other directory and your RAM doesn't know where it came from, nor care. Want to test for 3pC, drag or copy the route and session over into the naked trainz\local subfolder then rebuild it's two assets.* files. Just don't try and run both copies at once! Also, make sure to modify your shortcuts and rename them before the install of a new naked Trainz. I'd test it all runs before reloading a naked Trainz.]

Resuming the folder renaming method (without editing the registry)...
2) Reload Trainz in the same path as before (...\Auran\TRS2006 or whatever). [We now have a clean or Naked Trainz, and the old Trainz in a renamed directory.]

3) Now back up the new 'virgin' world and Libraries folder contents to the Auran root as well (...\Auran\world_No_3pC, ...\Auran\libraries-naked). Since I'd want to also allow 3pC that is available on DLS, I'd copy the later to ...\Auran_No_3pC as well.

4) Copy your route and sessions into the \local folder.

5) rename Assets.tdx and cache\Assets.bku or delete them. (e.g. You just rename assets.tdx and assets.bku to assets.good.tdx and assets.good.bku to restore later. The Windows hotkey sequence to rename things quickly are [CTRL]-[F]-[M].)

6) Launch trainz, let it rebuild, then look at missing dependencies... this is the list of things not part of the distributed base Trainz version you are running.
  1. As someone mentioned just above, colors will identify which are available on the DLS and so can be kept on the route.
  2. The rest are the target we set out to identify and eliminate as being user unfriendly to others. :hehe:

7) Copy the list (Screenshot) or make text notes of the missing kuids.

8) Now you copy back your original directory content into the newly reinstalled directories (unnecessary if you did the two runable copies method), and get back to your fully loaded CMP.

9) Using the screenshot and/or hand or notepad list, find what the kuids are and figure out how to eliminate them from your layout. :hehe:

10) Finish the upload, and get back to more entertaining Trainzing.

Feel free to drop me an email if you need further clarification or have registry editor questions or whatever. Fabartus at gmail dot com.
 
Compared to reloading a fresh trains every time you want to validate and upload a route
G'day, pretty easy really, install trainz from disc or downloaded file, patch to your desired build and then make a back up copy.
Do your testing or whatever then when you are finished delete it and copy your backup in it's place. Bingo fresh install is back, too easy.
Regards
Barrie.
 
Back
Top