Replace KUIDs

VVMM

Trainz Scripter/Developer
Hi!

Is there any way you can replace assets from a route by KUID?
To give you an example, I want to replace <kuid2:1234:1234:5> with <kuid2:1234:1234:2>.
The replace assets function from the main menu doesn't work on different versions of the same asset as in my example.
Maybe they can be replaced by hand?

Thanks
 
You could try just deleting the higher revision, though I am not sure if Trainz will load the older version. Save to cdp before deleting. If that doesn't work (and I have a hunch it won't) you could edit the kuid number in the config of 1234:1234:2 and make it 1234:1234:5, install and when prompted choose over-write. Don't do that though if you are planning to distribute the route.....

Not sure though why you want to go backwards, if there is a problem with an update report it to help-desk for DLS or the creator for other 3rd party content....
 
In TS12 I have found that deleting the later version of an asset in CM does make the most recent earlier version the active asset. I have done this a number of times while waiting for missing dependencies to upload or where one was faulty for some reason such as wrong passenger kuid.
 
The point is that i have some custom 3rd party unofficially updated versions of some built-in assets from TS12, therefore they are locally modified. When i want to play multiplayer, trainz says it has to revert the changes and what it does is to delete the unofficially updated versions, but this causes some 3rd party routes that use the updated versions to show missing dependencies, so i want to delete the newer versions and make my routes not missing anything.
 
@ VVMM - that makes sense!

@ dnevans8 - I think you will find it depends on which version of an asset is recorded in the route config. Say a route calls 123:456:1 - if you have :5 and delete it, the route will happily load :1, :2, :3 or :4 if available. I'm not sure though that if the config calls :5 that it will load :2. I'm happy to be proved wrong but I suspect that if VVMM has had :5 saved in the route I think he's stuck with :5 or higher....
 
Dermmy - I agree if the route or any other asset calls for the later version of a dependency then you could be stuck although certainly in TS12 it is always possible to edit the config.txt file and change the version number of the asset to the lower version. This does work as I have done it many times, again where some routes or other assets are looking for updated versions of assets from DLC that is not on the DLS. I know it does not work if you need to completly change from one asset to different one, but changing version number does work. Of course this will not work for multiplayer because this will make the asset locally modified.
 
Got it!

Find a similar asset, doesn't matter what it is, so long as it is broadly similar. Use 'Replace Asset' to swap the unwanted high revision number asset for the 'sacrificial' asset. Delete the high revision version of the wanted asset. Now use 'Replace Assets' to replace the sacrificial asset with the low-revision version of the asset you used originally.

That will get the low revision number onto the map with nothing locally modified, so MP is good to go...

:)
 
I would think that a separate install for multiplayer only is the answer, if you have the disk space.
 
Thank you for all your posts! I will try Dermmy's suggestion as soon as i can. It sound like a variable interchange in C++ :D (when you need an aux variable)
 
Last edited:
It seems that this resolved my problem, but in my lucky case all the assets were objects. What if they weren't? (like driver commands, scripts and other stuff? Replace assets function does not work with these)
 
Back
Top