Trainz/AM&C/Removing Unwanted Assets

Trainz Asset Maintenance and Creation
TOC | BeginningsFun | AM&C | Creation | InBook Refs ORP Refs:  • Index • Containers • Kinds • Tags | Appendixes  • Vers
 Mouse use

Introduction edit

Until you get into actual from-scratch asset creation, an New Trainzers first efforts will likely to be to take a route that interests you and start modifying it—try some ideas and see how they work out. This is highly recommended—so much so our tutorials use this method with our guidance!—and how most of us climbed the learning curves of matching terrain, terrain coloring, or altering some route innocently downloaded because of an interesting name to see it was 'vastly disappointing-but-had-much-promise' with TLC.

Upgrading an older route without interactive industries and converting it to one which comes alive with passenger stations that work, industries that offload and source products, and add a few portals is an excellent way to build knowledge of what is available in your Trainz stock install, and as a way to begin exploring CM and opportunities afforded by the DLS. Eventually, we all want to weed those older routes out and off or improve them into something more than a nice to look at bit of fun. This page is about doing that in a smart way, so you don't make the mistakes some of us did.

With Trainz, you have to learn to sometimes think like a programmer, that is, be a little paranoid, and take steps to make sure you can go back, then start forward again with new knowledge of what not to do! Saving a route before making major additions or radical changes, then cloning it for the big change is one of those Good practices we urge all to adopt.

Managing assets you never wanted edit

Aside from your own paranoid tendency to save up new routes before making radical trial changes, asset proliferation will come from over use of the DLS (before knowing what not to do, what you don't need, and won't want). Those things take some experience to gain perspective, and a plan or two. A mission of where your Trainz route building is headed. With that, you can decide extra assets are a burden, or not, as you choose. Here we also present some alternatives to deletion.

Many others that could be a weeding target are those assets you'll see which have come down from on high because they were dependencies of a route you deliberately and innocently brought off the DLS, to find it had a thousand assets you also found in the CM download que. Good news today is you can let those download, launch Trainz a second time and safely run surveyor or Driver (This is what TADdaemon blessed the game with back in upgrading [12.5 hrs with no local content on one older 32 bit machine] TS2009-SP4 and after). The first couple of times that happens it can be a shock, but when you examine such a you'll find you get disappointed later when it doesn't, for on those "treasure-chest" routes, lies a lot of good content. Or at least I've always found a few gems, even in the bad ones.

So why would you want to delete such? Beats me, unless it's full of things you can never see yourself using (e.g. Catenary wiring assets and trolley style rail lines just have no current attraction in this brain).

  • So one alternative is to disable such content in CM (Select, RMBHd+release over the menu item), and it won't appear in the asset lists any more in Surveyor.
You can do that with blocks of assets all at once, or pick and choose through a longer list when they are separated by CTRL+⇧ Shift+RMB clicks on individual ones. Clicking again with the shifted Ctrl will toggle beck to unselected status (i.e. Not highlighted, and without loosing the rest of the highlighted list of 'honored selectees' and needing to start over again.) Best to do this in small groups in any event, no more than a couple of screenfuls at a time. Note the bottom item and do the menu operation, then start with the bottom item just at or off the top of the next screen.
  • Archiving (Same 'select, RMBHd+release' process) it instead is a better method when that one route asset you want to hang onto playing in a Driving mood day will accomplish much the same thing.
In that case you have to set up one or more archive folders. Once archived, you can't move the folder as CM will still read things in there if it needs them for a Driving Session or on another route. This just gets them out of the way in selections modes in Surveyor, as does deleting them or disabling them. Getting them out from underfoot is the goal, and the CDPA files are ready to load for when needed on a route you drive.
  • Surprise Point!, normal local content is NOT ready to load--it needs read in and processed during input. It is semi-ready, partially compressed and organized, but not pre-compiled for use.
  • In both cases, the asset unclutters Surveyor menus and frees you up to focus on things to try and things you know work and are compatible with this months/years projects.
Both disabling and archiving won't make them hide in Content Manager searchings, You can't loose them if the data base is tracking them. It and TrainzUtil still can get to them.
  • You can set up a filter that won't display them, so best of both world's, you can see and not see as you choose.

With today's HDDs pushing an average of well over 500 Gbytes, there is less reason than ever to totally delete an asset (excluding a stinky route and it's sessions), but that can also be a good personal challenge—overhaul the thing and make it into a possession you are proud of. But if your mind is set on deletion, this page will tell you some tips.

Backing up, in case edit

As a safety precaution, you may wish to backup assets that you have created and/or downloaded before removing any of them. Do as you will with routes, but good scenery assets, trackside signals and boxes, and different track and bridge types make the rounds to many a route, so you may need such assets again for some other route.

  1. The obvious method for that is to export them to CDP, so you need to scheme out a naming and tracking system for yourself, if nothing else, cut and paste kuids into a text file listing the cdp contents using the same name and folder.
    1. TIMESAVER — Capture that 'name' before saving the first file (recommend the text file first— when you save as, Tab ↹ to the extension selection line, then ⇧ Shift+Tab ↹ to back-TAB to the Save As title line, this will then be fully highlighted, CTRL+C to copy the name for the cdp file operation.)
    2. If CDPing a single asset, one 'Good Practice is to systematically append the KUID as part of the title in a standard never-varying method (to aid searching). RECOMMEND format syntax (kuid2_nnnnn_mmmmmm_#). That's a valid format for base initial KUID codes expressed in Windows compatible file notations— and it allows you to search for just the (kuid2_nnnnn_mmmmmm' when needing something.
    3. If you sort your List after applying selection criteria filters by KUID (Handy_Technique: Click on the column header, it will sort to that column)
    4. This dual save by same name gives you a Near Instant way to find them, going forwar. Many text search utilities (including the built-in Notepad++ SAR ability) can see into many files to Search (Find) a kuid then. Details on how-to see into files is covered elsewhere, but being systematic and organized about the prospect will speed success in finding them later.
  2. For another method, this one giving you a stash of things you can examine at your leisure to see how content is put together:
    1. Open them for edit, Run PEV-tools from a batch file in the folder,
    2. Copy them all to another temporary directory,
    3. edit their kuid to a Kuid2 suffixed ':+1', pseudo-improvement. (for example:
      <kuid:zzz:xxx:yyy> to <kuid2:zzz:xxx:yyy:1> or
      <kuid2:zzz:xxx:yyy:4> to <kuid2:zzz:xxx:yyy:5>)
    4. re-import the 'pseudo-fixed' asset to verify it is all in that folder (Textures, meshes in particular might be missing)
    5. recommit both of them (Note: Trainz will have made a new local folder in ..\editing when you import the changed one, so best to also change the asset name when promoting the kuid and/or version. I suffix a '-a' meaning adjusted, and can search THAT in CM→Names search to find all non-stock assets immediately.)
      1. afterwards, copy or move the error tested one in the temp folder (That can just be dragged into your archive directory once you know it's gestalt--next step), then after committing the +1-kuid test version and the original, delete both of them.
      2. Recommitting before deleting is in some cases an necessary step, so form the habit and make it a 'good practice' of yours from the start.
    6. If successful, move the folder to the 'manually managed' archive directory you manage without Trainz knowledge, freeing up the temp folder for 2-3 new assets to pillage.
    7. Trainz will promptly forget they were around, especially after quitting out and reloading it, which is recommended every couple hours as a good practice.
Running PEV's tools from the batch will usually grab the meshes and textures into the local folder.
  • Recommitting the 'original folders files' after running the batch, will likely get an error complaining that the texture is already in CM's cache folder. So sort by extension, delete all the textures, recommit, then delete using CM. But only after you're sure all the contents are in the folder you want to keep. (Silly to go through all this and not make sure of THAT!) But the goodies will be safe, ...just in case you want them later.

Pruning Routes and Sessions edit

This section also covers a process to try and move a session onto a newer version of the layout.

Layouts that you have created yourself can be deleted in Surveyor Main Menu where the Table of Contents of Routes, Sessions and Scenarios is displayed.

  1. First delete any related sessions, for if kept, their referencing the Route asset KUID as a dependency, so will create a Missing Dependency Fault or a problem to be dealt with by deleting in CM.
  2. The second option has two forks, start by doing a author name search for yourself, this can be your Trainz Kuid pre-fix preceded by the # key: '#497853' for example. Refine that if you wish by filtering for just Routes and Sessions.
    1. Now with your target(s) in sight you have a choice, providing you have done as many of us do routinely and saved major change versions with a suffixed version number (Mod XXX, or V15-7) AND you want to try to put some of those old sessions on the new version, before deleting the route, Hand Edit the Session Config.txt for the Route and change it's KUIDs by searching for the old route, and replacing each place the kuid appears. In pre-2009-SP4, their will be one in the body near the English description field data or above the English string-table, and if later versions hold true, as the last item in the kuid-table container.
    2. This gives you better than even chances(check the old session will work on the new route. It's a crap shoot if you have positioned train consists somewhere where you have adjusted track heights and/or moved the track a bit.
    3. One reason to hang onto that old Route until testing is it can possibly be recovered by moving back to the old kuids (Reverse the above), Edit the old route & Session, relocate the cars missing the tracks to a place you didn't molest, then repeat starting above. Loop a couple of times through such attempts before giving up.
    4. If the consist has just been a little off it's 3D co-ordinates, using the F7+M tool can allow you to grab the engine or cars from the minimap. Best to rotate the camera straight down, do a CTRL+F (Find) on one of the cars, then without moving the mouse try to grab and move it. If successful, the entire consist will move too, per normal, and you will see it snaps to the track at the new height. All is well... if you can grab them. If not, delete the session and forget it.
    5. Did you record the session rules settings as you went on a card-file or spreadsheet? If you did a thorough job documenting it (Easiest way to write a complicated session) you can just refer to that and re-enter it.
  3. In all the CM versions, all assets can be deleted from inside the Content Manager screen. Once you've done so, it's gone. Hopefully to bit heaven. Other older Trainz are more basic. TRS2004 and earlier Trainz assets can be removed by manually deleting their kuid folder in Windows Explorer. Alternatively, for this older generation, TrainzObjectz can be used to delete unwanted assets.

Deleting an asset does not delete any of its dependencies. With a layout, the dependencies may number in the hundreds to several thousands.

  • TrainzObjectz includes an option to list and delete orphaned dependencies.
  • The CMs don't care if you orphan them, but only reports when one is missing. However, you can filter and weed things out if you like. Surround a bunch on the screen with a big selection, test using the dependent assets drop down RMBHd to see if any kuids need the proposed victims, if not, delete away.

TRS2006 edit

This Trainz page is dated or in need of reorganization and improvement, and as such has been listed for Clean-up as soon as we can get around to it. It has been listed at Category:Trainz pages needing attention, and we apologize for any inconvenience you may incur because our vlunteer staff hasn't found time to make it better.  

(The following information is kindly supplied by ColPrice2002)

Routes that have been created by you can be deleted in Surveyor.

Also you can delete any asset that is not built-in with CMP.

To delete a layout and its dependencies:

Open CMP, search form "Location = Local" + "Category = Routes" and select the layout to be deleted.

Right-click and select "show dependencies" from the menu. This lists the dependencies in a pop-up window.

Now click the "view in main screen" button, and all of the dependencies are listed. Press CTRL/A (or use the Select All menu option), then "Delete" to actually delete the assets.

Then return to the CMP list of layouts, select the relevant layout and delete that.

You will receive error messages if you try to delete built-in content and these can be ignored.

The only problem is that you may delete a dependency that's used by another route. You won't find out until you look at all the routes you have installed and look for the missing dependency flag (or try to load the route).

One way of reducing the impact is to archive the route and its dependencies (create a new archive for deleted routes). Carry on as before - deleting everything - if you need a deleted asset CMP will pull it from the archive. Once you're happy that the archive isn't needed you can delete it - this saves you re-downloading.