KUID Number Overview:
We've included the following 27th February 2002 posting by Greg Lane,
on the Trainz Forum, here, to provide a quick reference.
The posting, and subsequent comments, can be found
HERE.
(Link last checked on 12/3/2003)
"As many of you will know we have recently introduced our KUID numbering system
to Planet Auran and to the Download Station for Trainz. This post is to explain
a little more about what KUID's are and how they are used.
Each and every object in Trainz, be it a Locomotive, an item of rolling stock,
a tree, a building and even a piece of track has what is called a KUID. A KUID
is a unique number that is assigned to an object. KUID stands for
Koolthingz Unique IDentifier. It is used by Trainz as a means of identifying
each and every object and what their relationship is to each other. A KUID is
actually composed of two numbers separated by a colon and looks like this # : # .
The first part of the number (The one in front of the colon) is used to identify
the object's creator. In the case of Auran this number is 0. In the case of
3rd party content creators who have requested a particular number from Auran the
number will be greater than 0 and less than 30000. Also every member of Planet Auran
who has not requested a number is automatically assigned one. The numbers that are
automatically assigned begin at 30000 and increment by one for each new person who
joins Planet Auran. You can view what your number is if you're a member of
Planet Auran by looking at your profile under the 'Your Content' sub heading.
The second part of the KUID number is a number that is assigned by the contents
creator... you! So, for example, say that your own number is 70100 and you want
to create a tree and it's the tenth object you've made. Since you started numbering
at one (You don't have to, it's just for this example) the KUID for your latest
creation is 70100:10.
Now that I've explained a little about what a KUID is and what it's used for I want
to spend some time explaining the recommended way of using them. Since the exact
method of numbering is up to you it is possible for you to simply start from number
one and keep on going. However on some reflection (and I notice some 3rd party
developers have already started doing this) it's better to allocate ranges to the
various numbers you use. So, for example, you may decide that all of your textures
will be in the 21000 range and that all of your trees may be in the 22000 range and
so on. Our recommendations for these ranges are as follow (But I again stress there
is no need to follow this, it is just a guide):
Locomotives 1 to 9999 inclusive (We would suggest using the locomotives road number
if possible)
Passenger cars 10000-14999 inclusive
Freight cars 15000-19999 inclusive
Routes 20000-20999 inclusive
Textures 21000-21999 inclusive
Trees 22000-22999
Signposts 23000-23999 (Other than train signaling) inclusive
Signaling 24000-24999 inclusive
Buildings residential 25000-25999
Buildings commercial 26000-26999
Buildings industrial 27000-27999
Buildings railroad 28000-28999
Transportation land 29000-29999 (This includes only those objects that actually move)
Transportation sea 30000-30999 (Same as above)
Transportation air 31000-31999 (Same as above)
Bridges 32000-32999
Tunnels 33000-33999
Civil 34000-34999 (Power lines, antennas etc)
Reserved 35000-49999 (Do not use this range, it is reserved for future use)
Anything else 50000-99999 (Use at your discretion for objects that do not fit into
the other categories)
By using these ranges as a guide we hope to standardize the system of numbering
that people use in such a way so that it becomes relatively easy for other people
to find objects they are looking for.
At the moment (As of version 1.1.2) custom objects placed in the custom directory
use their file name as the basis of calculation for a KUID and any KUID specified
in the custom objects config file is ignored. However as from the very next service
pack KUID's will be used and specifying them will aid people in locating any
missing objects. When Trainz loads a route it tries to find all the objects it
needs and any that are not found are displayed. By reading this display a person
can go to the Download Station and search for the object (by its KUID) and then
download it.
The final step in using KUID's is the creation of an object using a KUID and the
subsequent uploading of it to the Download Station. To facilitate this we have
made some recent changes to the upload process that I'm about to detail. First off
though don't forget that all objects uploaded to the Download Station much be
packaged using the Custom Dispatcher program available
HERE.
(Link last checked on 12/3/2003)
When the Download Station was first operational and the KUID system was added it
allowed only one KUID to be allocated per upload pack. This however is not the
optimal situation as it may be quite common that you want to upload a pack that
features a number of objects and hence a number of KUID's. Therefore the system
has been recently upgraded to allow you to enter multiple KUID's per upload. The
system is quite simple and uses a comma delimited format for non-contiguous numbers
and/or a '-' for contiguous ranges. For example if I entered 10, 20, 40-42, 50, 60-63
into the KUID field I would be saying I was uploading KUID's 10,20,40,41,42,50,60,61,62 and 63.
As a guide we would suggest only including objects in packs where appropriate.
For example, try to group obvious objects together, like a group of trees, a pack
of cars or a layout with it's required custom objects. It is more preferable to
upload objects as a single KUID if possible.
The reason for us preferring single objects to packs is two fold. When someone
searches for a KUID and finds it in a pack they have to download the entire pack
to get it. If the pack is large and they only want one object from it this is not
the best way to go. Second, in the future Trainz will be able to talk to the
Download Station directly from within the application itself and if told to do so
it will automatically query the Download Station and download any missing objects.
Again, for the reasons mentioned above, it's best if Trainz only has to download
single objects and not packs of objects where many may be unused.
It's also possible that a particular object may exist in both a single object pack
and as part of a multiple object pack. In this case a search for the relevant KUID
will reveal both packs. However, in the future, if Trainz is asked to get objects
automatically it will place a preference on single object packs before multiple
object packs. Finally if a KUID exists multiple times as a single or multi pack
they will all be displayed in a Download Station search, sorted by date, and in
the case of Trainz it will select the latest date automatically.
The two cases where object grouping makes sense are in logical 'small' packs, like
a group of trees or signs and a route. In both these cases grouping multiple KUID's
in a pack is the best way to go.
Well that about covers it I think. There's a lot to take in here, so I'm quite
prepared for a barriage of questions!
Regards
Greg"
The "Download Station" can be found
HERE
(Link last checked on 12/3/2003)
"Members of Planet Auran" are those who own a copy of Trainz and have
registered at the Trainz Forum using the unique serial number that
came with their copy of Trainz." If you are already a member of Planet Auran,
you can find the KUID number that was assigned to you, by going to the Trainz Forum
and clicking on "Profile" in the upper left corner of the screen.
On the pop-up screen, click on the word "profile", to see your profile.
On that screen, click "Your Content".
The Trainz Forum can be found
HERE
(Link last checked on 12/3/2003)
|