View Full Version : meaning of 'KUID'

March 10th, 2012, 12:56 AM
Hi guys, pse explain to me what the word 'KUID' means and what we should know about it .

March 10th, 2012, 01:23 AM
From memory it meant "koolthings user identification". Dorky or what?

What should you know about it?

Well, the original kuid format identified the creator of the asset and a unique sequence number for that asset. Hence kuid:56789:20000 means the creator was 56789 and the asset was numbered 20000.

There's also the more modern kuid2 format, which looks like kuid2:56789:20000:1

In this case it's the same creator, same asset, but it also tells you the version number of the asset (that's the :1 at the end). The version number can be 0-127. The kuid2 system allows creators to retain the same base number for an asset and increment the versions as they correct mistakes or make improvements over subsquent releases.

Both the original kuid system and the later kuid2 systems are still valid.

kuid:56789:20000 was supposed to be equivalent to kuid2:56789:20000:0 but there's an unfixed bug in the DLS system that changes the :0 and bumps it up to :127, meaning that the creator cannot issue any further versions beyond that one and still keep using the :20000 number for that asset.

Some creators (myself guilty as charged) make their first asset version a :1, as for example kuid2:56789:20000:1, which leaves the stupid Content Manager thinking there must be an earlier version called kuid:56789:20000 out there, when often there isn't one. It marks this fictitious version with a "?" in its lists.

March 10th, 2012, 03:15 AM
Thanks Dinorius. To ride the trains is easy, but to learn the lingo is work for me.

March 10th, 2012, 08:47 AM
As I recall the "U" stands for Unique.

March 10th, 2012, 09:14 AM
Check this out:


(It's the N3V Games Wiki page that explains KUIDs)

March 10th, 2012, 09:44 AM
Mr R,

Although I asked this question in another forum (Parts & Labour) perhaps you would be kind enough to offer enlightenment in this thread, should you have it about you? :-)

When the CMP shows local assets as "obsolete" this seems to mean that a newer version has been downloaded (eg a version with :2 on the end of the KUID makes the :1 version obsolete)....?

Once a local asset is shown as obsolete, is it safe to delete it from the local Trainz database? If I query the obsolete asset to see if anything still uses it, it will list the various routes/sessions or whatever that do so. However, looking at those routes, sessions and whatevers seems to show that in fact it is the latest, not the obsolete, version of the asset that is actually being used.

If it is safe to delete obsolete assets from the local Trainz database, is there any advantage or drawback in doing so? Presumably routes, sessions et al will continue to work using the newest (not-obsolete) version of the asset? Does clearing away the obsolete versions help to tidy the database and improve load-times to any significant degree?

I have 1800+ obsolete assets in my Trainz database just now.

Thanks for any light you can shine on these rather arcane workings of the CMP.


March 10th, 2012, 09:49 AM
Hi Lataxe,

In relation to obsolete items, other assets will normally use the latest version of an asset.

Be aware though, that deleting obsolete items may cause some assets to 'appear' to have missing dependencies. This is due to the way Content Manager handles dependencies.

Also, certain assets (pguy's commands being an example) will have unexpected effects if deleting an obsolete version, such as having to re-insert the command in Surveyor or Driver.


March 10th, 2012, 10:41 AM

This sounds like a 0-inclusive bug or null bug in their number counting, meaning 0-127 means a possible 128 total versions of the asset. This doesn't work however with 0 meaning null, and not the first available version of an asset.

I too wondered why there were some ? assets, but could never find them.

Thanks for posting this little detail. ;)


March 11th, 2012, 05:58 AM

Thanks once more for your help. You are a very useful chap! :-)

I'll delete an obsolete item or two then have a look to see what effects, if any, occur in the assets that use the kuid concerned. Hopefully I will find no real problems and can then more confidently delete the 1800+ obsoletes that are currently lodged in my Trainz database.

Will it make any difference to performance, I wonder?


March 11th, 2012, 06:10 AM
It should do but do keep an eye out for any side effects in game.


March 11th, 2012, 06:44 AM
The kuid is like a barcode at a grocery store. It's basically a number that refers to one item in particular.

March 11th, 2012, 09:13 AM
Snip...This sounds like a 0-inclusive bug or null bug in their number counting, meaning 0-127 means a possible 128 total versions of the asset. This doesn't work however with 0 meaning null, and not the first available version of an asset.

It may be something to do with the way kuid's are stored in the config.chump files (as well as .cdp's and archives).

The whole kuid is stored as two 32 bit integers.

The first one is the user ID along with the 7 most significant bits being the update number. So the user ID is a 25 bit signed integer..remember that N3V uses negative values for most of their user ID's. If I remember correctly, if the 7 byte update number is greater than zero, then we have a KUID2, whose update value is already defined. If the 7 byte number is zero we have a kuid:xxxxx:yyyy.

The second 32 bit integer is the asset number given by the content creator.

Also I believe, in the very beginning of Trainz, the in-house content creators stored their new creations in a server folder named "Koolthings" and these creations needed to be numbered so the Koolthings Unique IDentification number was born.. Initially it was a single 32 bit integer, but that changed very quickly to the format used now.