World of Trainz Home Page Shop at World of Trainz Downloads Upcoming Projects Tutorials Forum About Links  
 
 

3D Studio Max Locomotive Tutorial

Chapter 12 Setting up the Config.txt file

In this tutorial you will learn how to create a working Config.txt file for the locomotive.

For editing the text files I use a program called Edit Pad. You can use Notepad or any other text editor.

1. Config entries

In the following table the required entries for the locomotive and a brief description are shown. There are many more possibilities for TRS2004 than what is shown here.

Create a new text document from within your selected text editor and enter the following information.

Config.txt entry Description
kuid <KUID2:86105:15000:0> This is the kuid number. Replace the "86105" with your user number and replace the15000 with a suitable number for your item. The recommended range for a locomotive is 1-9999. Although the kuid range is no longer a requirement I still prefer to keep my numbers within these ranges. The last number represents the version number for the item.
name Loco Tutorial This is the name that will show up in Driver. Give the locomotive a meaningful title but keep it short as possible. This should be kept the same as the "Username"
company Santa Fe This is a company name for the item.
origin USA The original country the locomotive was used or created in.
bogey <KUID:-1:100141> This is the kuid number of the bogey file that will be used on the locomotive. I have used one of the default bogey numbers you can change the number to the bogey you want to use.

bogey-1-r <KUID:-1:100141>

This line is only needed if you have more than one type of bogey or if you rotated the attachment point. The -r means that the animation is reversed.
kuid-table {
0 <KUID:-1:100141>
}
This tells the download station what items are required for the locomotive to work. It can also be used for mesh replacement, texture replacement etc
engine 1 This tells Trainz that the item is a locomotive and not a rolling stock item.
mass 50000 This is the mass of the locomotive in kgs
kind traincar This tells Trainz that the kind is a Traincar and not a scenery or track item.
category-class AL This will allow the content to be sorted by the category class. AL is a Diesel and Diesel Electric locomotive.
category-region-0 US This is the region the locomotive was used in. If there is more than one country required then you can add category-region-1 on the next line.
category-era-0 2000 This is the years that the item is used in. As with the region category you can have more than one.
enginespec <KUID:-1:42004231> This is the engine spec file. This file is included with Trainz and it is the engine spec file for a GP38-2
enginesound <KUID:-1:42003000> This is the engines sound file kuid. This is a required entry and in this case references a default engine sound
hornsound <KUID:-1:42003101> This is the horn sound file kuid. This is a required entry and in this case references a default horn sound
interior <KUID:-1:101475> This is the interior kuid. This is a required entry and in this case references a default interior
fonts 0 This tells Trainz that there are no running numbers associated with this locomotive.

running-numbers{
}

This tells Trainz what the selected running numbers are. This setting is overridden in surveyor.
description "Tutorial on how to create a sample Locomotive" This is a description about the locomotive. It can be brief or very detailed.
asset-filename Tutorial This is the folder that the meshes and the textures are contained in.(See previous chapter)
username Loco Tutorial This should be the same as the "Name" category.

mesh-table
{
default
{
mesh Tutorial_body/Tutorial_body.im
auto-create 1
}
shadow
{
mesh Tutorial_shadow/Tutorial_shadow.im
}
}

This is the mesh table. In this table you can reference items such as animation and other attachments. Animated items can also be controlled via the use of a script.

This is also where you add coronas and set up the night mode mesh etc.

smoke_shade 0.3
smoke_random 2.5
smoke_slowlife 6
smoke_fastlife 0.8
smoke_height 1.7
smoke_fastspeed 1.6
This is the settings for the smoke attachment. This method of attaching smoke is no longer recommended and the new system is to use the "Twinkles" program to create the effects and attach them in the same way that a mesh object is attached.
obsolete-table {
}
This setting is for previous versions that you want to obsolete.
trainz-build 2.0 This tells the download station which version of Trainz the item is for.

Once you have the text entered save the file to the root directory of the locomotive. In this case the folder is called Tutorial and name the file config.txt

NOTE Do not copy and paste from this tutorial. If you are having trouble with the loco not showing up then you can download a working config.txt file here.

 

2. Viewing in Trainz

Once you have the config created and saved then it is time to see if our locomotive will show up in Trainz. Start Trainz up and go to surveyor. The loco should be listed as Loco Tutorial. Add the loco to a suitable track location and switch to driver. You should have a result similar to the following.

 

Figure 1 Final result as viewed from within TRS2004

 

3. Final Note

Although we have a working loco it is by no means accurately built to any drawing and there are many items that are not built as they would be on a real locomotive. Items such as the height of the cab and main body, fuel tank height, overall dimensions etc. are not built to any dimensions and are more than likely incorrect.

 

Back to chapter titles

 

HOME

| DOWNLOADS | UPCOMING PROJECTS | FEEDBACK | TUTORIALS | 3DS, GMAX TIPS | ABOUT | FORUM | SOFTWARE | LINKS

Copyright © 2004 P. Campbell. All rights reserved.

Revised: September 23, 2004
Site questions? webmaster