How to Create a Region Asset
m (→Latitude Tag) |
(→The Config.txt File: Reorganised and simplified colour coding) |
||
Line 211: | Line 211: | ||
This file should follow the same (or a similar) format as the example below.<br> | This file should follow the same (or a similar) format as the example below.<br> | ||
− | *entries in <span style="background-color: | + | *entries in <span style="background-color: red; color: white; font-weight: 700;"> red </span> must not be changed |
*the indenting of the lines and the spacing ("tabbing") between the "tags" on the left and their contents on the right are purely to make it easier for humans to read | *the indenting of the lines and the spacing ("tabbing") between the "tags" on the left and their contents on the right are purely to make it easier for humans to read | ||
*the use of the '''{}''' braces is to group tags into common "containers". These containers must not be broken up and the number of '''{''' characters must match the number of '''}''' characters | *the use of the '''{}''' braces is to group tags into common "containers". These containers must not be broken up and the number of '''{''' characters must match the number of '''}''' characters | ||
*the order of the "tags" is not important | *the order of the "tags" is not important | ||
− | '''kuid''' | + | '''kuid''' <span style="background-color: red; color: white; font-weight: 700;"><kuid:this is an auto-generated number></span> |
− | '''kind''' | + | '''kind''' "<span style="background-color: red; color: white; font-weight: 700;">region</span>" |
− | + | '''username "Region data for Tasmania 1950 to 1969n>"''' | |
− | ''' | + | '''category-class''' "<span style="background-color: red; color: white; font-weight: 700;">YX</span>" |
− | '''category- | + | '''category-era "1950s;1960s"''' |
− | '''category- | + | '''category-region "AU"''' |
− | '''ontheright''' | + | '''ontheright 0''' |
− | '''water-color | + | '''water-color 75,128,255''' |
− | '''defaultjunction | + | '''defaultjunction <kuid:61119:24120>''' |
− | '''longitude | + | '''longitude 147.0,26.0,1.0''' |
− | '''latitude | + | '''latitude 41.0,50.0,-1.0''' |
− | '''altitude''' | + | '''altitude 212''' |
− | '''car0 | + | '''car0 <kuid:61119:24120>''' |
− | '''trainz-build | + | '''trainz-build 4.3 |
'''thumbnails''' | '''thumbnails''' | ||
{ | { | ||
− | + | '''Default''' | |
{ | { | ||
− | width | + | '''width''' <span style="background-color: red; color: white; font-weight: 700;">240</span> |
− | height | + | '''height''' <span style="background-color: red; color: white; font-weight: 700;">180</span> |
− | + | '''image "Tasmania-Region'''<span style="background-color: red; color: white; font-weight: 700;">.jpg</span>" | |
} | } | ||
} | } | ||
− | description | + | '''description "Vehicle, road, water and geographic data for Tasmania (Australia) in the 1950s and 1960s"''' |
− | kuid-table | + | '''kuid-table''' |
{ | { | ||
− | 0 | + | '''0 <kuid value>''' |
− | 1 | + | '''1 <kuid value>''' |
− | 2 | + | '''2 <kuid value>''' |
} | } | ||
Line 256: | Line 256: | ||
<td><span style="font-size: 17px;">'''Settings:'''</span><br> | <td><span style="font-size: 17px;">'''Settings:'''</span><br> | ||
'''For the above example:'''<br> | '''For the above example:'''<br> | ||
− | *The <span style="background-color: | + | *The <span style="background-color: black; color: white; font-weight: 700;"> kuid </span> is unique to every asset so it is <span style="background-color: red; color: white; font-weight: 700;"> not a good idea to choose your own </span>. This will be automatically generated by the '''Content Manager''' program when a new asset is created |
− | *The <span style="background-color: | + | *The <span style="background-color: black; color: white; font-weight: 700;"> kind </span> identifies the ''type'' of asset and the types of files that '''Trainz''' will expect to find in the asset. It also tells '''Trainz''' how to render and error check the asset. A list of asset kinds can be found at [[file:WikiLink.PNG|link=]] '''[[KIND_TrainzBaseSpec#KIND_Hierarchy|KIND Hierarchy]]''' |
− | *The <span style="background-color: | + | *The <span style="background-color: black; color: white; font-weight: 700;"> username </span> is your name for the asset and the name that other users will see. It is a good idea to make it short and meaningful. |
− | *The <span style="background-color: | + | *The <span style="background-color: black; color: white; font-weight: 700;"> category-class </span> identifies the ''intent'' of the asset and is important in classifying it for filtering and searching. For '''region''' assets, the category class is "<span style="background-color: red; color: white; font-weight: 700;">YX</span>". A list of category classes can be found at [[file:WikiLink.PNG|link=]] '''[[Category-class]]''' |
− | *The <span style="background-color: | + | *The <span style="background-color: black; color: white; font-weight: 700;"> category-era </span> identifies the decade or decades in which the region is based (e.g. "1950s"). See the section [[file:PageLink.PNG|link=]] '''[[#Category Era Tag|Category Era Tag]]''' below for more details. |
− | *The <span style="background-color: | + | *The <span style="background-color: black; color: white; font-weight: 700;"> category-region </span> identifies the country or countries in which layout is based. See the section [[file:PageLink.PNG|link=]] '''[[#Category Region Tag|Category Region Tag]]''' below for more details. |
− | *The <span style="background-color: | + | *The <span style="background-color: black; color: white; font-weight: 700;"> ontheright </span> identifies which side of the road is used by road traffic. See the section [[file:PageLink.PNG|link=]] '''[[#On the Right Tag|On the Right Tag]]''' below for more details. |
− | *The <span style="background-color: | + | *The <span style="background-color: black; color: white; font-weight: 700;"> water-color </span> identifies the the colour used by water surfaces in this region. See the section [[file:PageLink.PNG|link=]] '''[[#Water Color Tag|Water Color Tag]]''' below for more details. |
− | *The <span style="background-color: | + | *The <span style="background-color: black; color: white; font-weight: 700;"> defaultjunction </span> identifies the junction lever or switch that Trainz will use as its default lever asset whenever a lever is added to a track junction in this region. See the section [[file:PageLink.PNG|link=]] '''[[#Default Junction Tag|Default Junction Tag]]''' below for more details. |
− | *The <span style="background-color: | + | *The <span style="background-color: black; color: white; font-weight: 700;"> longitude </span> identifies the geographic longitude of a point in the region. See the section [[file:PageLink.PNG|link=]] '''[[#Longitude Tag|Longitude Tag]]''' below for more details. |
− | *The <span style="background-color: | + | *The <span style="background-color: black; color: white; font-weight: 700;"> latitude </span> identifies the geographic latitude of a point in the region. See the section [[file:PageLink.PNG|link=]] '''[[#Latitude Tag|Latitude Tag]]''' below for more details. |
− | *The <span style="background-color: | + | *The <span style="background-color: black; color: white; font-weight: 700;"> altitude </span> identifies the altitude of the point in the region whose longitude and latitude has been given. See the section [[file:PageLink.PNG|link=]] '''[[#Altitude Tag|Altitude Tag]]''' below for more details. |
− | *The <span style="background-color: | + | *The <span style="background-color: black; color: white; font-weight: 700;"> car0 </span> identifies the first moving car that will appear on roads in the region. Upto 15 different cars can be specified. See the section [[file:PageLink.PNG|link=]] '''[[#Car Tags|Car Tags]]''' below for more details. |
− | *The <span style="background-color: | + | *The <span style="background-color: black; color: white; font-weight: 700;"> trainz-build </span> identifies the ''minimum'' Trainz version needed for this asset. A list of asset trainz-build numbers and their corresponding Trainz versions can be found at [[file:WikiLink.PNG|link=]] '''[["Trainz-build"_number|Trainz build numbers]]''' |
− | *The <span style="background-color: | + | *The <span style="background-color: black; color: white; font-weight: 700;"> thumbnails </span> container holds the ''preview'' images of the asset shown by the '''Content Manager''' program, the Web version of the ''DLS'' and, for '''some assets''', the Surveyor main menu image(s). Information on thumbnails can be found at [[file:WikiLink.PNG|link=]] '''[[Thumbnails]]''' |
− | **The label <span style="background-color: | + | **The label <span style="background-color: black; color: white; font-weight: 700;"> Default </span> is the '''container ID''' or '''placeholder''' for the thumbnail used by CM and the Web based DLS. While its ''exact label'' (or number - eg. "Default", "00", "01", etc) is not important, it must be different from any other labels that might be present in the thumbnail. '''Default''' and '''0''' are commonly used placeholder labels for the 240 x 180 thumbnail image |
***The '''image''' is the name of the thumbnail image - it '''must''' be a JPG format image | ***The '''image''' is the name of the thumbnail image - it '''must''' be a JPG format image | ||
− | ***The '''width''' of the image must be | + | ***The '''width''' of the image in pixels must be <span style="background-color: red; color: white; font-weight: 700;">240</span> |
− | ***The '''height''' of the image must be | + | ***The '''height''' of the image in pixels must be <span style="background-color: red; color: white; font-weight: 700;">180</span> |
− | *The <span style="background-color: | + | *The <span style="background-color: black; color: white; font-weight: 700;"> description </span> provides more details for users than the '''username''' |
− | *The <span style="background-color: | + | *The <span style="background-color: black; color: white; font-weight: 700;"> kuid-table </span> contains the kuid values of the '''defaultjunction''' asset (if used) and all the '''carN''' assets. See the section [[file:PageLink.PNG|link=]] '''[[#Kuid Table Tag|Kuid Table Tag]]''' below for more details. |
</td> | </td> | ||
</tr> | </tr> |
Revision as of 13:27, 6 April 2020
The information in this Wiki Page applies to TANE, TRS19 and Trainz Plus.
Contents |
What is a Region?
A Region defines some of the characteristics of a geographic location (e.g. a country or a province) that is represented in a route | ||
A Region Asset is a config.txt file that contains the region data |
Region Data: When a Region has been assigned to a route, it will set:-
|
How to Create a Region Asset
Steps |
Create the Asset:
|
|||||||
|
||||||||
Find the New Asset:
|
||||||||
|
||||||||
Open the Asset in Windows File Explorer:
|
||||||||
|
||||||||
Open Config.txt File in Notepad:
|
||||||||
|
||||||||
Edit the Config.txt File:
|
||||||||
|
||||||||
Add a Thumbnail:
|
||||||||
|
||||||||
Finish Up:
|
The Config.txt File
This file should follow the same (or a similar) format as the example below.
- entries in red must not be changed
- the indenting of the lines and the spacing ("tabbing") between the "tags" on the left and their contents on the right are purely to make it easier for humans to read
- the use of the {} braces is to group tags into common "containers". These containers must not be broken up and the number of { characters must match the number of } characters
- the order of the "tags" is not important
kuid <kuid:this is an auto-generated number> kind "region" username "Region data for Tasmania 1950 to 1969n>" category-class "YX" category-era "1950s;1960s" category-region "AU" ontheright 0 water-color 75,128,255 defaultjunction <kuid:61119:24120> longitude 147.0,26.0,1.0 latitude 41.0,50.0,-1.0 altitude 212 car0 <kuid:61119:24120> trainz-build 4.3 thumbnails { Default { width 240 height 180 image "Tasmania-Region.jpg" } } description "Vehicle, road, water and geographic data for Tasmania (Australia) in the 1950s and 1960s" kuid-table { 0 <kuid value> 1 <kuid value> 2 <kuid value> }
|
|
Settings: For the above example:
|
|
|
Language Options: | |
All Trainz assets have a language facility built into their config.txt files that allows other language translations to be added for certain tags, such as the username and description tags. A full description of the process can be found on the Trainz Wiki at Localize an Asset and a list of all the supported languages with their two character codes at Localization (country) Codes. At the very basic level any creator can easily provide other language translations for the username and description tags in the assets they create. Examples are shown below for this sample asset. |
|
username "Region data for Tasmania 1950 to 1969" username-c2 "塔斯马尼亚州1950年至1969年的区域数据" username-es "Datos de la región para Tasmania 1950 a 1969" username-fr "Données régionales pour la Tasmanie de 1950 à 1969" username-gr "Regionsdaten für Tasmanien 1950 bis 1969" username-nl "Regiogegevens voor Tasmanië 1950 tot 1969" username-ru "Данные по регионам за Тасманию с 1950 по 1969 год" |
|
Translations to Chinese (simplified), Spanish, French, German, Dutch and Russian, perfect or not, were provided by Google Translate. |
Category Era Tag
This identifies the decade or decades in which the region is based. Each decade name ends with an "s" (e.g. "1950s") and multiple consecutive decades can be specified by using a semi-colon (;) as a separator (e.g. "1950s;1960s"). A list of category-eras can be found at Category-era tag.
Category Region Tag
This identifies the country or countries in which the region is based. Each country has a two letter code (e.g. "AU" for Australia) and multiple countries can be specified by using a semi-colon (;) as a separator (e.g. "AU;UK;US"). If no country is to be specified then the two character code "00" (double zero) is used. A list of countries (category regions) can be found at Category-region tag.
On the Right Tag
This identifies which side of the road is used by road traffic in this region. 0 = left side, 1 = right side. This tag is compulsory in a Region asset.
Water Color Tag
Warning: | |
The water-color tag in a Region asset has been superseded by the Water Color Lighting Setting used in TANE and TRS19 Environment Tools |
This identifies the colour used by water surfaces added by the Surveyor Terrain Tool in this region. Three integers specify the RGB (Red, Green, Blue) colour values to be used. Each value is from 0 to 255 and are separated by commas (e.g. 75,128,255). This tag is compulsory in a Region asset with an asset build number of 3.4 and higher.
Default Junction Tag
This identifies the junction lever or switch that Trainz will use as its default lever asset whenever a lever is added to a track junction in this region. The lever asset must be identified by its kuid (e.g. <kuid:61119:24120>). This tag is compulsory in a Region asset with an asset build number of 3.4 and higher.
The kuid value of the switch lever must be added to the kuid-table container of the config.txt file.
Longitude Tag
This identifies the geographic longitude of a point in the region. Three values separated by commas must be supplied. The first is the longitude degrees;, the second is the longitude minutes and the third is the East/West value (1.0 = East, -1.0 = West). For example: 147.0,26.0,1.0 would represent longitude 147 degrees 26 minutes East. This tag is compulsory in a Region asset with an asset build number of 3.4 and higher.
Latitude Tag
This identifies the geographic latitude of a point in the region. Three values separated by commas must be supplied. The first is the latitude degrees;, the second is the latitude minutes and the third is the North/South value (1.0 = North, -1.0 = South). For example: 41,0,50.0,-1.0 would represent latitude 41 degrees 50 minutes South. This tag is compulsory in a Region asset with an asset build number of 3.4 and higher.
Altitude Tag
This identifies the altitude of the point in the region whose longitude and latitude has been given. The height is a single value in metres and is used in the display of snow effects for those assets that support snow. This tag is compulsory in a Region asset with an asset build number of 3.4 and higher.
Car Tags
This identifies the moving cars that will appear on roads in the region. There are restrictions and requirements:-
- Up to 15 different cars, each as a separate tag from car0 to car14 with their kuid values, can be specified in a region. The car numbers must be consecutive with no missing or duplicated entries
- The cars must be configured as moving vehicles and not as static vehicles - static car assets cannot be used. See Build a Car for Traffic for information on how to configure a static car asset for road traffic
- car tags are not compulsory. If not used then no moving cars will appear
- Not all roads are configured to carry moving vehicles
- The Environment Tools has a control that will enable and disable all road traffic
- The kuids of the cars must be added to the kuid-table container of the config.txt file
For example, the following entries will specify just 4 moving vehicles for the region.
car0 <kuid:329364:1568> car1 <kuid:309161:100599> car2 <kuid2:329364:1689:1> car3 <kuid2:329364:1707:1>
Kuid Table Tag
This must contain the kuids of the Default Junction asset and all the cars specified in the car tags. Using the examples shown above, the kuid-table would be as shown below. The kuid order is not important and the tag numbers ("0", "1", etc) do not have to match those used in the car tags.
kuid-table { 0 <kuid:329364:1568> 1 <kuid:309161:100599> 2 <kuid2:329364:1689:1> 3 <kuid2:329364:1707:1> 4 <kuid:61119:24120> }
The Thumbnail Image
A thumbnail image MUST be present in the asset |
Notes: The thumbnail image:-
|
Using the Asset
Once the new asset has been committed it will be available for use as a Region.
The region is specified when a new route is created and it can be altered by selecting Edit Route from the main menu in TANE or the edit menu in TRS19.
Trainz Wiki
More Tutorials and Guides to Using Trainz |
This page was created by Trainz user pware in April 2020 and was last updated as shown below.