Last modified on 24 February 2015, at 00:47

Trainz/KUIDs

logo
Fundamentals for Trainz Trainees

Trainz Asset Maintenance and Creation
Trainz | Introductory Trainz  | Trainz AM&C | Creation | Appendixes  |  References  • Containers • Kinds • Tags • Index • Vers
 Glossary
 HKeys-CM
 HKeys-DVR
 HKeys-SUR
 HKeys-WIN
 Mouse use
 Notations
editor screenshot
Using Programmer's Notepad's multiple-TAB panes in Windows to juggle data Managing Trainz assets.
 • Big blocks of comma-separated kuids are extremely useful in setting up SPEED for customized route building–the less assets Surveyor need consult speeds up all the Hotkeys and the building or decorating processes.
 • Such lists also have their place between versions in Content Manager as well as in this example--a list like the top part of the page (showing missing assets could be transformed into a CSL block like the page bottom list, suitable for use in a search in another install of Trainz (To see if all the dependencies or desired assets are available before entering a GUI to drive or route build, for example).

KUIDEdit

Auguste Rodin - Grubleren 2005-03.jpg
Points to ponder

An assortment of asset names and KUIDs as Copy All might give you in CM:
Highland Valley SD38 No23, <kuid:62941:123>
Sub Station, <kuid:58973:27012>
GW Malt Sec5, <kuid2:97212:5200:1>
ken, <kuid:119692:840>
mack-truck, <kuid2:50567:15770:1>
fred2, <kuid:50567:15717>
Erie covered hopper Mfx2, <kuid:58422:1067>
Tanker MBLX (FUEL), <kuid2:64038:151024:1>
Tanker UTLX 950423(LARS), <kuid2:113556:61005:1>
Tanker ExxonMobil (FUEL), <kuid2:64038:151023:1>


FYI, a Fred is the Red Light emitting instrument package now used on the end of consist where there used to be the caboose.

A KUID is a unique identifier that is assigned to an asset when it is created. The TRS2006 manual refers to them as a mnemonic derived of "Kool Things Unique Identifier Data, and Trainz relies on them to keep things straight and put together the right combinations of sub-assets to present the 3D virtual world.

This feature was introduced with the original Trainz 0.9 Beta prototype to organize asset component files into separate folders and in order to facilitate cataloging of assets as the earliest version of what became the Download Station (Online free library) of assets was in need of a built-in data structure to track differences between several similar assets, and also a reliable means of using the correct specified asset—for all too many names could overwrite one another if only asset-names were used as folder names in the primitive organization of HDD data of that era.

There was also a need for some method users could use to identify between versions of assets— tell the trials that worked from the one's that didn't.

Further there was a desire to identify their originating author, and thus who owned their copyrights under international law, so that Auran could safeguard their ownership. 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>.
  1. 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 RANDOM numerical order. Most of them have either 5 or 6 digits, but some early ones can have 4 digits or less.
  1. The second numeric element of the KUID is a unique number set by the author and can be any number of digits, NORMALLY six or so, and often coded so the first couple of digits indicate a class or type of created digital asset (e.g. 10 meaning traincar [rolling stock] and so prefix of 101 as flatcar, 102 as 40' boxcar, 103 as refer, etcetera and so forth. Some CCs extend the type-branding to parts such as bogeys, or may have a group for such parts types.
  2. If creating or cloning an asset with CM/CMP, CMP assigns incremental numbers for each user install in the 1xxx range (start) by default. For example, the first piece of content you create will be likely be a change to a built-in standard route or session, so if your user identifier is '123456' the kuid would likely be created <KUID:123456:1001> and so-on.
  3. TrainzUtil can be used to alter the next generated kuid start value, and CM will then generate the next empty number above that value when making an allocation for the new asset kuid code.Tip: In the given case, since routes always have a default session, a route modification would generate two successive kuids ending 1001 and 1002.

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.

KUID2Edit

A KUID2 has a slightly different format to the KUID
<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 which can go as high as '127'. The Kuid2 is actually zero based, so <KUID2:123456:123456:0> is the same as <KUID:123456:123456>—though N3V'S programmers' are inconsistent as to when the equivalency is acknowledged and so effective.

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 ('Obsolete' in the terminology of the CM search pane; CM communicates with the DLS and tracks whether an updated asset is available). Locally, each user's CM/CMP install will detect such updates and so notifies all users who have the obsolete KUID version of the asset there is an updated version available. Since TS2009 CM displays this visually as well, using a symbol to update it to the KUID2 version.