KIND Region

From TrainzOnline
Revision as of 19:15, 16 July 2013 by Fabartus (Talk | contribs)

Jump to: navigation, search

Contents

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 Hierarchy

Parent Classes

Trainz User Tip:
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.
 • 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.
 • The region can define geographical location, era dependent data such as the types of road traffic and weather conditions.
 • The region can customize the appearance to an era, simply by specifying more appropos vehicles of the 20s, 40s, or 90s.


Child Classes

  • 'KUID defined assets' of vehicle traffic particular to the region.

Supported Tags

This section is a stub. You can help TrainzOnline's other users by adding to the content in this section or page. If you unfamiliar with Wiki editing, see the How-to-edit pages.


Example Config.txt

This section is a stub. You can help TrainzOnline's other users by adding to the content in this section or page. If you unfamiliar with Wiki editing, see the How-to-edit pages.

Needs Reformatting

Creating a 'region' asset is not difficult at all. Just your Notepad or similar application needed and we are on the go.

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:

  • Setting the geographical location of your route
  • Setting the traffic vehicles appearing on the spline roads you lay on your route


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).

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.

2. Let's make the asset. Nothing is as simple and easy in Trainz like that.

  • Create a new folder anywhere on your OS.
  • Inside that folder, create a new .txt file which you are naming config.txt
  • 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.


username                        "Modern European Region"
category-class                  "YX"
kind                            "region"
trainz-build                    2.4
region                          "EU"
watercolor                      38,74,92
ontheright                      1
defaultjunction                 100634
longitude                       77,1.2,-1
latitude                        38,53.4,1
altitude                        0
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>
thumbnails {
   0 {
       image                    "thumbnail.jpg"
       width                    "240"
       height                   "180"
   }
}
description                     ""
asset-filename                  "Modern European Region"
kuid                            <kuid:XXXXX:YYYY>
author                          ""
organisation                    ""
contact-email                   ""
contact-website                 ""
license                         ""
kuid-table {
}


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>

Of course, write the kuid ID of your region asset.

You can use this sample asset by Alberte Zato (a)zatovisualworks as a guide. Or this one.


Check this image to see which files must be included inside the asset folder/cdp

http://zatovisualworks.com/images/files.jpg

Categories

Personal tools