Asset Config File Fix Needed: Car Numbering

  • Thread starter Thread starter Orloldman
  • Start date Start date
O

Orloldman

Guest
I am working on some passenger cars that I am trying to fix for use in TS2010. I am getting the following errors that I don't really understand.

Error: The Tag 'number_low' is not permitted within a container of type 'traincar'.
Error: The Tag 'number_high' is not permitted within a container of type 'traincar'.

I believe these numbers are ones that would show up on the side of the car in Trainz and that the "low" is the starting point and "high" is the end point of the number run.

If so, I have no idea how the config file should read so that these errors are corrected and the numbers still work. The following is a copy of a part of the config file for one of the assets. Any help/guidance on how to repair this would be greatly appreciated!

-------------------------------------------------
kuid <kuid2:58843:204:1>
bogey <kuid:58843:50010>
script "controls"
class "PRRb60"
engine 0
enginespec <kuid:-1:42004201>
trainz-build 2
category-class "PB"
category-region-0 "US"
category-era-0 "1920s"
category-era-1 "1930s"
category-era-2 "1940s"
category-era-3 "1950s"
category-era-4 "1960s"
number_low "6624"
number_high "6650"
mesh-table
{
default
{
mesh "PRR_B60_Baggage_body/PRR_B60_Baggage_body.im"
auto-create 1

effects
{
number_left
{
kind "name"
att "a.numleft"
fontsize 0.15
fontcolor 159,135,66
name
}

number_right
{
kind "name"
att "a.numright"
fontsize 0.15
fontcolor 159,135,66
name
}
}
}

shadow
{
mesh "PRR_B60_Baggage_shadow/PRR_B60_Baggage_shadow.pm"
}
}
 
In CM3.2, right click PRR B60 Baggage,<kuid2:58843:204:1> and select Edit - Edit in Explorer.
Double click the config.txt file and edit to remove these two lines:
number_low "6624"
number_high "6650"
Close config.txt and save.

Double click controls.gs and edit these two lines from:
int low = mySoup.GetNamedTagAsInt("number_low");
int high = mySoup.GetNamedTagAsInt("number_high");

to these:

int low = 6624;
int high = 6650;

Close control.gs and save.
Commit.

Bob
 
Bob:

Thanks for your reply and help. With your fix-it outline, all those units ended up error and warning free... and the numbers appear to work fine.

I learned something here too in that, with all the asset fixing I've been working on, I had never tried to open a "control.gs" file, always choosing to skip these issues until later.

Now I can go back and take another look at those assets too.

Thanks again for your time and your help. It's appreciated!

Duane
 
That's what I did at first and it cleared the error but when you place a car in Surveyor they had no number on the side and I had a red/orange dot in the lower right corner that says array overflow. Hence, my fix which works.

Bob
 
Yes, Collin55's method didn't work properly for me either.

Figured out how to work "prefixes" as well - need those " "!

Thanks again for the help. I can say I learned something today.

Duane
 
In CM3.2, right click

Bob, you're a bloody legend. I've been tearing my hair out over getting my log wagons working in TS10, because I use a custom script that Wulfie wrote for me way back when.

The Clinchfield reskin of my 50ft wagon is built-in content, so I confidently copied it and went to look at the config and gs to see what needed to be fixed... oh dear, it has the magic trainzbuild 2.4 and the config and script are unmodified... :(

I never liked the concept of soup() anyway. I always found flies in mine.

Cheers
Charlie
 
Having been through the hoop with ARN recently, I can confirm that it works faultlessly in TS2010. I think there is more required

This works

extensions
{
arn_data-xxxxx (place your KUID here
{
number_low "80"
number_high "213"
number_colour "3" (this selects the grid coordinates)
always_check "0" (0 or 1 here determines if a car keeps the original number. 0 to keep or 1 to replace)
}
}

and don't forget the following
kuid-table
{
arn_lib <kuid2:104722:2501038:4>
arn_grid <kuid:104722:251103810>
0 and so on.

Peter
 
Did exactly that Peter, and I had each wagon come up with rn_0, rn_1, rn_2 etc as the running numbers.

Hard-coding it in the .gs, while not elegant, caused all my problems to vanish.

As I said to Bob, my script is one that Wulf cobbled together for me, so I was pretty much on my own.

Cheers
Charlie

PS: Error: Asset <kuid2:62941:16001:6> has not beed committed

Bwahaha. Someone had a cold when writing that error message.... :)
 
Last edited:
Charlie

That is puzzling. I had some initial problems, all due to my lack of care, but I re-read the instructions, checked all my spelling and it worked. The only change I made in the grid config was to change the number size, nothing else. One thing that hit me is that the number appears in the attachment negative X direction.

Are you sure that your config was correct?

By the way, Wulf was not aware that the ARN library had been included in 2009 and 2010. He hadn't been asked.

Peter
 
Back
Top