KIND Region

From TrainzOnline
Revision as of 10:48, 2 April 2021 by Pware (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Contents

KIND Region

KIND Region provides a set of values that are characteristic of the region that a route is modelling. These values are the location of the region, the vehicles that travel on the roads and whether they travel on the left or the right, the default junction switches and the color of the water.

A region asset is selected for a route when the route is created. It can be changed in Surveyor when the route is edited. A region does not necessarily correspond to a particular physical or political area - it can be defined as required to reflect the settings that should apply to the route.

KIND Hierarchy

Parent Classes

  • none.

Child Classes

  • 'KUID defined assets for vehicle traffic particular to the region and for the default junction switch.

Supported Tags

The KIND Region config.txt file supports the following tags (in addition to the tags that are available to all assets). Each tag is shown here with its default value.

watercolor      0,0,0
defaultjunction <nullkuid> 
ontheright      0
longitude       153.0,2.0,1.0
latitude        27.0,28.0,-1.0
altitude        0
car0            <nullkuid>
  ...
car15           <nullkuid>

kind

Type: String "region"
Compulsory: Yes from 3.4
Default: n/a
Desc: Identifies the asset as Kind Region.

watercolor

Type: Integer list
Compulsory: Yes from 3.4
Default: 0,0,0
Desc: RGB vaues for the color of the water placed in the routes that use this region. This color will be adjusted by the color settings for the route, including time-of-day adjustments.

defaultjunction

Type: Kuid
Compulsory: Yes from 3.4
Default: <nullkuid>
Desc: The KUID of a junction switch lever. This lever will be automatically placed on the route when a junction is created, if the user has selected to auto-add junction switch levers.

ontheright

Type: Boolean
Compulsory: Yes
Default: 0
Desc: If True (1) then vehicles will travel on the right-hand side of the road. If false (0) then vehicles will drive on the left-hand side.

longitude

Type: Float list
Compulsory: Yes from 3.4
Default: 153.0,2.0,1.0
Desc: Three floating-point values specifying the longitude of the region in degrees, minutes and E/W. Longitude East of Greenwich is indicated by the third value of +1, while longitude West of Greenwich is indicated by a value of -1.

latitude

Type: Float list
Compulsory: Yes from 3.4
Default: 27.0,28.0,-1.0
Desc: Three floating-point values specifying the latitude of the region in degrees, minutes and N/S. Latitude North of the Equator is indicated by the third value of +1, while latitude South of the Equator is indicated by a value of -1. Latitude is used as part of the seasonal calculations and in relation to the angle of the sun.

altitude

Type: Float
Compulsory: Yes from 3.4
Default: 0.0
Desc: Height of the region in metres. Height is used in some seasonal calculations.

car0

Type: kuid
Compulsory: No. The car will not exist if the tag is not present.
Default: n/a
Desc: KUID of a car that will travel on any roads in the region that are traffic-enabled. Note that this KUID must refer to an asset that is correctly indicated as a car used for roads: kind 'scenery', category-class 'VL' and trackside 0.01 (the value for this can vary if necessary).

Tags 'car1' through 'car14' can be used for an additional 14 cars. The maximum available for a region is 15 cars. They should be used in sequence from car0 to car14.

See the following two guides for making car asset for use with regions.

HowTo/Build_a_Car_for_Traffic_(stand-alone_version)

HowTo/Build_a_Car_for_Traffic_(mesh_library_version)

Example Config.txt

kuid                                    <kuid:xxxxxxx:yyyyyyy>
username                                "Name for the region"
kind                                    "region"
trainz-build                            3.5
watercolor                              70,135,140
defaultjunction                         <kuid:-1:100553>
ontheright                              1
longitude                               15,13,+1
latitude                                54,30,+1
altitude                                0
car0                                    <kuid:447264:1132>
car1                                    <kuid:447264:1133>
car2                                    <kuid:447264:1134>
category-class                          "YX"
category-era                            "1960s;1970s;1980s;1990s;2000s;2010s"
category-region                         "00"
description                             "Description for the region"
license                                 "Licence terms and conditions for the asset"
thumbnails
{
 0
 {
   image                               "thumbnail.jpg"
   width                               240
   height                              180
 }
}
kuid-table
{
 0                                    <kuid:-1:100553>
 1                                    <kuid:447264:1132>
 2                                    <kuid:447264:1133>
 3                                    <kuid:447264:1134>
}

Creating a Region

Trainz - Content Creation - #30 - Region Assets: Video

The simplest way to create a new region is to clone an existing one and make any required changes.

The files for a region are the config.txt text file and the thumbnail image file. It is therefore particularly easy to create a region from scratch.

The thumbnail can be created in any image editng program. It should be 240 pixels wide and 180 pixels high, in JPG format.

The config.txt file can be created in any text editor, using the above example as a template. Make the changes as required. Put the config.txt file and the thumbnail image file into a folder. Open Content Manager and use File \ Import Content (for versions prior to T:ANE) or File \ Import Content Folder (for T:ANE versions), navigate to the folder where the files were placed, and import it.

To test the region, create a new route and select your region as the region for the route, or select an existing route, open it in Surveyor, choose Edit Route from the main menu and select your region from the region list.

Categories

Personal tools