KIND Region

From TrainzOnline
(Difference between revisions)
Jump to: navigation, search
m (Added sort criterion)
(Rewrite.)
Line 1: Line 1:
 
{{ORP-top}}
 
{{ORP-top}}
 
==KIND Region==
 
==KIND Region==
A '''KIND Region''' is chosen in Surveyor when creating a new map (route); it cannot be changed later, so it must be created correctly the first go. This page is about creating a selectable region that can be used from inside Surveyor at later times.  
+
'''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==
 
==KIND Hierarchy==
===Parent Classes===
+
*[[TrainzBaseSpec]]
* [[KIND TrainzBaseSpec]]
+
{{UserTip |Region assets specify new selectable regions or sub-regions such as the built-in Australia or USA regions, but enable a customization not applicable to such large geopolitical areas. {{bullR}}The region can be used to customize a sub-region for typical conditions more typical of the area. The rainy Northeastern Seaboard of the USA is far different from West Texas and the American Southwest desert dominated terrains. {{bullR}}The region can define geographical location, era dependent data such as the types of  road traffic and weather conditions. {{bullR}}The region can customize the appearance to an era, simply by specifying more appropos vehicles of the 20s, 40s, or 90s.
+
  
}}
+
==Parent Classes==
===Child Classes===
+
* ''none.''
* '[[KUID]] defined assets' of vehicle traffic particular to the region.
+
 
 +
==Child Classes==
 +
* '[[KUID]] defined assets for vehicle traffic particular to the region and for the default junction switch.
  
 
==Supported Tags==
 
==Supported Tags==
{{sect-stub}}
+
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.
  
==Example Config.txt==
+
watercolor      0,0,0
{{sect-stub}}
+
defaultjunction <nullkuid>
==Needs Reformatting==
+
ontheright      0
 +
longitude      153.0,2.0,1.0
 +
latitude        27.0,28.0,-1.0
 +
altitude        0
 +
car0            <nullkuid>
 +
  ...
 +
car15          <nullkuid>
  
Creating a ''''region'''' asset is not difficult at all. Just your '''Notepad''' or similar application needed and we are on the go.
+
====kind====
 +
:Type:      String "region"
 +
:Compulsory: Yes from 3.4
 +
:Default:    n/a
 +
:Desc:      Identifies the asset as Kind Region.
  
1. First of all, let's remember what a ''''region'''' asset is intended for. The main aims of a region (when selected in Surveyor before starting a layout) are intended for:
+
====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.
  
* Setting the '''geographical location''' of your route
+
====defaultjunction====
* Setting the '''traffic vehicles''' appearing on the spline roads you lay on your route
+
: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.
  
This is achieved by associating your new (or existing route -but using after-editing methods since '''once created''' a region '''cannot be changed''' in Surveyor) to a particular ''''region'''' asset (either built-in in TRS or 3rd party).
+
====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.
  
When you are about to create and work on a new route in Surveyor, you are prompted via a '''dialogue window''' to select the region you wish it to be located in. The list of regions you have installed will appear on a '''drop-down selecting field'''. Initially, if you don't have any 3rd party installed on your TRS, '''you'll see just the built-in ones'''.
+
====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.
  
2. Let's make the asset. Nothing is as simple and easy in Trainz like that.
+
===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.
  
* Create a '''new folder''' anywhere on your OS.
+
===car0=== 
* Inside that folder, create a new '''.txt file''' which you are naming '''config.txt'''
+
:Type:      kuid
* Copy and paste this code taken from one of '''Alberte Zato''''s region assets. Do not worry, we are commenting a few tags later below, the meaningful ones.
+
: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' and category-class 'VL'.
 +
 +
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.
  
 +
==Example Config.txt==
  
 
+
kuid                                    <kuid:xxxxxxx:yyyyyyy>
  username                       "Modern European Region"
+
  username                               "Name for the region"
category-class                  "YX"
+
  kind                                   "region"
  kind                           "region"
+
  trainz-build                           3.5
  trainz-build                   2.4
+
  watercolor                             70,135,140
region                          "EU"
+
  defaultjunction                        <kuid:-1:100553>
  watercolor                     38,74,92
+
  ontheright                              1
  ontheright                      1
+
  longitude                               15,13,+1
  defaultjunction                100634
+
  latitude                               54,30,+1
  longitude                       77,1.2,-1
+
  altitude                               0
  latitude                       38,53.4,1
+
  car0                                   <kuid:447264:1132>
  altitude                       0
+
  car1                                   <kuid:447264:1133>
  car0                           <kuid:84912:29254>
+
  car2                                   <kuid:447264:1134>
  car1                           <kuid:92263:8033>
+
  category-class                          "YX"
  car2                           <kuid:92263:8304>
+
  category-era                           "1960s;1970s;1980s;1990s;2000s;2010s"
  car3                            <kuid:92263:8301>
+
  category-region                        "00"
  car4                           <kuid:117608:50404>
+
  description                            "Description for the region"
  car5                            <kuid:114172:29101>
+
  license                                "Licence terms and conditions for the asset"
  car6                            <kuid:110192:29022>
+
  thumbnails
  car7                            <kuid:82117:29064>
+
  {
  car8                            <kuid:110192:29038>
+
  0
  car9                            <kuid:192605:29012>
+
  {
car10                          <kuid2:88421:46000:1>
+
     image                               "thumbnail.jpg"
car11                          <kuid2:88421:1918:1>
+
    width                               240
car12                          <kuid2:88421:2004:1>
+
    height                             180
car13                          <kuid:92263:8014>
+
  }
car14                          <kuid2:35412:28060:1>
+
thumbnails {
+
     0 {
+
        image                   "thumbnail.jpg"
+
        width                   "240"
+
        height                   "180"
+
    }
+
 
  }
 
  }
  description                    ""
+
  kuid-table
  asset-filename                  "Modern European Region"
+
  {
kuid                           <kuid:XXXXX:YYYY>
+
  0                                    <kuid:-1:100553>
author                          ""
+
  1                                    <kuid:447264:1132>
organisation                    ""
+
  2                                    <kuid:447264:1133>
contact-email                  ""
+
  3                                    <kuid:447264:1134>
contact-website                ""
+
license                        ""
+
kuid-table {
+
 
  }
 
  }
  
+
==Creating a Region==
'''Notes:'''
+
 
+
username                        "Modern European Region"
+
 
+
You can write whatever you like such as "'''Vanity Fairland'''" :)
+
 
+
trainz-build                    2.4
+
 
+
If you want this asset to be TRS2004 (and up)-compatible  regardless of what SP1 is installed, just write "'''2.0'''".
+
 
+
region                          "EU"
+
 
+
This is the '''country two-or-three-letter Trainz coding'''.  Write the one you need, i.e. "US" or "AUS". '''You can't write any non-existant country code'''.
+
 
+
ontheright                      1
+
 
+
Of course, this is the '''traffic side of the matter''' :). '''1''' is for right driving and '''0''' for left driving.
+
 
+
defaultjunction                100634
+
 
+
If you don't like the '''TRS default junction levers''' to appear when you set a junction on you route, and you just want one in particular, just write the''' kuid of that lever''', i.e. <kuid:XXXXX:YYYY>
+
 
+
longitude                      77,1.2,-1
+
latitude                        38,53.4,1
+
 
+
If you know the '''longitude and latitude''' parameters of your location, you can write them on. If it doesn't really matter, leave it so.
+
 
+
car0                            <kuid:84912:29254>
+
car1                            <kuid:92263:8033>
+
car2                            <kuid:92263:8304>
+
car3                            <kuid:92263:8301>
+
car4                            <kuid:117608:50404>
+
car5                            <kuid:114172:29101>
+
car6                            <kuid:110192:29022>
+
car7                            <kuid:82117:29064>
+
car8                            <kuid:110192:29038>
+
car9                            <kuid:192605:29012>
+
car10                          <kuid2:88421:46000:1>
+
car11                          <kuid2:88421:1918:1>
+
car12                          <kuid2:88421:2004:1>
+
car13                          <kuid:92263:8014>
+
car14                          <kuid2:35412:28060:1>
+
 
+
 
+
This the part where '''you must set the vehicles you want to have on your roads'''. You can add '''as much as 15 vehicles''' (-this the current limit-) by writing  their '''kuid numbers'''. Please, start with '''car0''', not with '''car1'''. If you don't set this part, traffic will consist of the default vehicles in TRS.
+
Remember that '''traffic density''' only depends on the '''carrate''' tag on the config.txt of road you are using. The lower ('''minimun 3''') the denser. '''This aspect cannot be configured on a region or route asset'''.
+
 
+
0 {
+
  image                        "thumbnail.jpg"
+
  width                        "240"
+
  height                        "180"
+
  }
+
 
+
Remember this is '''compulsory for TRS2006 (and up) assets''' if you want to have them uploaded on the DS. A '''240X180 .jpg''' image must be included inside the  asset  folder. '''The name of the file must be the same as written on this code'''. Of course, you can change the code into '''whatever.jpg''' if you like.
+
 
+
asset-filename                  "Modern European Region"
+
 
+
 
+
Just use the same name as in the '''username parameter''', but it is an unimportant fact. IN fact, this tag was obsoleted in TRS2006. On this kind of assets, what matters is the '''username''' tag.
+
 
+
* Of course, your '''kuid ID number''', as always in '''Trainz Asset Creation'''.
+
 
+
 
+
* Save the '''config.txt''' file, add the '''thumbnail image file''' if needed (TRS2006 and up) and create your '''cdp''' the usual way you do in your TRS version, either in TRS2004 (CManager) or TRS2006 (via the CMP by importing the folder before).
+
* Install it on your TRS. Next time you want to create a new route in Surveyor '''your new region will be there''', listed amongst the ones available. :)
+
 
+
 
+
* For '''existing routes''', if you want them to use this region asset, just '''change its region parameter line''' on its config.txt:
+
 
+
  
region                         <kuid:XXXXXX:YYYY>
+
The simplest way to create a new region is to clone an existing one and make any required changes.
  
Of course, write the kuid ID of your region asset.
+
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.
  
You can use [http://www.auran.com/TRS2004/DLS_viewasset.php?AssetID=107081 this sample asset] by '''Alberte Zato (a)zatovisualworks''' as a guide. Or [http://www.zatovisualworks.com//trainz/cdp/modern_european_region.cdp this one].
+
The thumbnail can be created in any image editng programIt 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.
  
<div style="text-align: center;">Check this image '''to see which files must be included inside the asset folder/cdp'''
+
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.
http://zatovisualworks.com/images/files.jpg
+
</div>
+
  
 
==Categories==
 
==Categories==
 
[[Category:Asset KIND|R]]
 
[[Category:Asset KIND|R]]
 
{{ORP-bot}}
 
{{ORP-bot}}

Revision as of 12:35, 5 July 2017

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' and category-class 'VL'.

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.

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

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