Friday, August 23, 2013

Auto Running Numbers

Part 2


I use NumberIt by Dave Renshaw (Eldavo's Railway Emporium) witch uses the built-in numbering that has always been in Trainz. Two things that it will not do are increase the number of digits and work with something that uses a draw-bar. So you can not have running numbers from 1 to 20 but only 1 to 9 or 10 to 20. The draw-bar is if you have the same running number on a steam engine and tender NumberIt will give the tender a deferent number, same with anything that uses the same KUID two or more times.

I will use one of my cars to show how to set it up, CP boxcar KUID:58422:100333 witch is on the DLS and has a basic set up with all the textures you need.

First thing to start with is a car that is done to the point that you can run it in Trainz and it has all the UV mapping and textures done. This should have a running number with the right number of digits, font, size, and color.

Next I copy over "numberit.gs" to the root folder, this is what makes it work. Copy over the file folder named "car_alpha_numbers" also to the root folder, this is were the numbers 0-9 are. In the folder named "40ft_boxcar_body" copy the 6 textures over named digit_1.tga to digit_6.tga and the 6 .texture.txts named digit_1.texture.txt to digit_6.texture.txt. The names can not be changed.

I normally do the config.txt next, so the following are what I copy and then edit into the config.txt.

script                                  "numberit"
class                                   "xnumberit"
fonts                                   1
fonts-path                              "car"
use-coupler-sounds                      1

The first two line call the script, do not edit until you know how every thing works!

Line 3 is the number of font sets are used, here just 1. If you need two sizes, fonts, or color you have to make a full set of 10 new textures in the "car_alpha_numbers" folder and use the right names.

Line 4 is were the fonts are the path only needs the name before the "_alpha_numbers".

Line 5 has nothing to do with this but is not well known, it adds coupler sounds.

extensions
{
  reportingmark-32711                   "C.P."
  carnumber-32711                       "x"
 
  numberit-75134
  {
    numberit_prefix                     "251"
    numberit_min                        "000"
    numberit_max                        "999"
  }
}


The top part is for CMTM not numberit.
numberit-75134  do not edit.

numberit_prefix   "251"  the "251" can be edited to what you need, this is the first 3 digits and do not change. More in next part.

numberit_min   "000"  can be edited, is the lowest number of the last 3 digits.
numberit_max  "999" can be edited, is the highest number of the last 3 digits.

The above give running number from 251000 to 251999.

kuid-table
{
  numberit_library                      <kuid2:75134:99003:7>


this is what should be in the top of the kuid-table, note you do not need a number for a library.

More on this next post.





No comments:

Post a Comment