Trainz/Kinds/kind map

KIND Map is the trainz kind (Base data type) used for organizing and storing a Map. The Maps data types are created in surveyor and stored under the \UserData\local subfolder of the Trainz install (All versions after TS2009-SP2; TRS06-era versions used a \local folder, while earlier releases a \Custom\map folder in the '\World' root), so for the most part, until the tag-name assassinations in TS09 & TS10; hand-editing of a map config files should not be required. In the latter cases, error checking in all versions post-TS2009 prohibit once common practices and require definitive re-definitions or deletions.

KIND Hierarchy

edit
  • KIND TrainzBaseSpec is considered a Parent Class of all data types because the attributes it defines by the value assigned its tags. In a route or layout, the kind tag is defined as "map", the category-class tag is defined automatically, as the only way a map can be created is using Surveyor. Maps start off as a new board and at that moment the user is presented a succession of decisions to make about the new map, such as units, scale, grid choices, names, and other factors.

Short of considering Content Manager a container, or speaking of the data base, the Map data type (and it's folder) is the highest organized data type in the software system data hierarchy. It holds the kuid-table and string-table tables defining the virtual world the player will interact with and links to all other assets applicable to a routes attributes in its kuid-table, files to define where things are, what they are named, and their relationship enabling navigation in Surveyor, as well as specifying most of the 'world co-ordinate' data needed in the Driver Module.


Child Classes

edit
  • In the N3V TrainzWiki, the programmers wrote: "All non-map assets might be referenced in a map asset." This is almost true, but for assets particular solely to kind profile such as HTML assets, Rules and Driver Commands.
  • The sort of data one finds in the map file is however lengthy because of two factors,
  1. The map config holds the kuid-table which lists the dependencies of a map. This is where a user might go to reduce the revision level

Map Asset Files

edit

The heavy lifting in a map asset is not carried by a config and files defining a single asset, but in the specialty file types which integrate, cross-reference, and organize the virtual world in a portable record. These have changed over the progression of Trainz versions to accommodate new capabilities, most notably to include separate layers that can be independently altered when construction the route. This allows elements (e.g. Trees, roads, commercial buildings, housing) to be separately worked, and if necessary, turned-off and temporarily disappeared or locked so they aren't disturbed by working another part of the map's detailing (refined modeling, fine manipulations and decorating) nearby, or that being a tree or shrubs, is likely in the way and/or blocking a view necessary to do other fine modeling.

.map file
The map file holds the trainz-board's (foundation) geometry, texturing and other physical factors.
.trk file
With half-a-wit, you probably already guess kind Track assets get indexed and positioned by the data within. Spline objects of all sorts are classed as Track members based on the exact mix of boolean tags defined in their config. They live herein in happy virtual co-habitation.


Kind Map Tags

edit

Each map asset supports defining values of the following tags. Each tag is shown here with its default value. Surveyor will attempt to fill in each based on the information and selections made when initializing a new map board, the first trainz-board in the map.

carrate         55                 Seconds, maximal delay
holdcarz        1                  Boolean, O enables Carz Traffic to be generated
info-page       "filename.htm"     HTML asset, predominantly useful in TRS2006 era
region          <NULLKUID>         Old maps on the DLS will not have a kuid here, but a principality (e.g. Britain)
workingscale    0                  See table below, enables maps from scales found in Model Railroading to real scales
workingunits    0                  Boolean, O 
water           <KUID:-1:8009>     Kuid that (like region above) selects one of only a few fundamental types.
car0            <NULLKUID>         A newer capability, enables additional (custom) cars be generated on a map.
car1            <NULLKUID>         
...
carNN           <NULLKUID>         The last car being added to the additional carz for this map.
soundscript container       Map's ambient noise, if any.
{
}
world-origin container               World
{
}
autosave      0

carrate

edit
Type: Number
Desc: Controls the frequency road traffic appears at on the roads. The number is an upper cap on the varying time delay between the production of one carz on a road and the next. There is a similar tag that can be used in a road asset that generates the same delay and interval instead, but only for that particular asset on a map. The two mix.


holdcarz

edit
Type: Boolean
Desc: True if road traffic should be disabled.


info-page

edit
Type: Filename
Desc:
Original use: File reference to (usually) an HTML file (so called 'Tech Manuals') describing use of an asset, or in the case of a complex session or route, providing details in the form of text explanations, lists, tables, schedules and many many maps.
Today:
a) In the vision of N3V game software engineers, obsolescent, so should be "No longer used."
b) In practice, some game asset developers are linking pages here on the TrainzOnline Wiki to serve as the tech manual for assets, a highly important need in complex routes.


region

edit
Type: KUID
Desc: KUID of Region asset that this map is set in.


workingscale

edit
Type: Number
Desc: Index of the option picked for the world 'scale' in surveyor.
0  - 1:1    (Real Scale)
1  - 1:22.5 (G Scale)
2  - 1:24   (Half Inch scale)
3  - 1:32   (1 scale)
4  - 1:48   (0 scale)
5  - 1:64.5 (S scale)
6  - 1:76.2 (00 scale)
7  - 1:87.1 (HO scale)
8  - 1:120  (TT scale)
9  - 1:160  (N scale)
10 - 1:220  (Z scale)


workingunits

edit
Type: Boolean Number
Desc
0 for metric (speed in km/h, distances in metres),
1 for imperial (speed in mph, distances in feet).


water

edit
Type: KUID
Desc: KUID of water asset that this map uses.


soundscript

edit
Type: Container
Desc: SoundScript Container container to specify ambient sound in this map.


Type: Container
Desc: World origin container provides offset altitude, and the latitude, longitude and hemisphere data for the map.

car0

edit
Type: KUID
Desc
KUID of car to add to the pool of available road traffic provided by the region.

This is a sequence - increment the number to add more cars.


autosave

edit
Type: boolean
Desc: True if this map was generated by the surveyor auto-save process.


Categories

edit