I've got a problem I have to admit has me stumped; ordinarily, after a few hours of searching, I manage to find solutions to whatever problems I'm experiencing, but no such luck this time. Let me explain:
I'm one of those weird people who never actually drives a train for himself, instead relying on clever (or, sometimes, not so clever) sequences of driver commands to do anything that needs doing. If I ever need to come in and take control of the train myself, I consider that something has gone seriously wrong.
To that end, I've been working at making the AI run a classification yard for me. The yard layout is fairly simple, as the crappy diagram below shows:
Now, most of the time, the AI surprises me by managing to find its way to the lead all by itself when ordered to (for example) drive to one of the classification tracks from one of the A/D tracks. For the times when it doesn't, I have a trackmark at the far end of the lead that I can order it to go to... and that's the problem.
The diagram above is not to scale (it's just something I whipped up in a couple of minutes in MSPaint), but it, too, shows how long the lead track is -- it's as long as an A/D track by necessity (and by definition, perhaps), and those are long enough to accommodate half-mile trains. Driving all the way to its end at yard speed (15 mph, on my layout) takes a fair amount of time (2 minutes), and is frankly ridiculous when you're just trying to get three or four cars out of classification onto one of the A/D tracks (about 4 extra minutes just running back and forth on the lead track).
Through searching around, I've found a few possible solutions to this:
What I'm looking for is a driver command along the lines of "drive until clear of junctions", with the intended use case being: tell the AI to drive to a trackmark just after the entrance switch to the yard lead, and then tell him to keep going until the end of his train is past the switch, after which the next command in sequence should take over.
This could also help automate the classification tracks, as one could say "couple at trackmark classification 4, then drive forward until clear of all junctions". If possible, the driver should try to stop before it meets any other junctions, but I accept this may be overly tricky to implement and is certainly not worth wasting time over. I have no requirement for checking the length of the track versus length of train -- if I make a train too large to fit into a given siding, that's my own damn fault, isn't it?
As far as I can tell from searching around all over the place, nobody has written this driver command yet, but it seems like the necessary pieces should exist. I don't really speak .gs and when I last tried to pick it up, I found the available documentation to be fairly inadequate (this may have changed since). If I did, I'd just create the command myself and be done with it. So, finally, we come to my question:
Does anyone know if the driver command I mentioned above exists (and if so, please tell me where to find it), or would someone like to try their hand at writing it?
This turned out a slightly longer post than I had expected, my apologies if it feels like I've wasted your time. Happy Trainzing!
I'm one of those weird people who never actually drives a train for himself, instead relying on clever (or, sometimes, not so clever) sequences of driver commands to do anything that needs doing. If I ever need to come in and take control of the train myself, I consider that something has gone seriously wrong.
To that end, I've been working at making the AI run a classification yard for me. The yard layout is fairly simple, as the crappy diagram below shows:

Now, most of the time, the AI surprises me by managing to find its way to the lead all by itself when ordered to (for example) drive to one of the classification tracks from one of the A/D tracks. For the times when it doesn't, I have a trackmark at the far end of the lead that I can order it to go to... and that's the problem.
The diagram above is not to scale (it's just something I whipped up in a couple of minutes in MSPaint), but it, too, shows how long the lead track is -- it's as long as an A/D track by necessity (and by definition, perhaps), and those are long enough to accommodate half-mile trains. Driving all the way to its end at yard speed (15 mph, on my layout) takes a fair amount of time (2 minutes), and is frankly ridiculous when you're just trying to get three or four cars out of classification onto one of the A/D tracks (about 4 extra minutes just running back and forth on the lead track).
Through searching around, I've found a few possible solutions to this:
- There is an "Autodrive" command (linked) that would pick from a set of trackmarks based on the number of cars in a train. However, anything that requires extra trackmarks is a bad idea; I want to cut down on trackmarks, not make more of them.
- I could move the trackmark closer to the start of the lead, but this is actually the same problem I'm trying to solve in the first place -- when the AI can't find the lead by itself, how can I have any certainty it will continue driving as far as it needs to go past the trackmark before reversing to arrive wherever it's supposed to?
- There's some discussion in a thread from August that seems to be at least somewhat related, but while I think that implementation would alleviate my problem, there's no mention there of any such driver command having actually been made -- certainly it doesn't seem to be on the DLS.
What I'm looking for is a driver command along the lines of "drive until clear of junctions", with the intended use case being: tell the AI to drive to a trackmark just after the entrance switch to the yard lead, and then tell him to keep going until the end of his train is past the switch, after which the next command in sequence should take over.
This could also help automate the classification tracks, as one could say "couple at trackmark classification 4, then drive forward until clear of all junctions". If possible, the driver should try to stop before it meets any other junctions, but I accept this may be overly tricky to implement and is certainly not worth wasting time over. I have no requirement for checking the length of the track versus length of train -- if I make a train too large to fit into a given siding, that's my own damn fault, isn't it?
As far as I can tell from searching around all over the place, nobody has written this driver command yet, but it seems like the necessary pieces should exist. I don't really speak .gs and when I last tried to pick it up, I found the available documentation to be fairly inadequate (this may have changed since). If I did, I'd just create the command myself and be done with it. So, finally, we come to my question:
Does anyone know if the driver command I mentioned above exists (and if so, please tell me where to find it), or would someone like to try their hand at writing it?
This turned out a slightly longer post than I had expected, my apologies if it feels like I've wasted your time. Happy Trainzing!