HowTo/General information for Configuration Files

From TrainzOnline
< HowTo
Revision as of 19:48, 6 February 2022 by Glt0145 (Talk | contribs)

Jump to: navigation, search

General information on Configuration Files

A configuration file has to be created for each asset you create. It is a plain text file. It is always called "config.txt" and is placed in the same directory as the other files for the asset. Because it is plain text it must NOT be created using a word processor. Use an application like Notepad or Notepad++. There is also a application called AssetX which can assist in the creation of the configuration file.

The config file contains the instructions on how Trainz uses the asset. Without a valid config file your asset will not be shown within Trainz

Each line in the config file starts with "tag" associated with that tag is a piece of information pertaining to the tag. Some tags are header tags and will followed by a curly brackets so as all the information within the set of curly brackets pertains to that tag. See the example below where all the information within the outer curly brackets pertains to the "mesh-table" tag.

A simple tag might be "kind" and its information would be "scenery". So the line in the config would read

kind "scenery"

Any piece of information that is a string has to be surrounded by ""


The config file may contain several containers to associate parts of the text with certain information pertaining to the container heading. An example of the is show below

mesh-table {

 default
 {
   mesh                                "amesh.im"
   auto-create                         1
 }

}

Each container start with a curly bracket and close with a curly bracket. So in this example there is an inner container called "default" which contains two instructions and the outer one is called "mesh-table"

There are certain mandatory lines that must be in every config file. These include :-

  • kuid
  • kind
  • username
  • trainz-build
  • mesh-table
  • thumbnails
  • kuid-table

There are also many that are required for different types of assists and many that are optional.

The following is a list of obsolete tags and what has replaced them.

For all config files :-

thumbnail -> replace by "thumbnails"

For Scenery config file.

region -> replaced by "category-region"

For Bogey config file.

anim anim.kin - > Not needed

animation-loop-speed 1.0 - > Not needed

Personal tools