AJS invisible stations - too old and broken?

@pcas1986 - thanks for having a look at this. I just realised that one of the AJS stations I've been using is actually <kuid:67585:28001>. Apparently this was created by Andi, but uploaded by robin_hoods (who I think was working on a Nottingham tram route a few years ago). I'm pretty sure that this also has an early version of the script.

Paul
Perhaps you could let me know the kuid of the cloned tram stop you mentioned. I need all the information I can get.
 
I think that is the way to go. Unless your new stations have some unique functionality you don't really need to do anything special with a script. Just start with Genericpassengerstation.gs that defines class GenericPassengerStation. You subclass that and just add the overridden functions that are identified in the comments of genericpassenterstation.gs.

If I were making a new station I'd start with that given that N3V have been updating it recently perhaps because of TLR.

Andi's stations and many of those other related assets are in my "in tray" for CRG repairs. I sometimes wonder if repairing them are more trouble than they are worth.
Since I
use a clone of one of Andi's scripts I should probably have a look at creating my own from Genericpassengerstation.gs. Where can I find a copy?

Thanks John
 
Since I
use a clone of one of Andi's scripts I should probably have a look at creating my own from Genericpassengerstation.gs. Where can I find a copy?

Thanks John
Look in the Trainz installation folder under .\resources\scripts. I suggest taking a copy of all the 113 scripts in there and putting a copy in some "working" folder for reference. Don't edit any files in that location.

Genericpassengerstation.gs has useful information in the comments. I often find useful information in the script library files that isn't in the WiKi.
 
Perhaps you could let me know the kuid of the cloned tram stop you mentioned. I need all the information I can get.
It's <kuid:134105:1498:>, which is a clone of <kuid2:122285:3355:1> (currently at :20, so I haven't even got the latest script existing for that)
 
It's <kuid:134105:1498:>, which is a clone of <kuid2:122285:3355:1> (currently at :20, so I haven't even got the latest script existing for that)
Thank you. I did a compare of the two scripts and my file compare tool says they are identical. But I intend to have a look at some of the code and see if they have the same issues as was present in the AJS Station Library. Hopefully I can do that later today.

Andi's tram stops don't use a script library like other AJS stations although they do use the GenericPassengerStation base.
 
Thank you. I did a compare of the two scripts and my file compare tool says they are identical. But I intend to have a look at some of the code and see if they have the same issues as was present in the AJS Station Library. Hopefully I can do that later today.

Andi's tram stops don't use a script library like other AJS stations although they do use the GenericPassengerStation base.
So since I cloned his tram stop it's probably safe as it is.

Thanks John
 
...I did a compare of the two scripts and my file compare tool says they are identical. But I intend to have a look at some of the code and see if they have the same issues as was present in the AJS Station Library. Hopefully I can do that later today.
...

I cloned Andi's <kuid2:122285:3355:20> AJS Tram Stop Type 2 and bumped it to TB5.0 to see what broke. It seems the config tag passenger-height is now obsolete and notes in the WiKi suggest it never worked anyway. I suppose N3V assume you would set the passenger heights using the attachment Z axis value.

So, I suggest a minor correction to the call to SetProperties() as shown below. SetProperties() loads stored values from the session database and the script can use those to restore previous conditions or settings.

C++:
  public void SetProperties(Soup soup) {
    inherited(soup);
    // passenger-height is now obsolete as a config tag
    //defaultpheight = GetAsset().GetConfigSoup().GetNamedTagAsFloat("passenger-height") * 10;
    defaultpheight = 0;  
 
    // try and get the passenger height from the session soup and if it doesn't exist then use defaultpheight which is zero
    pheight = soup.GetNamedTagAsInt("pheight",defaultpheight);
    SetMeshAnimationFrame("default",pheight);
    px = soup.GetNamedTagAsInt("px",0);
    SetMeshAnimationFrame("xadjust",px);
    py = soup.GetNamedTagAsInt("py",0);
    SetMeshAnimationFrame("yadjust",py);
  }

I also tested my clone in TS12 SP1 with a TB of 3.7 and it worked fine. I haven't tested it with trams and passengers yet as that takes time to set up.

This asset isn't on the CRG's repair list but I'll ask N3V to add it. Not sure what TB it might be but probably about 4.6 or whenever passenger-height became obsolete.
 
Last edited:
So I updated the script in both my Trams Stop (compact) and Robin_hood's trams station. Mine commits fine, but I can't see any difference in behaviour. Robin_hood's comes up with a load of script errors (I assume it uses a different generation of the script).

Making matters more complex, I've done an audit of just the currently working part of my tram route (not the train lines), and found that I'm using a total of 10 AJS station variants, uploaded by 5 different users. Now I know which station is which, I may be able to hunt down the misbehaving versions - so far it's really hard to tell.

Thanks,

Paul
 
I looked at <kuid:67585:28001> Tram Station by robin_hoods and didn't get any script errors but I'm not sure the shape option is working correctly. Maybe I'm misunderstanding its purpose. I inadvertently overwrote my changes so I'll have another look tomorrow.

I'd like to know more about the odd behaviour of these assets if it is unrelated to passenger height or passenger locations. I still haven't tested these as I discovered TS22 has done weird stuff to my play route and I got distracted by that.
 
The shape option allows the invisible platform to conform to a curved platform using a +/- set up. By clicking on the plus sign, the platform can be adjusted to a certain extent. To be honest, I'm not sure how much that's used. In all the years that I've used those platforms, I used that option that twice.
 
The shape option allows the invisible platform to conform to a curved platform using a +/- set up. By clicking on the plus sign, the platform can be adjusted to a certain extent. To be honest, I'm not sure how much that's used. In all the years that I've used those platforms, I used that option that twice.
Thanks John. In the Robin_Hoods tram stop I was playing with, I could see the (surveyor only) arrow rotating but the passengers don't move. Some aspects of animation no longer work in Surveyor mode but some, like setting the frame number, do. I haven't had the time to work out if this is a problem or not.
 
<kuid2:78193:88101:1> UK Bus Stop 0.5m has a different script but works for buses
My experience isn't great with this one in build 126280. Bus slows down on the approach to it and then speeds up close to the speed limit before coming to an abrupt halt. Not behaviour I recall as always being the case.
 
My experience isn't great with this one in build 126280. Bus slows down on the approach to it and then speeds up close to the speed limit before coming to an abrupt halt. Not behaviour I recall as always being the case.
The radius I think was set at 15 or 20. I changed the radius to 10. If the radius overlaps each other, then the bus will mostly slow but not stop as it gets confused by them..
 
<kuid2:78193:88101:1> UK Bus Stop 0.5m has a different script but works for buses

My experience isn't great with this one in build 126280. Bus slows down on the approach to it and then speeds up close to the speed limit before coming to an abrupt halt. Not behaviour I recall as always being the case.

That one is using is using an obsolete function that was known to be erratic.

For that particular asset you might try changing line 9 of the station.gs script as follows:

From

bool vehicleToTrain = vehicle.GetFacingRelativeToTrain();

To

//bool vehicleToTrain = vehicle.GetFacingRelativeToTrain();
bool vehicleToTrain = vehicle.GetDirectionRelativeToTrain();

The CRG will repair this but will have to bump the Trainz Build to at least 3.5.
 
The radius I think was set at 15 or 20. I changed the radius to 10. If the radius overlaps each other, then the bus will mostly slow but not stop as it gets confused by them..
Close. It was set to 10 and I changed it to 5 and this prevents the sudden pick up in speed, so an improvement, but I still have to stop the bus by adding a Load command after the Drive To. I realise I didn't previously mention I needed to do that to stop it. I don't remember that always being the case, but I might be wrong.

For that particular asset you might try changing line 9 of the station.gs script as follows:

From

bool vehicleToTrain = vehicle.GetFacingRelativeToTrain();

To

//bool vehicleToTrain = vehicle.GetFacingRelativeToTrain();
bool vehicleToTrain = vehicle.GetDirectionRelativeToTrain();
This change doesn't appear to have made any difference.
 
Does anyone have a copy of the instructions for setting up AJS invisible stations? These were originally on Andi's website but no longer available.

Andi referred to them in his assets and I'd to be able to rehost the instructions on the Trainz WiKi.

(Edit) Disregard. This would be a copyright infringement so...
 
Does anyone have a copy of the instructions for setting up AJS invisible stations? These were originally on Andi's website but no longer available.

Andi referred to them in his assets and I'd to be able to rehost the instructions on the Trainz WiKi.

(Edit) Disregard. This would be a copyright infringement so...


Cheerio John
 
Last edited:
Back
Top