A KUID is a unique identifier that is assigned to an asset when it is created. This feature was introduced with Trainz 1.3 in order to facilitate cataloging of assets. There are two versions: KUID and KUID2. Pre-TRS2006 versions of Trainz require assets to be created manually and therefore KUIDs must be assigned manually. In TRS2006 and later CMP automatically assigns a KUID when you click 'new asset' or 'clone asset'.
A KUID in the original format is as follows:
<KUID:123456:123456>. The first numeric element of the KUID is the User ID of the author. A user's User ID can be accessed through their Planet Auran profile. A user is assigned a User ID when he or she registers with Planet Auran, and the User IDs are assigned in increasing numerical order. Most of them have either 5 or 6 digits, but some early ones can have 4 digits or less. The second numeric element of the KUID is a unique number set by the author and can be any number of digits. If creating or cloning an asset with CMP, CMP assigns numbers in the
1xxxxx range by default. For example, the first piece of content you create will be
<KUID:123456:100001> and so-on. With KUIDs, if an author had uploaded an asset to the DLS with
<KUID:123456:100001> and they wished to update it, they would need to assign a new KUID to the updated asset i.e.
<KUID:123456:100002>. To replace asset number
100001 on the DLS, the obsolete asset's KUID must be recorded in the
obsolete-table section of the config file of the new asset. (discussed elsewhere). This can get confusing so the KUID2 was devised a solution to this problem.
A KUID2 has a slightly different format to the KUID, as follows:
<KUID2:123456:123456:1>. As before, the first two numeric elements are the author's User ID and unique identifier for the asset. The third number is the asset's version number. An asset can now be updated simply by incrementing the version number. The clever thing about KUID2s is that they can also apply to assets with KUIDs. For example if we take our asset
<KUID:123456:100001> and want to update to a KUID2, it is simply a matter of altering the KUID of the updated asset to read
<KUID2:123456:100001:1> and the DLS will automatically flag the original asset as out of date. CMP will direct all users who downloaded the KUID version of the asset to update it to the KUID2 version.