How To Make Custom Region

Welcome to this humble forum. Feel free to post in your native language.

How To Make Custom Region

Joined: 12 Apr 2008, 18:21

05 Aug 2008, 20:13 #1

Credits: This tutorial was written by Alberte Zato


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 buil-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 dialoque 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 my region assets. Do not worry we are commenting a few tags later below, the ones in bold italics.


*

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 compatible and up regardless 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 matters, leave 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.

* Of course, your kuid ID number, as always in Trainz 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 amongs 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.


Hope this is useful and enjoy it.

The e-learning side of Alberte ;)
Reply
Like