How to Create a Region Asset
m |
m |
||
Line 387: | Line 387: | ||
'''Examples:''' | '''Examples:''' | ||
+ | <table width=800> | ||
+ | <tr> | ||
+ | <td> | ||
category-era "2000s" | category-era "2000s" | ||
+ | </td> | ||
+ | <td width=300>Years 2000 to 2009</td> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td> | ||
category-era "1910s;1920s;1930s;1940s;1950s" | category-era "1910s;1920s;1930s;1940s;1950s" | ||
+ | </td> | ||
+ | <td>Years 1910 to 1959</td> | ||
+ | </tr> | ||
+ | </table> | ||
=='''Category Region Tag'''== | =='''Category Region Tag'''== | ||
Line 404: | Line 416: | ||
'''Examples:''' | '''Examples:''' | ||
+ | <table width=800> | ||
+ | <tr> | ||
+ | <td width> | ||
category-region "00" | category-region "00" | ||
+ | </td> | ||
+ | <td width=300>Unassigned</td> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td> | ||
category-region "US" | category-region "US" | ||
+ | </td> | ||
+ | <td>USA</td> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td> | ||
category-region "AU;UK;NZ" | category-region "AU;UK;NZ" | ||
+ | </td> | ||
+ | <td>Australia, United Kingdom, New Zealand</td> | ||
+ | </tr> | ||
+ | </table> | ||
=='''On the Right Tag'''== | =='''On the Right Tag'''== | ||
Line 424: | Line 453: | ||
'''Examples:''' | '''Examples:''' | ||
+ | <table width=800> | ||
+ | <tr> | ||
+ | <td> | ||
ontheright 0 | ontheright 0 | ||
+ | </td> | ||
+ | <td width=300>Left side driving</td> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td> | ||
ontheright 1 | ontheright 1 | ||
+ | </td> | ||
+ | <td>Right side driving</td> | ||
+ | </tr> | ||
+ | </table> | ||
=='''Water Color Tag'''== | =='''Water Color Tag'''== | ||
Line 448: | Line 489: | ||
'''Examples:''' | '''Examples:''' | ||
− | <table width= | + | <table width=800> |
<tr> | <tr> | ||
<td> | <td> | ||
water-color 0,155,255 | water-color 0,155,255 | ||
</td> | </td> | ||
+ | <td bgcolor=#009bff width=300>  </td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 458: | Line 500: | ||
water-color 75,128,255 | water-color 75,128,255 | ||
</td> | </td> | ||
+ | <td bgcolor=#4880ff>  </td> | ||
</tr> | </tr> | ||
</table> | </table> | ||
Line 477: | Line 520: | ||
'''Examples:''' | '''Examples:''' | ||
− | <table width= | + | <table width=800> |
<tr> | <tr> | ||
<td> | <td> | ||
defaultjunction <kuid:61119:24120> | defaultjunction <kuid:61119:24120> | ||
</td> | </td> | ||
+ | <td width=300>Lever Throw Over</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 487: | Line 531: | ||
defaultjunction <kuid2:63290:24043:3> | defaultjunction <kuid2:63290:24043:3> | ||
</td> | </td> | ||
+ | <td>Switch Tall Frame 1</td> | ||
</tr> | </tr> | ||
</table> | </table> | ||
Line 508: | Line 553: | ||
'''Examples:''' | '''Examples:''' | ||
− | <table width= | + | <table width=800> |
<tr> | <tr> | ||
<td> | <td> | ||
default-texture <kuid:-25:1180> | default-texture <kuid:-25:1180> | ||
</td> | </td> | ||
+ | <td width=300>Grid (PBR)</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 518: | Line 564: | ||
default-texture <kuid:455526:50038> | default-texture <kuid:455526:50038> | ||
</td> | </td> | ||
+ | <td>FX PBR Gravel 03</td> | ||
</tr> | </tr> | ||
</table> | </table> | ||
Line 556: | Line 603: | ||
'''Examples:''' | '''Examples:''' | ||
− | <table width= | + | <table width=800> |
<tr> | <tr> | ||
<td> | <td> | ||
trainz-build 3.7 | trainz-build 3.7 | ||
</td> | </td> | ||
+ | <td width=300>TRS12 SP1 and above</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 566: | Line 614: | ||
trainz-build 5.0 | trainz-build 5.0 | ||
</td> | </td> | ||
+ | <td>TRS19 SP5 and above</td> | ||
</tr> | </tr> | ||
</table> | </table> | ||
Line 605: | Line 654: | ||
'''Examples:''' | '''Examples:''' | ||
− | <table width= | + | <table width=800> |
<tr> | <tr> | ||
<td> | <td> | ||
longitude 153.0,2.0,1.0 | longitude 153.0,2.0,1.0 | ||
</td> | </td> | ||
+ | <td width=300>East</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 615: | Line 665: | ||
longitude 2.0,20.0,-1.0 | longitude 2.0,20.0,-1.0 | ||
</td> | </td> | ||
+ | <td>West</td> | ||
</tr> | </tr> | ||
</table> | </table> | ||
Line 656: | Line 707: | ||
'''Examples:''' | '''Examples:''' | ||
− | <table width= | + | <table width=800> |
<tr> | <tr> | ||
<td> | <td> | ||
latitude 27.0,28.0,-1.0 | latitude 27.0,28.0,-1.0 | ||
</td> | </td> | ||
+ | <td width=300>South</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 666: | Line 718: | ||
latitude 48.0,48.0,1.0 | latitude 48.0,48.0,1.0 | ||
</td> | </td> | ||
+ | <td>North</td> | ||
</tr> | </tr> | ||
</table> | </table> | ||
Line 716: | Line 769: | ||
'''Examples:''' | '''Examples:''' | ||
− | <table width= | + | <table width=800> |
<tr> | <tr> | ||
<td> | <td> | ||
altitude 0 | altitude 0 | ||
</td> | </td> | ||
+ | <td width=300>metres</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 726: | Line 780: | ||
altitude 100 | altitude 100 | ||
</td> | </td> | ||
+ | <td>metres</td> | ||
</tr> | </tr> | ||
</table> | </table> |
Revision as of 19:24, 11 December 2022
The information in this Wiki Page applies to TANE, TRS19, Trainz Plus and TRS22.
|
Workflow Diagram |
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 just a config.txt file (plus a thumbnail) that contains all the data for a region |
|
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 1969" category-class "YX" category-era "1950s;1960s" category-region "AU" ontheright 0 water-color 75,128,255 defaultjunction <kuid:61119:24120> default-texture <kuid:-25:1180> trainz-build 4.8 longitude 147.0,26.0,1.0 latitude 41.0,50.0,-1.0 altitude 212 car0 <kuid:329364:1568> 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:61119:24120> 1 <kuid:329364:1568> 2 <kuid:-25:1180> }
|
|
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-de "Regionsdaten für Tasmanien 1950 bis 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-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. |
Region Tags
Category Era Tag
This tag is NOT compulsory in a Region asset |
category-era
This identifies the decade or decades in which the region is based. The tag data contains text surrounded by quote (") characters. 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.
Examples:
category-era "2000s" |
Years 2000 to 2009 |
category-era "1910s;1920s;1930s;1940s;1950s" |
Years 1910 to 1959 |
Category Region Tag
This tag is NOT compulsory in a Region asset |
category-region
This identifies the country or countries in which the region is based. The tag data contains text surrounded by quote (") characters. 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.
Examples:
category-region "00" |
Unassigned |
category-region "US" |
USA |
category-region "AU;UK;NZ" |
Australia, United Kingdom, New Zealand |
On the Right Tag
This tag is compulsory in a Region asset |
ontheright (no hyphens between the words)
This identifies which side of the road is used by road traffic in this region. The tag data contains a binary value (0 or 1). 0 = left side, 1 = right side.
United Kingdom, Ireland, Australia, New Zealand, Japan and many former British colonies would use a value of 0. Most of the rest of the world would use a value of 1.
Examples:
ontheright 0 |
Left side driving |
ontheright 1 |
Right side driving |
Water Color Tag
The water-color tag in a Region asset has been superseded by the Water Color Lighting Setting which is set in the Environment Tools |
This tag is compulsory in a Region asset with an asset build number of 3.4 and higher |
water-color
This identifies the colour used by water surfaces added by the Surveyor Terrain Tool in this region. The tag contains three integers separated by commas (e.g. 75,128,255). The integers specify the RGB ( Red Green Blue ) colour values to be used and each value is from 0 to 255.
Examples:
water-color 0,155,255 |
|
water-color 75,128,255 |
Default Junction Tag
This tag is compulsory in a Region asset with an asset build number of 3.4 and higher |
defaultjunction (no hyphen between the two words)
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 tag data contains a single valid kuid (e.g. <kuid:61119:24120>).
The kuid value of the switch lever must also be added to the kuid-table container of the config.txt file.
Examples:
defaultjunction <kuid:61119:24120> |
Lever Throw Over |
defaultjunction <kuid2:63290:24043:3> |
Switch Tall Frame 1 |
Default Texture Tag
This tag is only valid in a Region asset with a build number of 4.8 and higher (TRS19 SP3 and later) |
default-texture
This identifies the default texture that will be applied to every new baseboard that is added. If it is not present then a system default texture will be used on new baseboards in Trainz TRS19 and later. If present then the Trainz Build Tag must also be present and set to a minimum value of 4.8 (TRS19 SP3 and later).
The kuid value shown in the sample config.txt above, <kuid:-25:1180>, is for the standard TRS19 grid pattern.
The kuid value of the texture must also be added to the kuid-table container of the config.txt file.
Examples:
default-texture <kuid:-25:1180> |
Grid (PBR) |
default-texture <kuid:455526:50038> |
FX PBR Gravel 03 |
Trainz Build Tag
This tag is NOT compulsory in a Region asset unless the Default Texture Tag is present |
trainz-build
The identifies the minimum version of Trainz that wlll be needed to use this region asset. A list of asset trainz-build numbers and their corresponding Trainz versions can be found at Trainz build numbers
|
Examples:
trainz-build 3.7 |
TRS12 SP1 and above |
trainz-build 5.0 |
TRS19 SP5 and above |
Longitude Tag
This tag is compulsory in a Region asset with an asset build number of 3.4 and higher |
The Longitude tag in a Region asset has been superseded by the Longitude Setting in the Environment Tools |
longitude
This identifies the geographic longitude of a point in the region. The tag contains three floating point or decimal values separated by commas (e.g. 147.0,26.0,1.0). The first value is the longitude degrees, the second value 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.
|
Examples:
longitude 153.0,2.0,1.0 |
East |
longitude 2.0,20.0,-1.0 |
West |
Latitude Tag
This tag is compulsory in a Region asset with an asset build number of 3.4 and higher |
The Latitude tag in a Region asset has been superseded by the Latitude Setting in the Environment Tools |
latitude
This identifies the geographic latitude of a point in the region. The tag contains three floating point or decimal values separated by commas (e.g. 41,0,50.0,-1.0). The first value is the latitude degrees, the second value 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.
|
Examples:
latitude 27.0,28.0,-1.0 |
South |
latitude 48.0,48.0,1.0 |
North |
Altitude Tag
This tag is compulsory in a Region asset with an asset build number of 3.4 and higher |
The Altitude tag in a Region asset has been superseded by the World Origin Altitude Setting in the Environment Tools |
The altitude can be set by selecting a Region:-
|
altitude
This sets the initial altitude (height above sea level) of the route. It is also used in the display of snow but only with those scenery assets that have a snow effect layer.
The tag data contains a single integer that represents the altitude in metres. All terrain and object heights will be set relative to that altitude. For example: if the first baseboard of a route is manually raised to a height of 20 metres using the Terrain Height Tool and the route is then assigned to a region with the altitude set to 100 metres, then the first baseboard will have a height above sea level of 20 + 100 = 120 metres.
The altitude tag works with the Snow Altitude Setting which is set in the Environment Tools.
|
Examples:
altitude 0 |
metres |
altitude 100 |
metres |
Car Tags
This tag is NOT compulsory in a Region asset. If not present then no moving vehicles will appear |
|
car0, car1, car2, etc
The Car Tag identifies the moving vehicles (cars, trucks, etc) that will appear on roads in the region. Each car tag contains just a single kuid value (e.g. <kuid:329364:1568>) that identifies a single vehicle. There are restrictions and requirements:-
- Up to 15 different vehicles (see Notes above), each as a separate tag from car0 to car14 with their kuid values, can be specified in a region. The car tag numbers must be consecutive with no missing or duplicated entries (see Notes above)
- The vehicles must be specially configured to allow them to be used as moving vehicles - static car assets cannot be used. See Build a Car for Traffic for information on how to configure a static vehicle asset for road traffic
- Not all roads are configured to carry moving vehicles
- The Environment Tools has a control that will enable and disable ALL road traffic. If this is set to disable then the car tags will be ignored and no moving vehicles will appear.
- The kuids of the vehicles must be added to the kuid-table container of the config.txt file
For example, the following entries will specify just 4 different moving vehicles for the region.
Example:
car0 <kuid:329364:1568> car1 <kuid:309161:100599> car2 <kuid2:329364:1689:1> car3 <kuid2:329364:1707:1>
If any of the listed cars are faulty then the Region asset will NOT appear for selection in the route Region List (see Using the Asset below) |
Kuid Table Tag
This tag is compulsory in a Region asset if the defaultjunction, default-texture or car tags are used |
kuid-table
This must contain the kuids of the Default Junction Tag, the Default Texture Tag and all the cars specified in the car tags - if any of them are present. The kuid order is not important and the tag numbers ("0", "1", etc) do not have to match those used in the car tags. Using the examples shown above, the kuid-table could be as shown below.
kuid-table { 0 <kuid:61119:24120> 1 <kuid:-25:1180> 2 <kuid:329364:1568> 3 <kuid:309161:100599> 4 <kuid2:329364:1689:1> 5 <kuid2:329364:1707:1> }
In this example, the first kuid value is for the defaultjunction, the second is for the default-texture and the remaining kuid values are for the four road vehicles, but the order of the entries is not important.
The Thumbnail Image
A thumbnail image MUST be present in the asset |
|
Using the Asset
Once the new asset has been committed it will be available for use as a Region.
If the region asset is faulty (for example, if it has an incorrect kuid code in one of its car tags) then the region will not appear in the Region selection list. |
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.