Trainz/Kinds

From Wikibooks, open books for an open world
Jump to: navigation, search
logo
Fundamentals for Trainz Trainees

Trainz Annotated Reference Pages
Trainz | Introductory Trainz | Trainz AM&C | Creation | Appendixes |  References • Containers • Kinds • Tags • Index
 Glossary
 HKeys-CM
 HKeys-DVR
 HKeys-SUR
 HKeys-WIN
 Mouse use
 Notations

Kinds is a keyword denoting one of a set of enumerated basic data aggragate classes in the Trainz Asset definitions hierarchy, and is arguably tied with the category-class tag, TrainzBaseSpec and config.txt files as the most important data elements to get a handle on for either fixing or creating assets. Trainz Kinds are upper level containers defining minimal data structures for characterizing a asset type under a single identifying kuid.


Heirarchy and level[edit]

KINDs in the Trainz simulators define the attribute that together with category-class set up required fields of information to make the model of an asset render properly. In a very real sense, the KIND data structure (grouping related data of disparate type relevant to the needs of model rendering and run-time simulation) is a first level container in Trainz (albeit with a special name, "KIND"), and will almost always require other container level data groups accompany it in the ini files.

Now all container and container-like structures occupy the config.txt file, but the distinction is simply that container defined types usually have scope in several different KIND defined assets, whereas each KIND is unique to that class of asset. KIND Engines and KIND Traincar both have bogeys (wheels on trucks) so both have a bogeys container in their ini file. This list below is comprehensive as of page composition, and updated regularly. See Trainz-Wiki KIND TrainzBaseSpec for possible updates. (Many there and below are still redlinks in late May 2014)

Kinds of KINDs[edit]

Table I, TBS definitions[edit]

Tags are keys, and have a single assigned key-value or string-array Containers are collections of key and key-value pairs and upper-level containers (as opposed to sub-containers such as those within the thumbnails container) are generally suffixed by '-table'.

  kind     "'string-value'"
  trainz-build 'float', 1 digit decimal value
  kuid   <Kuid coded value>
  username tag     username "'string-value'"
  username-XX tag     username-XX "'string-value'"
  description     description "'string-value'"
  description-XX     description-XX "'string-value'"
  kuid-table

  {
  }

  (container)
  obsolete-table container (container)
    {
    }
 
  string-table container
    {
    }
  string-table (container)
 string-table-XX container
    {
    }
 string-table (container[s])
  category-region tags     category-region "'string-array'"
  category-class tags     category-class "'enumerated string-value'"
  category-era tags     category-era "'string-array'"
  category-keyword tag     category-keyword
  custom-category-list     "'string-array'"
  must-have-product-rights     "'string-value'"
  must-not-have-product-rights     "'string-value'"
  privileges container (container)
    {
    }
  privileges (container)
  thumbnails container (container)
    {
    }
 
  script     "'string-value'"
  class     "'string-value'"
  script-include-table
    {
    }
  (container)
  extensions container
    {
    }
 extensions (container)
  license tag   "'string-value'"
  author     "'string-value'"
  organisation     "'string-value'"
  contact-email     "'string-value'"
  contact-website     "'string-value'"
  member-of-groups container
    {
    }
  member-of-groups (container)


Important Everyday KINDs[edit]

The answer is dependent upon what sort of assets you are dealing with at the moment.

Scenery Kinds[edit]

These are generally simpler so to introduce the use of Kinds,

KIND KIND Engine