AJS Invisible Stations and Bloodnok's New Platforms - Loading Problems Workaround

Hi Bloodnok,

I believe the speed updating issue may be due to a faulty asset as it normally updates properly apart from certain areas, but I'm having trouble tracking down which one it is. My feeling is that it's a built-in one.

Shane

P.S. Will you be doing any larger versions (5 or 6 track) versions of your Station Platforms?
 
An update...

I have found entries in the GenericIndustry.gs file that control the loading speed of a train. These are lines 506 and 554. Both of these lines contain the following:

itc.SetTrainSpeed(train, 3.0f);

Reducing this figure may help to reduce the chances of the train simply going through, or continuing to load even after the station. Make sure you keep the f after it.

In addition to this, there are entries similar or the same as this one in both BaseIndustry and GenericIndustry that may help deal with 'late loading' issues.

PostMessage(vehicle.GetMyTrain(), "HandleTrain", "Release", 1.0);

Change the 1 to a 0, and it may help fix the problem. Adding a f at the end,after the 0, but before the ),may make a difference as well, but it's only advised if you understand the meaning of it.

Unless you know exactly what you are doing, back up the affected files first before making any changes.

Hopefully this will help out.

Shane
 
Last edited:
Hi Bloodnok,

I believe the speed updating issue may be due to a faulty asset as it normally updates properly apart from certain areas,

To get that to stop, you have to either:

* Crash the driver HUD
* So badly overload the script engine that no scripts can run properly

but I'm having trouble tracking down which one it is.

In the first case, you'd see the red bug icon, and that will tell you. It would also freeze and not restart for the rest of that session
In the second case, pop open your stats, and see what script is listed as the most intensive, it's probably that one...

P.S. Will you be doing any larger versions (5 or 6 track) versions of your Station Platforms?

Yes. I'll be updating all my previous station platforms, as well as adding some new ones. There are several to come with 3, 4, 5, and 6 tracks, plus a couple of really big termini -- an 8 track which takes the default station script to it's limit, and an 11 track which has a lot of hackery and reimplementation to go beyond the standard limits...
 
Hi Bloodnok,

Thankyou for your response.

I know I run quite a few trains, as I'm running quite an intensive timetable on certain lines to make it prototypical - I'm guessing that TS2009 SP4 cannot handle it properly. I will see if I can find which asset is causing the problems, although I have a feeling it may be signal related. Your VSR/Railsim signalling pack signals (of which I use the 4A variety), for example, seems to be affecting framerates, so that's one of the possible culprits.

Shane

P.S. I cannot find the 'worst script' or similar option in the performance statistics for TS2009 SP4, but I am currently waiting for TS2010 to arrive, so I will check if it's in there instead.

EDIT: One of the script errors I've been having is relating to the Max Permitted Speed rule, specifically on the handler itself. This seems to happen quite frequently, and the only wagons I know I'm using that use that are FCA container wagons. I'm also encountering errors with MultipleIndustry,but I believe that to be caused by a faulty product.
 
Last edited:
Hello Shane

The PostMessage command doesn't affect the problem. It is sent after the end of the loading, to signal the station is no longer controlling the train.

The speed of a train, when controlled by a passengerstation, is defined by the variable m_trainLoadingSpeed. You could add the line
Code:
m_trainLoadingSpeed = 3.0f;
to the script of the station after the line calling InitPassengerStation. The speed is in meters per second (3.0f being 10.8 kph). This is for stations based on genericpassengerstaion.gs, AJS stations may be different.

Peter
 
Hello Shane

The PostMessage command doesn't affect the problem. It is sent after the end of the loading, to signal the station is no longer controlling the train.

The speed of a train, when controlled by a passengerstation, is defined by the variable m_trainLoadingSpeed. You could add the line
Code:
m_trainLoadingSpeed = 3.0f;
to the script of the station after the line calling InitPassengerStation. The speed is in meters per second (3.0f being 10.8 kph). This is for stations based on genericpassengerstaion.gs, AJS stations may be different.

Peter

Hi Peter,

Just to be absolutely clear in my mind, is it the line;

void InitPassengerStation(int platformCount)

which is line 538 in the genericpassengerstaion.gs script I have.

So the code would now read;

void InitPassengerStation(int platformCount)
m_trainLoadingSpeed = 3.0f;

Is this correct?

Scottish

Edit; I see there is a few lines below in the curly brackets;

void InitPassengerStation(int platformCount)
{
int i;


m_trainLoadingSpeed = 5.f;

So are we just changing the 5.f; to 3.0f;
 
Last edited:
It's not in the script genericpassengerstation.gs. You have to modify the script of the station itself. Usually there is a call to InitPassengerStation in the Init function of the station's script. The value in genericpassengerstation.gs is the default value, which can be modified, in the script of the station, after having called InitPassengerstation.

Peter
 
I know I run quite a few trains, as I'm running quite an intensive timetable on certain lines to make it prototypical - I'm guessing that TS2009 SP4 cannot handle it properly.

That shouldn't cause a framerate issue -- you *might* run into AI scheduling issues, but that would just result in the AI doing stupid things. It won't result in an overly poor framerate.

I will see if I can find which asset is causing the problems, although I have a feeling it may be signal related. Your VSR/Railsim signalling pack signals (of which I use the 4A variety), for example, seems to be affecting framerates, so that's one of the possible culprits.

The signals themselves are pretty simple mesh-wise, and the script on those is IIRC fairly efficient -- all handler based with no loops, so they shouldn't be noticeably worse than any other signal object.

P.S. I cannot find the 'worst script' or similar option in the performance statistics for TS2009 SP4, but I am currently waiting for TS2010 to arrive, so I will check if it's in there instead.

Ah, that might be a TS12 thing then. TS2009 SP4 == TS2010 SP3 as far as this stuff goes, so you'll not find any change between TS2009 and TS2010.

EDIT: One of the script errors I've been having is relating to the Max Permitted Speed rule, specifically on the handler itself.

Wow, that's unexpected. I've been using that for ages, and I've not seen so much as a peep out of it. Can you get the full details from the crash message, and send me a PM with them please? Hopefully I can fix it :)

I'm also encountering errors with MultipleIndustry, but I believe that to be caused by a faulty product.

Yeah, that can happen. Those can be fairly difficult to track down, too. 'Low hanging fruit' where that is concerned is to make sure none of your products are listed as faulty or missing dependencies in Content Manager, but some that CM thinks are fine can also unfortunately cause this too...
 
Hi Bloodnok,

Thankyou for your response.

After checking CM, it appears that just over 270 assets have become faulty. I'm not entirely sure why, but I'm going to check if they need fixing or not.

I have sent you a PM regarding the Max Permitted Speed issue.

Shane
 
An update... (apologies for bumping this thread, but this directly relates to it)

After doing some tests (as well as communication with Bloodnok) I now have a feeling that some of the loading issues are caused by an issue with the Trainz messaging system, and more specifically, delayed messages.

This mostly applies to the trains that stop at the very start of the platform, wait a good while (or indefinitely), then start loading passengers.

I am currently trying to find a way of tracing these messages, which I have a feeling that I'm going to have to write a script to trace them.

Shane
 
An update... (apologies for bumping this thread, but this directly relates to it)

After doing some tests (as well as communication with Bloodnok) I now have a feeling that some of the loading issues are caused by an issue with the Trainz messaging system, and more specifically, delayed messages.

This mostly applies to the trains that stop at the very start of the platform, wait a good while (or indefinitely), then start loading passengers.

I am currently trying to find a way of tracing these messages, which I have a feeling that I'm going to have to write a script to trace them.

Shane

This sounds like it will be an interesting find if you can do it. The Trainz messaging system is responsible for a lot of events that occurr while driving, ranging from crossing gates to signals, to industries. I noticed that when the program gets bogged down, whether due to the program its self or due to outside system problems, that it is then the messaging goes bonkers and the AI drivers start missing platforms, backing up past trackmarks, and even passing signals.

So what I'm thinking is, if you can fix this or at least point the developers in the right direction on this issue, it may fix a host of others as well.

John
 
Hi John,

Thankyou for your response.

I will be writing a scripted asset over the next few days to capture a selection of messages, so I can get the required information.

Shane
 
I will be writing a scripted asset over the next few days to capture a selection of messages, so I can get the required information.

No need to write an asset. You can get suitable debug logging by adding the following to your trainzoptions.txt file:

Code:
-enablescriptlogging
-enablescriptmessagelogging

This will instruct Trainz to log script debugging information, and then also include messages with that debugging.

Note: This will slow down your game, possibly quite dramatically. Put the lines in, do the research you need to, and then remove them afterwards.
 
Hi All,

Apologies for the delay in responding. I have (with Bloodnok's help) managed to trace part of my problems down to assets using Eldavos LightUp script. It appears that the script is sending a lot of debug messages which effectively delays others. The Class 321 (London Midland),323 (London Midland) and 165 (Chiltern) are using said script and have the debugging information turned on by default.

Shane
 
Hi guys,

Not sure I'm in the right thread, but there is another thing that doesn't work with AJS stations. When making a schedule like explained in the first post, the train stops, opens its doors, then closes them and drive to the next station, but without having taken the station passengers, who all remain on the platform, and the train remains empty.

The "work-around" doesn't work. Is there a way to unactivate the station trigger so that the unloading and loading processes are done by the schedule rules ?

Thanks in advance. I'm using TS2010 SP4.
TheRack.
 
That is connected with it, but nothing can be done about it unless N3V and andi06 can work together to sort out the issue, as the crucial script for andi06's stations is encrypted.

Shane
 
Thank you very much Shane for your answer. Do you know if there is a way to make a proper AI schedule system in Trainz ? I've tried many ways since a few days, including the timetables done by members, but they too seem to suffer the same problems as the AJS stations. What I try to do in my project is very simple, although it seems complicated with Trainz (??!!) :

- Making trains go from one station to another, opening their doors, picking up passengers, and continue
- Making it possible for a player to take one of those trains and drive it a few time, then release it again to the system so the train reintegrates the schedule system.
- Making it possible to have correspondancies at some stations, where trains from 2 lines will wait one for each other, keep their doors open until both trains stopped for a half minute, then leave their stations at the same time, continue their own journey.

I've tried 3 or 4 rule systems as well as script commands, nothing seem to work efficiently :-( My HVV-Project is a subway system. What I want to do are simple and common things, but I fight since many years with Trainz to try to achieve them. Ideas would be very welcome.

Thanks again.
Kind regards,
TheRack.
 
It is possible, using Load At, Wait Until Minute/Wait For, and possibly Wait For Trigger.

Bloodnok's Station Platforms series usually behaves better than andi06's stations, but the major difference is that Bloodnok's stations are not invisible.

Shane
 
Back
Top