These are the steps I used to convert a trainz-build 1.3 loco, that had manual running number capabilty, to trainz-build 2.9 with Automatic Running Numbers (ARN).
1. Cloned built-in loco GP38-2 - Canadian National,<kuid:-1:100167> then right click it to select Edit - Edit in Explorer to put it in the edit folder.
2. Copy the arn_sfx_loco.gs script file to the edit folder. If you don't have this script file you can download it from http://www.trainzproroutes.org/forum/viewtopic.php?t=3883 as ARN+SFX_Loco_Update_Pack_2K4+6.zip which unzips to the script file.
Double click the locos config.txt file for edit in Notepad to make the following changes:
3. Deleted this tag:
origin "CAN"
because it is obsolete.
4. Replace the tag bogey 100141 with this bogey container:
bogeys
{
0
{
reversed 0
bogey <kuid:-1:100141>
}
1
{
reversed 0
bogey <kuid:-1:100141>
}
}
5. Changed interior 101475 to interior <kuid:-1:101475>
6. Changed the tag:
name "GP38-2 - Canadian National"
to:
username "GP38-2 Bobs"
so this asset has a unique name for me.
7. Added this tag just below the existing tag fonts 2:
fonts-path "gp38_2_cnstripes"
This points to the folder that has the alphanumbers.
8. Added these three tags:
trainz-build 2.9
script "arn_sfx_loco"
class "ARN_SFX_Loco"
9. Replaced
running-numbers
{
rn-0 "# 4711 "
rn-1 "# 1233 "
rn-3 "# 1234 "
rn-2 "# 1235 "
}
with this container:
extensions
{
arn_data-47907
{
number_low "5500"
number_high "5559"
}
}
Note that the arn_data- number is the User-ID number of the cloned kuid. I looked up the road numbers for a CN GP38-2 in wikipedia and used those values for the low and high range.
10. Used PEV's PM2IM to change .pm mesh to .im and used Quickshadow to create a shadow.im mesh. Then added this mesh table:
mesh-table
{
default
{
mesh "gp38_2_cnstripes_body/gp38_2_cnstripes_body.im"
auto-create 1
}
shadow
{
mesh "gp38_2_cnstripes_body/shadow.im"
}
}
11. Added kuid numbers for the arn library, sfx library and the arn icon to the existing kuid table so it looks like this:
kuid-table
{
arn_lib <kuid2:104722:2501038:4>
arn_icon <kuid2:104722:1959365:2>
sfx_lib <kuid2:104722:2502000:1>
0 <kuid:-1:42004231>
1 <kuid:-1:42003000>
2 <kuid:523:54610>
3 <kuid:-1:100141>
4 <kuid:-1:101475>
}
Saved and commit.
Bob Weber
1. Cloned built-in loco GP38-2 - Canadian National,<kuid:-1:100167> then right click it to select Edit - Edit in Explorer to put it in the edit folder.
2. Copy the arn_sfx_loco.gs script file to the edit folder. If you don't have this script file you can download it from http://www.trainzproroutes.org/forum/viewtopic.php?t=3883 as ARN+SFX_Loco_Update_Pack_2K4+6.zip which unzips to the script file.
Double click the locos config.txt file for edit in Notepad to make the following changes:
3. Deleted this tag:
origin "CAN"
because it is obsolete.
4. Replace the tag bogey 100141 with this bogey container:
bogeys
{
0
{
reversed 0
bogey <kuid:-1:100141>
}
1
{
reversed 0
bogey <kuid:-1:100141>
}
}
5. Changed interior 101475 to interior <kuid:-1:101475>
6. Changed the tag:
name "GP38-2 - Canadian National"
to:
username "GP38-2 Bobs"
so this asset has a unique name for me.
7. Added this tag just below the existing tag fonts 2:
fonts-path "gp38_2_cnstripes"
This points to the folder that has the alphanumbers.
8. Added these three tags:
trainz-build 2.9
script "arn_sfx_loco"
class "ARN_SFX_Loco"
9. Replaced
running-numbers
{
rn-0 "# 4711 "
rn-1 "# 1233 "
rn-3 "# 1234 "
rn-2 "# 1235 "
}
with this container:
extensions
{
arn_data-47907
{
number_low "5500"
number_high "5559"
}
}
Note that the arn_data- number is the User-ID number of the cloned kuid. I looked up the road numbers for a CN GP38-2 in wikipedia and used those values for the low and high range.
10. Used PEV's PM2IM to change .pm mesh to .im and used Quickshadow to create a shadow.im mesh. Then added this mesh table:
mesh-table
{
default
{
mesh "gp38_2_cnstripes_body/gp38_2_cnstripes_body.im"
auto-create 1
}
shadow
{
mesh "gp38_2_cnstripes_body/shadow.im"
}
}
11. Added kuid numbers for the arn library, sfx library and the arn icon to the existing kuid table so it looks like this:
kuid-table
{
arn_lib <kuid2:104722:2501038:4>
arn_icon <kuid2:104722:1959365:2>
sfx_lib <kuid2:104722:2502000:1>
0 <kuid:-1:42004231>
1 <kuid:-1:42003000>
2 <kuid:523:54610>
3 <kuid:-1:100141>
4 <kuid:-1:101475>
}
Saved and commit.
Bob Weber
Last edited: