Alias(ing) rolling stock / locomotives

frogpipe

Yesterdayz Trainz Member
Let's say there is a route with scenarios and they use a Yoyodyne Foobar locomotive KUID<-1:12345>

I find a brand new and much more detailed model at GreatLocos.com and download it ( KUID<123456:789> )

Is there a way to change the config.txt for KUID<-1:12345> so that when the game tries to load it, it loads KUID<123456:789> instead?

Can you see where I'm going here? A way to load a new asset using the old asset as a pointer so that it effectively replaces the older content without breaking the routes/scenarios that the older content was used in, without requiring me to edit each and every instance of the older content's use.

I know about the alias tag, but I'm not sure if it can do this (and if it can, how exactly to implement it)
 
To the best of my knowledge there's no way without hex hacking, and anyone who tells you changing something in the KUID table will change what's in the game is merely repeating an old myth without actually checking it. The info that the game actually uses for what trains are where is in the profile.dat, not the config.txt. You could hack the profile.dat in a hex editor, but it's easier to just open the session in surveyor, replace whatever you want to replace, and edit the driver setup to change who drives what. Post #6 in this thread;

http://www.trainsim.com/vbts/showthread.php?306297-Beginners-guide-to-Trainz

Is a step-by-step for replacing the player engine.
 
These will work Snipe, tried and tested!!

One Way: Clone the new loco and call it <kuid2:-1:12345:2> and it will automatically replace the old unit.

Another Way: put an obsolete table in the new loco's config. the exact formatting escapes me but it is something like

obsolete table
{
0 <kuid:-1:12345>
}

Somebody who understands that gibberish will doubtless post it properly in the very next post, and an annoying niggle suggests that this method might itself be obsoleted by the 'kuid2' system in later versions...

The point is though that one or other - maybe both - work :)

Andy
 
Last edited:
What would also work, if the guy used a C&NW F7 for the player loco, you could edit the F7 and copy the mesh and textures from a UP Dash 9 into the F7 folder, edit the config to use the Dash 9 mesh instead, then change the KUIDs for engine spec and sounds, then every session that F7 was used in you would have the UP Dash 9 instead! :wave:

Looking for a SIMPLER way here, I think changing it in surveyor would be simpler.
 
@ Sniper - I agree that changing the loco in a session would be easier in most instances, I'm assuming the OP was chasing a solution to changing a loco he has used in a lot of sessions, particularly if it is the lead loco - moving a lot of drivers to a lot of new locos in a lot of sessions would be a major pita!

@ Peter - That's a point, but it was more the methodology I meant than the kuid specifics. I didn't pick the 'supposed' kuid :)

Andy :)
 
Yeah, I understand the underlying problem, if the same loco is used in 17 different locations in each of 50 different sessions on 50 different routes that would get rather tedious. But 2 or 3 instances in half a dozen sessions it would be less work to edit each session.
 
It's my understanding that "aliasing" was discontinued in 12, so it stands to reason that the above suggestions are your only options, if you are using 12.
 
Yeah, that's an iron horse of a different color - the idea behind aliasing was to have one "template" mesh, then make the paintshed skins with only textures and no mesh, aliasing the template mesh. Anyone who knows anything about programming will see the obvious flaw in that, game loads the paintshed skin, consults the config file, and instead of finding a reference to a mesh within the loco it has loaded it sees that it needs to hunt up the template, load that into memory, then assemble the mesh from the template and the skin from the paintshed loco to display the loco.
Can you say "performance penalty", boys and girls? Sure, I knew you could. :hehe:
 
That's easy - just give another loco the missing loco's kuid.

Say you need Fred's UP SD40-2, but Fred's website has been gone for years and there is no way of getting the loco.

You do have Bill's new UP SD40-2 which is probably a better loco anyway.

Open Bills loco for edit, drag the whole loco folder to the desktop, edit the loco's kuid to be the ID of the missing loco and drag the desktop folder back into CM. You now have a UP SD40-2 that the game THINKS is the 'missing' loco and you are all good. Just don't ever use that loco in a session you distribute, because it will give you nothing but grief helping other people sort it out!

EDIT: 'Fred' and 'Bill' are imaginary characters. No link should be imagined between these imaginary content creators and any actual content creator either living or dead :)
 
Last edited:
Back
Top